Skip to content

Using Atlas

Configuration

Every ATLAS_* setting and key rotation.

All settings are environment variables with the ATLAS_ prefix. The annotated reference is .env.example. The most important ones:

The node can also load a KEY=value file selected by ATLAS_CONFIG_FILE. Non-empty environment values override file entries. Keep this file private when it contains gossip keys or API tokens. TLS certificates already reload automatically. Send SIGHUP to reload gossip keys, API tokens, node admission, rate limits, trusted proxies, and log level. Listener, node identity, database, TLS mode, and timing changes require a restart.

VariableDefaultDescription
ATLAS_ENVdevelopmentproduction enforces TLS.
ATLAS_DEVautoDev mode generates the gossip key and an API token into dev-credentials.json next to the database, enables DNS on :5353, and prints a start banner. auto enables it only in development with no key, credentials or seeds configured; true forces it (refused in production); false disables it.
ATLAS_NODE_IDhostnameUnique node name.
ATLAS_REGIONlocal / FLY_REGIONUsed for region-aware routing.
ATLAS_SEEDSโ€”host:port list; DNS names may resolve to many nodes.
ATLAS_ALLOWED_NODE_IDSemptyOptional comma-separated node-ID admission allowlist; each node must list itself.
ATLAS_GOSSIP_KEY ๐Ÿ”’requiredbase64 256-bit key (atlas-cli keygen).
ATLAS_GOSSIP_KEYS_SECONDARY ๐Ÿ”’โ€”Decrypt-only keys for rotation.
ATLAS_API_TOKENS ๐Ÿ”’one credential optionComma-separated legacy tokens, โ‰ฅ 32 chars; grant full API access without expiry.
ATLAS_API_CREDENTIALS ๐Ÿ”’one credential optionJSON array of {token, scopes, expires_at}; scopes are read, write, admin; expiry is required RFC3339.
ATLAS_TLS_ENABLEDfalseHTTPS for the API (TLS 1.3).
ATLAS_GRPC_ADDR0.0.0.0:8082gRPC listener using the same TLS and bearer-token settings.
ATLAS_PPROF_ADDR127.0.0.1:6060Local-only Go pprof listener; configuration rejects non-loopback bind addresses.
ATLAS_XDS_ADDR / ATLAS_XDS_CLUSTERoff / atlas_xdsServe Envoy REST xDS (CDS and EDS) on this address; see Envoy (xDS). Production requires a loopback bind unless client certificates are required.
ATLAS_CORS_ORIGINSempty (* in dev mode)Browser origins allowed to call the API, such as the Atlas Console's URL: comma-separated https://host[:port], or * for any. Tokens are still required and no cookies are used.
ATLAS_LOCATIONemptylatitude,longitude for the console's cluster map. Unset, the map places the node by its region code (Fly.io, AWS, GCP, Azure).
ATLAS_CONSOLE_URLemptyWhere the Atlas Console is hosted. / and /dashboard redirect there, and the dev-mode banner prints a one-click connect link.
ATLAS_TRUSTED_PROXIESemptyComma-separated CIDRs allowed to supply X-Forwarded-For client addresses. Add the cluster's own network so forwarded writes are rate-limited per original client rather than per forwarding node.
ATLAS_API_ADVERTISE_ADDRderivedBase URL peers use to forward writes here, for example https://atlas-2.internal:8080. Unset, it's the gossip advertise host with the ATLAS_HTTP_ADDR port. With TLS, peers verify this name against the node certificate, which must also allow client authentication.
ATLAS_DB_PATHdata/atlas.dbPer-node SQLite file for service registry persistence.
ATLAS_HEALTH_CHECK_INTERVAL / _TIMEOUT5s / 1sDefault probe interval (a service can set check_interval_seconds) and the deadline for each probe. Up to 16 probes run at once.
ATLAS_ORPHAN_SERVICE_REAP10mDelete services whose owning node has been gone this long; 0 disables. Minimum 1m, so a restarting node keeps its services.
ATLAS_ROUTING_STALE_POLICYprefer-liveHow lookups and DNS treat instances whose owning node isn't alive: include, prefer-live or exclude.
ATLAS_ROUTING_LATENCY / _TOLERANCEnearest / 5msPrefer the nearest measured nodes (nearest) or ignore latency (off); the tolerance makes nodes this close to the nearest count as equal.
ATLAS_HISTORY_RETENTION168hHow long service change history is kept; 0 turns history off.
ATLAS_ANALYTICS_ENABLEDfalseAccept anonymous usage events from a hosted console at POST /v1/telemetry/event. Visitor IDs are stored only as day-scoped hashes; data is capped per day and kept 90 days.
ATLAS_TELEMETRY_KEY ๐Ÿ”’โ€”Shared key (32+ characters) that telemetry events must carry. Without it, anyone can submit events and countries are ignored.
ATLAS_TLS_CLIENT_AUTHfalseRequire client certificates (mTLS).
ATLAS_PROBE_INTERVAL / _TIMEOUT1s / 500msFailure-detector timing.
ATLAS_SUSPICION_TIMEOUT5sTime a suspect has to refute.
ATLAS_GOSSIP_INTERVAL / _FANOUT200ms / 3Dissemination speed.

Rotating the gossip key without downtime:

  1. Add the new key to ATLAS_GOSSIP_KEYS_SECONDARY on all nodes and signal each node with SIGHUP (or roll them).
  2. Swap: set the new key as ATLAS_GOSSIP_KEY and the old one as secondary, then signal all nodes again.
  3. Remove the old key and signal all nodes a final time.
Improve this pageSource: README.md