Graph Configuration¶
graphd is configured with environment variables.
| Variable | Default | Meaning |
|---|---|---|
GRAPHS |
required | Comma-separated author/name list. The order is the default precedence |
RELAYS |
none | Comma-separated relay addresses (ws:// or wss://). Needed for synchronization |
QUORUM |
2 |
Indexers that must answer before a read is accepted without consulting relays directly |
WATCHDOGS |
none | Public keys of watchdogs whose reports are trusted |
MIN_TRUST_PERCENT |
40 |
Indexers with a lower score are not asked. Unrated indexers count as 50 |
SYNC_SECONDS |
15 |
Pause between synchronizations |
MAX_GRAPH_BYTES |
268435456 |
Segment bytes per graph |
MAX_STATEMENTS |
2000000 |
Statements per graph, not counting system statements |
MAX_STEPS |
5000000 |
Steps per query |
MAX_ROWS |
10000 |
Rows or groups per query |
QUERY_SECONDS |
10 |
Time per request |
API_TOKENS |
none | Comma-separated bearer tokens of at least 16 characters. Without it, the API is open |
ALLOW_PRIVATE |
false |
Allow indexers and origins on private addresses |
DATA_FILE |
/data/graph.db |
Database |
KEY_FILE |
/data/graph.key |
Signing key. Created if missing |
LISTEN |
:8080 |
Listen address |
With ALLOW_PRIVATE=false, connections to private, loopback and other non-public addresses are refused after name resolution, so a registry cannot make the service read internal addresses. The Compose file sets it to true because the registry network it joins is private. Set it to false when you load registries from authors you do not control and all origins are public.
Compose settings¶
deploy/compose/docker-compose.yml passes through GRAPHS, RELAYS, WATCHDOGS, QUORUM, SYNC_SECONDS, API_TOKENS and ALLOW_PRIVATE. GRAPH_PORT (7860) is the local port. It joins the existing Docker network registries.