Configuration & secrets
- Written for
- + Written for
- Deprecated
- + Deprecated
- Applies to
- + Applies to
Configuration & secrets
Atlas is configured almost entirely through environment variables (deploy/atlas.env.example is the annotated reference). Most are plumbing; a few are secrets you must handle carefully — above all the root encryption key.
Core configuration
Variable | Purpose |
|---|---|
| PostgreSQL connection string |
| Redis connection string |
| The root key for envelope encryption (below) |
| The instance that authenticates the dashboard |
| The single HTTPS origin the app and API share |
|
|
The root encryption key
DATA_ENCRYPTION_KEY is the most important secret in the system. Atlas uses envelope encryption: the root key wraps a per-instance data key, and those data keys encrypt every sensitive value — OAuth provider secrets, refresh tokens, BYOK messaging credentials, CAPTCHA and Stripe secrets.
Generate it once and keep it stable:
openssl rand -base64 48Two rules that matter enormously:
Back it up off-box. Store the value in a password manager or secrets vault, separate from your database backups, recoverable by at least two people. A database backup is useless without the key that decrypts it.
Rotating it is not a re-key. Changing
DATA_ENCRYPTION_KEYorphans every existing ciphertext — provider secrets and refresh tokens become undecryptable. Never rotate it without a re-encryption migration.
Optional: wrap the root key with a KMS (Vault transit)
For production you can keep the raw key out of plaintext env. Atlas can store a sealed vault:v1:… ciphertext and unseal it at boot via HashiCorp Vault's transit engine:
Enable transit and create a non-exportable wrapping key (
transit/keys/atlas-root).Wrap your existing key with
node deploy/wrap-root-key.mjs— this seals the same key, so nothing already encrypted breaks.Set
DATA_ENCRYPTION_KEYto thevault:v1:…output and give the appVAULT_ADDR,VAULT_TRANSIT_KEYand a decrypt-onlyVAULT_TOKEN.
Startup is fail-closed: if Vault is unreachable or the token is unauthorized, the service refuses to boot rather than run with a key it can't recover. Keep the raw key in your password manager as the break-glass copy.
Optional integrations
Everything else degrades gracefully when unset:
Asset storage (S3-compatible / Cloudflare R2) — enables logo/avatar uploads; unset means uploads return 503 and nothing else changes.
Stripe (
STRIPE_SECRET_KEY,STRIPE_PRICE_PRO,STRIPE_WEBHOOK_SECRET) — billing; unset means billing is simply "not configured".Email/SMS — sending is per-instance BYOK, configured in the dashboard, not env. An optional env-managed mailer exists for simple self-hosts.
OpenTelemetry (
OTEL_EXPORTER_OTLP_ENDPOINT) and Sentry-compatible error reporting (SENTRY_DSN) — observability; unset means the SDKs aren't even loaded.GeoIP / network signals — baked into the image; a missing file resolves to "no geo" harmlessly.
Next
Keep it safe and keep it current → Backups & upgrades.