Complete reference for all Atlas environment variables with defaults and examples.
All Atlas configuration is via environment variables. Most have safe defaults — a minimal deployment needs only an LLM provider key and a datasource URL.
Analytics datasource connection string (PostgreSQL or MySQL). Optional when datasources are defined in atlas.config.ts
DATABASE_URL
—
Atlas internal Postgres (auth, audit, conversations). Optional — Atlas works without it
ATLAS_DEMO_DATA
—
Set true to use the internal DB as both analytics datasource and internal DB
Demo data fallback chain: When ATLAS_DEMO_DATA=true and ATLAS_DATASOURCE_URL is not set, Atlas resolves the analytics datasource by checking DATABASE_URL_UNPOOLED first, then DATABASE_URL. This lets a single Postgres instance (e.g. Neon on Vercel) serve as both the analytics datasource and Atlas's internal database.
Dot-delimited JWT claim path for role extraction (e.g. app_metadata.role). Default is a fallback chain: Atlas checks the role claim first, then falls back to atlas_role if role is not present
JWT/session claim path for RLS value extraction (e.g. org_id)
ATLAS_RLS_CLAIMS
—
Static JSON claims for RLS with simple-key auth
ATLAS_RLS_CLAIMS is a JSON string that provides static claims for row-level security filtering. This variable is only used with simple-key (ATLAS_API_KEY) auth mode, where there is no JWT or session to extract claims from. For managed and BYOT auth, RLS claims are extracted from the user's JWT/session automatically.
Public base URL for constructing action approval URLs. When not set, derived from request headers. Set explicitly in production for reliable approve/deny links in /api/v1/query responses
ATLAS_CORS_ORIGIN
*
CORS allowed origin. Must set explicitly for cross-origin + managed auth (cookie-based)
NEXT_PUBLIC_ATLAS_API_URL
—
Next.js frontend: cross-origin API URL. When unset, same-origin via Next.js rewrites
ATLAS_API_URL
http://localhost:3001
Rewrite target for same-origin mode (only used when NEXT_PUBLIC_ATLAS_API_URL is unset)
Shared secret for the /tick endpoint (non-Vercel). On Vercel, use CRON_SECRET instead
CRON_SECRET
—
Vercel-native alternative to ATLAS_SCHEDULER_SECRET. When set, the /tick endpoint requires Authorization: Bearer <secret>. Takes precedence over ATLAS_SCHEDULER_SECRET
ATLAS_SCHEDULER_MAX_CONCURRENT
5
Max concurrent task executions per tick
ATLAS_SCHEDULER_TIMEOUT
60000
Per-task timeout in milliseconds
ATLAS_SCHEDULER_TICK_INTERVAL
60
Tick interval in seconds
Scheduler backend options:
bun — In-process tick loop. Simplest for single-instance deployments.
webhook — External cron service hits POST /:id/run. Use when you need external scheduling.
vercel — Vercel Cron hits POST /tick. Use on Vercel deployments.