Atlas
Reference

Environment Variables

Complete reference for all Atlas environment variables with defaults and examples.

Self-hosted only

Environment variables are used for self-hosted deployments. Hosted users at app.useatlas.dev can skip this — the platform manages all configuration through the admin console. See Workspace Settings.

Atlas can be configured entirely via environment variables. Most have safe defaults — a minimal deployment needs only an LLM provider key and a datasource URL. For multi-datasource setups or advanced configuration, see the Configuration reference.

Precedence

Config loading is binary — when atlas.config.ts exists, it is used exclusively for structure. Env vars like ATLAS_DATASOURCE_URL are not merged in as fallbacks. Fields omitted from the config file get Zod schema defaults, not env var values.

  1. Config file found → all structural config (datasources, tools, semanticLayer, plugins, actions, rls, scheduler) comes from the file
  2. No config file → all configuration comes from environment variables
  3. Some vars are always env-only — secrets (ANTHROPIC_API_KEY, BETTER_AUTH_SECRET), runtime hints (ATLAS_RUNTIME), and networking (PORT, ATLAS_CORS_ORIGIN) are always read from environment variables regardless of config file presence
  4. Auth mode can be set via the config file auth field or ATLAS_AUTH_MODE env var. Priority: env var → config file → auto-detection

See the Configuration reference for the full atlas.config.ts guide.

Run atlas doctor to verify your environment is correctly configured — it checks database connectivity, LLM providers, semantic layer, and sandbox availability.


LLM Provider

LLM provider and model configuration.

VariableDefaultDescription
ATLAS_PROVIDERanthropic (gateway on Vercel)LLM provider: anthropic, openai, bedrock, ollama, openai-compatible, gateway
ATLAS_MODELProvider defaultModel ID override (e.g. claude-sonnet-4-6, gpt-4o). Required for openai-compatible (no default)
OLLAMA_BASE_URLhttp://localhost:11434/v1Ollama server URL. Only used when ATLAS_PROVIDER=ollama
OPENAI_COMPATIBLE_BASE_URLBase URL for OpenAI-compatible servers (vLLM, TGI, LiteLLM). Required when ATLAS_PROVIDER=openai-compatible
OPENAI_COMPATIBLE_API_KEYnot-neededAPI key for OpenAI-compatible servers. Most local servers don't require one
ANTHROPIC_API_KEYAPI key for anthropic provider
OPENAI_API_KEYAPI key for openai provider
AWS_ACCESS_KEY_IDAWS access key ID for bedrock provider
AWS_SECRET_ACCESS_KEYAWS secret access key for bedrock provider
AWS_REGIONAWS region for bedrock provider (e.g. us-east-1)
AI_GATEWAY_API_KEYAPI key for gateway provider (Vercel AI Gateway)

When ATLAS_PROVIDER is not set, the default depends on the runtime environment. On Vercel (detected via the platform-set VERCEL env var), the default is gateway. Everywhere else, the default is anthropic.

Each provider requires its own API key:

ProviderAPI Key Variable
anthropicANTHROPIC_API_KEY
openaiOPENAI_API_KEY
bedrockAWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY + AWS_REGION
ollamaNone (local)
openai-compatibleOPENAI_COMPATIBLE_API_KEY (optional)
gatewayAI_GATEWAY_API_KEY

Default models per provider:

ProviderDefault Model
anthropicclaude-opus-4-6
openaigpt-4o
bedrockanthropic.claude-opus-4-6-v1:0
ollamallama3.1
openai-compatibleNone — ATLAS_MODEL required
gatewayanthropic/claude-opus-4.6
# Anthropic (default provider)
ATLAS_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...
# Optional: override the default model
# ATLAS_MODEL=claude-sonnet-4-6
# OpenAI
ATLAS_PROVIDER=openai
OPENAI_API_KEY=sk-...
# Optional: override the default model
# ATLAS_MODEL=gpt-4o
# AWS Bedrock (uses IAM credentials)
ATLAS_PROVIDER=bedrock
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=AKIA...
AWS_SECRET_ACCESS_KEY=...
# Ollama (local, no API key needed)
ATLAS_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434/v1
# Optional: override the default model
# ATLAS_MODEL=llama3.1
# Any OpenAI-compatible server (vLLM, TGI, LiteLLM, LocalAI)
ATLAS_PROVIDER=openai-compatible
ATLAS_MODEL=llama3.1                           # Required — no default
OPENAI_COMPATIBLE_BASE_URL=http://localhost:8000/v1  # Required
# OPENAI_COMPATIBLE_API_KEY=...                # Optional — most local servers don't need one

Database

VariableDefaultDescription
ATLAS_DATASOURCE_URLAnalytics datasource connection string (PostgreSQL or MySQL). Optional when datasources are defined in atlas.config.ts
DATABASE_URLAtlas internal Postgres (auth, audit, conversations). Optional — Atlas works without it
DATABASE_URL_UNPOOLEDUnpooled Postgres connection string (e.g. Neon direct URL). When ATLAS_DEMO_DATA=true and ATLAS_DATASOURCE_URL is unset, checked before DATABASE_URL in the demo data fallback chain
ATLAS_DEMO_DATASet 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.

# Local dev: Docker Compose provisions both databases
DATABASE_URL=postgresql://atlas:atlas@localhost:5432/atlas
ATLAS_DATASOURCE_URL=postgresql://atlas:atlas@localhost:5432/atlas_demo
# Production: separate databases for isolation
DATABASE_URL=postgresql://user:pass@internal-host:5432/atlas
ATLAS_DATASOURCE_URL=postgresql://readonly:pass@analytics-host:5432/warehouse
# Vercel with Neon: single Postgres for everything
DATABASE_URL=postgresql://...@neon-host/atlas?sslmode=require
ATLAS_DEMO_DATA=true
# ATLAS_DATASOURCE_URL not needed — falls back to DATABASE_URL

Agent

VariableDefaultDescription
ATLAS_AGENT_MAX_STEPS25Maximum tool-call steps per agent run. Range: 1–100. Increase for complex multi-step queries; decrease to limit token spend

Security

Query safety and SQL validation settings. See SQL Validation Pipeline for how these are enforced.

VariableDefaultDescription
ATLAS_ROW_LIMIT1000Max rows returned per query
ATLAS_QUERY_TIMEOUT30000Query timeout in milliseconds
ATLAS_TABLE_WHITELISTtrueOnly allow queries against tables defined in the semantic layer
ATLAS_SCHEMAPostgreSQL schema name. When set to a non-public value, the API sets search_path to "<schema>", public on each connection. When unset, no search_path is set and PostgreSQL uses its server default (typically public). Also used by atlas doctor to verify the schema exists
ATLAS_ENCRYPTION_KEYDedicated encryption key for connection URLs stored at rest. Takes precedence over BETTER_AUTH_SECRET. Recommended for production when managing datasource connections via the admin UI
ATLAS_POOL_WARMUP2Number of warmup probes per connection at startup. Set to 0 to disable warmup
ATLAS_POOL_DRAIN_THRESHOLD5Consecutive query errors before the pool is automatically drained and recreated
ATLAS_CACHE_ENABLEDtrueEnable query result caching. Set to false to disable
ATLAS_CACHE_TTL300000Cache TTL in milliseconds (default: 5 minutes)
ATLAS_CACHE_MAX_SIZE1000Maximum number of cached query results

Non-SELECT SQL (INSERT, UPDATE, DELETE, DROP, etc.) is always rejected — there is no toggle to disable this. The ATLAS_TABLE_WHITELIST setting only controls whether queries are restricted to semantic layer tables.

# Production: tighter limits
ATLAS_ROW_LIMIT=500           # Fewer rows per query
ATLAS_QUERY_TIMEOUT=15000     # 15s timeout (default: 30s)
ATLAS_TABLE_WHITELIST=true    # Only semantic layer tables (default)
ATLAS_SCHEMA=analytics        # Non-default PostgreSQL schema

Auth

Authentication mode and per-mode settings. See Authentication for full setup guides.

VariableDefaultDescription
ATLAS_AUTH_MODEAuto-detectedExplicit auth mode: none, api-key, managed, byot

When ATLAS_AUTH_MODE is not set, Atlas auto-detects based on which variables are present (checked in this order):

  1. ATLAS_AUTH_JWKS_URL set → BYOT
  2. BETTER_AUTH_SECRET set → Managed
  3. ATLAS_API_KEY set → Simple Key
  4. None of the above → No auth

Simple Key

VariableDefaultDescription
ATLAS_API_KEYShared secret. Clients send Authorization: Bearer <key> or X-API-Key: <key>
ATLAS_API_KEY_ROLEanalystRole for API key users: viewer, analyst, admin
# Simple key auth for headless integrations
ATLAS_API_KEY=your-secret-key-here
ATLAS_API_KEY_ROLE=analyst

Managed (Better Auth)

VariableDefaultDescription
BETTER_AUTH_SECRETSession signing secret. Min 32 chars, cryptographically random. Requires DATABASE_URL. Also used to encrypt connection URLs at rest (unless ATLAS_ENCRYPTION_KEY is set)
ATLAS_ENCRYPTION_KEYDedicated encryption key for connection URLs at rest. Takes precedence over BETTER_AUTH_SECRET
BETTER_AUTH_URLAuto-detectedBase URL for auth endpoints. Auto-detected on Vercel; set explicitly for Railway/Docker
BETTER_AUTH_TRUSTED_ORIGINSComma-separated CSRF-allowed origins
ATLAS_ADMIN_EMAILUser matching this email gets admin role on signup. If unset, first signup gets admin

Never use the default dev secret in production. Generate a cryptographically random secret: openssl rand -base64 32

# Managed auth for multi-user web apps
BETTER_AUTH_SECRET=$(openssl rand -base64 32)
BETTER_AUTH_URL=https://api.example.com
BETTER_AUTH_TRUSTED_ORIGINS=https://app.example.com
ATLAS_ADMIN_EMAIL=admin@example.com
DATABASE_URL=postgresql://user:pass@host:5432/atlas

Social Login (OAuth)

Optional. Only applies to managed auth. Uncomment a provider block to enable social sign-in alongside email/password. Providers are auto-detected — only those with both CLIENT_ID and CLIENT_SECRET set are enabled.

VariableDefaultDescription
GOOGLE_CLIENT_IDGoogle OAuth 2.0 client ID
GOOGLE_CLIENT_SECRETGoogle OAuth 2.0 client secret
GITHUB_CLIENT_IDGitHub OAuth app client ID
GITHUB_CLIENT_SECRETGitHub OAuth app client secret
MICROSOFT_CLIENT_IDMicrosoft Entra ID (Azure AD) application client ID
MICROSOFT_CLIENT_SECRETMicrosoft Entra ID client secret
MICROSOFT_TENANT_IDcommonTenant restriction: common, organizations, consumers, or a specific tenant UUID
# Enable Google + GitHub social login
GOOGLE_CLIENT_ID=123456789.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-...
GITHUB_CLIENT_ID=Iv1.abc123
GITHUB_CLIENT_SECRET=ghs_...

BYOT (Bring Your Own Token)

VariableDefaultDescription
ATLAS_AUTH_JWKS_URLJWKS endpoint URL for JWT signature verification
ATLAS_AUTH_ISSUERExpected JWT iss claim (required)
ATLAS_AUTH_AUDIENCEExpected JWT aud claim (optional)
ATLAS_AUTH_ROLE_CLAIMrole then atlas_roleDot-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
# BYOT with Auth0
ATLAS_AUTH_JWKS_URL=https://your-tenant.auth0.com/.well-known/jwks.json
ATLAS_AUTH_ISSUER=https://your-tenant.auth0.com/
ATLAS_AUTH_AUDIENCE=https://api.example.com
# Nested claim for role extraction
ATLAS_AUTH_ROLE_CLAIM=app_metadata.atlas_role

Rate Limiting

VariableDefaultDescription
ATLAS_RATE_LIMIT_RPM0 (disabled)Max requests per minute per user. 0 or unset = unlimited
ATLAS_TRUST_PROXYfalseTrust X-Forwarded-For / X-Real-IP headers. Set true behind a reverse proxy
# Production rate limiting behind a reverse proxy
ATLAS_RATE_LIMIT_RPM=30
ATLAS_TRUST_PROXY=true

See Rate Limiting & Retry for client-side handling, SDK retry patterns, and troubleshooting.

Abuse Prevention

VariableDefaultDescription
ATLAS_ABUSE_QUERY_RATE200Max queries per workspace per sliding window
ATLAS_ABUSE_WINDOW_SECONDS300Sliding window duration in seconds
ATLAS_ABUSE_ERROR_RATE0.5Max error rate (0–1) before escalation
ATLAS_ABUSE_UNIQUE_TABLES50Max unique tables accessed per window
ATLAS_ABUSE_THROTTLE_DELAY_MS2000Delay injected for throttled workspaces (ms)
# Stricter abuse detection for production
ATLAS_ABUSE_QUERY_RATE=100
ATLAS_ABUSE_ERROR_RATE=0.3
ATLAS_ABUSE_THROTTLE_DELAY_MS=5000

See Abuse Prevention for details on graduated response and admin reinstatement.

Session Timeouts

VariableDefaultDescription
ATLAS_SESSION_IDLE_TIMEOUT0 (disabled)Seconds of inactivity before a session is invalidated
ATLAS_SESSION_ABSOLUTE_TIMEOUT0 (disabled)Maximum session lifetime in seconds from creation
# 1 hour idle timeout, 24 hour absolute timeout
ATLAS_SESSION_IDLE_TIMEOUT=3600
ATLAS_SESSION_ABSOLUTE_TIMEOUT=86400

These can also be configured via atlas.config.ts or changed at runtime via Admin > Settings.


Multi-Tenancy

VariableDefaultDescription
ATLAS_ORG_IDOrganization ID for org-scoped semantic layer selection. CLI-only — when set, the CLI reads/writes to semantic/.orgs/{orgId}/ instead of semantic/. Requires managed auth (DATABASE_URL + BETTER_AUTH_SECRET). Can also be passed via --org flag. The API server derives the org from the authenticated session, not this variable

Semantic Layer

VariableDefaultDescription
ATLAS_SEMANTIC_ROOTsemantic/ under cwd (absolute)Development/testing override for the semantic layer directory. For production path customization, use the semanticLayer field in atlas.config.ts instead
ATLAS_SEMANTIC_INDEX_ENABLEDtrueSet false to disable the pre-computed semantic index. The index pre-computes a summary of the semantic layer and injects it into the agent system prompt to reduce explore tool calls

For additional index configuration, use atlas.config.ts.

# Development: override semantic layer location (for production, use atlas.config.ts)
ATLAS_SEMANTIC_ROOT=/tmp/test-semantic

# Disable pre-computed index (agent will use explore tool instead)
ATLAS_SEMANTIC_INDEX_ENABLED=false

Row-Level Security

Env var shorthand for a single global RLS policy. For per-table policies, use atlas.config.ts. See Row-Level Security for the full guide.

VariableDefaultDescription
ATLAS_RLS_ENABLEDSet true to enable RLS filtering on queries
ATLAS_RLS_COLUMNColumn name used for filtering (e.g. tenant_id)
ATLAS_RLS_CLAIMJWT/session claim path for RLS value extraction (e.g. org_id)
ATLAS_RLS_CLAIMSStatic JSON claims for RLS with simple-key auth

ATLAS_RLS_CLAIMS is only used with simple-key (ATLAS_API_KEY) auth, 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.

# Single global RLS policy via env vars
ATLAS_RLS_ENABLED=true
ATLAS_RLS_COLUMN=tenant_id
ATLAS_RLS_CLAIM=org_id

# Static claims for simple-key auth
ATLAS_RLS_CLAIMS='{"tenant_id": "acme-corp"}'

Sandbox & Isolation

Explore tool isolation backends. See Sandbox Architecture for the full selection priority.

VariableDefaultDescription
ATLAS_RUNTIMERuntime hint: vercel enables Vercel-specific sandbox and optimizations
ATLAS_SANDBOXSet nsjail to enforce nsjail isolation (hard fail if unavailable)
ATLAS_SANDBOX_URLSidecar service URL for explore isolation (e.g. http://sandbox-sidecar:8080)
SIDECAR_AUTH_TOKENShared secret for sidecar auth (set on both API and sidecar)
SEMANTIC_DIR/semanticSidecar only: directory where the sidecar serves semantic layer files. Defaults to /semantic via the sidecar Dockerfile, but can be overridden at container runtime. Not used by the main API
ATLAS_NSJAIL_PATHAuto-detectedExplicit path to nsjail binary
ATLAS_NSJAIL_TIME_LIMIT10nsjail per-command time limit in seconds
ATLAS_NSJAIL_MEMORY_LIMIT256nsjail per-command memory limit in MB
ATLAS_SANDBOX_PRIORITYComma-separated backend priority order (e.g. sidecar,nsjail,just-bash). Valid values: vercel-sandbox, nsjail, sidecar, just-bash. Plugin backends always take highest priority. See Configuration
# Local dev: sidecar via docker compose (bun run db:up)
ATLAS_SANDBOX_URL=http://localhost:8080
# Production: sidecar as a separate service
ATLAS_SANDBOX_URL=http://sandbox-sidecar:8080
# Optional: shared secret for sidecar auth
SIDECAR_AUTH_TOKEN=your-shared-secret
# Self-hosted: nsjail for process isolation
ATLAS_SANDBOX=nsjail
# Optional: tune limits
ATLAS_NSJAIL_TIME_LIMIT=10
ATLAS_NSJAIL_MEMORY_LIMIT=256

Networking & CORS

VariableDefaultDescription
ATLAS_PUBLIC_URLPublic 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_URLNext.js frontend: cross-origin API URL. When unset, same-origin via Next.js rewrites
NEXT_PUBLIC_ATLAS_AUTH_MODEEnables proxy-level route protection in the Next.js frontend. When set to managed, unauthenticated users are redirected to /signup. Other auth modes skip proxy enforcement
ATLAS_API_URLhttp://localhost:3001Rewrite target for same-origin mode (only used when NEXT_PUBLIC_ATLAS_API_URL is unset)
# Production: cross-origin setup
ATLAS_CORS_ORIGIN=https://app.example.com
NEXT_PUBLIC_ATLAS_API_URL=https://api.example.com
ATLAS_PUBLIC_URL=https://api.example.com

Data Residency

Settings for multi-region deployments with per-workspace region routing. See also residency in atlas.config.ts and the Data Residency guide.

VariableDefaultDescription
ATLAS_API_REGIONRegion identity of this API instance (e.g. us-west, eu-west, ap-southeast). Used for misrouting detection. Falls back to residency.defaultRegion from config if unset
ATLAS_STRICT_ROUTINGfalseWhen true, misrouted requests receive 421 Misdirected Request with a correctApiUrl hint instead of being served with a warning log
ATLAS_INTERNAL_SECRETShared secret for cross-region service-to-service auth. Required for region migration operations. Both the source and target API instances must share the same secret

Appearance

VariableDefaultDescription
ATLAS_BRAND_COLORoklch(0.759 0.148 167.71)Primary brand color in oklch format. Used for theme tokens across the chat UI and admin console

Actions

Action framework settings. These can also be configured via atlas.config.ts. See the Actions guide for the full setup.

VariableDefaultDescription
ATLAS_ACTIONS_ENABLEDSet true to enable the action framework (approval-gated write operations)
ATLAS_ACTION_APPROVALmanualDefault approval mode for actions: auto, manual, or admin-only
ATLAS_ACTION_TIMEOUTPer-action execution timeout in milliseconds
ATLAS_ACTION_MAX_PER_CONVERSATIONMaximum number of actions allowed per conversation
ATLAS_EMAIL_ALLOWED_DOMAINSComma-separated list of allowed email recipient domains for the email action plugin. When unset, all domains are allowed
# Enable actions with admin-only approval
ATLAS_ACTIONS_ENABLED=true
ATLAS_ACTION_APPROVAL=admin-only
# Restrict email recipients to your domain
ATLAS_EMAIL_ALLOWED_DOMAINS=example.com,trusted-partner.com

Scheduler

Scheduled task execution. Can also be configured via atlas.config.ts. See Scheduled Tasks for the full guide.

VariableDefaultDescription
ATLAS_SCHEDULER_ENABLEDSet true to enable scheduled task execution
ATLAS_SCHEDULER_BACKENDbunExecution backend: bun, webhook, or vercel
ATLAS_SCHEDULER_SECRETShared secret for the /tick endpoint (non-Vercel). On Vercel, use CRON_SECRET instead
CRON_SECRETVercel-native alternative to ATLAS_SCHEDULER_SECRET. When set, the /tick endpoint requires Authorization: Bearer <secret>. Takes precedence over ATLAS_SCHEDULER_SECRET
ATLAS_SCHEDULER_MAX_CONCURRENT5Max concurrent task executions per tick
ATLAS_SCHEDULER_TIMEOUT60000Per-task timeout in milliseconds
ATLAS_SCHEDULER_TICK_INTERVAL60Tick 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.

Dynamic Learning

VariableDefaultDescription
ATLAS_LEARN_CONFIDENCE_THRESHOLD0.7Minimum confidence score (0–1) for a learned pattern to be eligible for auto-promotion. Used by the atlas learn CLI command and the dynamic learning loop. Can also be set via atlas.config.ts

Python Tool

VariableDefaultDescription
ATLAS_PYTHON_ENABLEDSet true to enable the executePython agent tool. Requires ATLAS_SANDBOX_URL to be set (Python runs in the sandbox sidecar for isolation)
ATLAS_PYTHON_TIMEOUT30000Python execution timeout in milliseconds

See Python Tool for the full guide.


Email Delivery

VariableDefaultDescription
RESEND_API_KEYResend API key for email delivery in scheduled tasks and onboarding emails
ATLAS_EMAIL_FROMAtlas <noreply@useatlas.dev>From address for scheduled task and onboarding emails
ATLAS_SMTP_URLWebhook URL for email delivery (POST JSON with from, to, subject, html). Alternative to Resend
ATLAS_ONBOARDING_EMAILS_ENABLEDfalseEnable automated onboarding drip campaign for new signups. Requires DATABASE_URL and either RESEND_API_KEY or ATLAS_SMTP_URL

Slack Integration

VariableDefaultDescription
SLACK_SIGNING_SECRETEnables Slack integration. Used to verify request signatures
SLACK_BOT_TOKENSingle-workspace mode (skip OAuth)
SLACK_CLIENT_IDMulti-workspace OAuth app client ID
SLACK_CLIENT_SECRETMulti-workspace OAuth app client secret

See Slack guide for the full setup.


Discord Integration

VariableDefaultDescription
DISCORD_CLIENT_IDDiscord OAuth application client ID. Enables Discord integration routes. Required for Discord OAuth connect flow
DISCORD_CLIENT_SECRETDiscord OAuth application client secret. Required for Discord OAuth token exchange
# Discord integration for guild (server) authorization
DISCORD_CLIENT_ID=123456789012345678
DISCORD_CLIENT_SECRET=your-discord-client-secret

Teams Integration

VariableDefaultDescription
TEAMS_APP_IDMicrosoft Teams app ID. Enables Teams integration routes. Required for Teams connect flow
# Teams integration via Azure AD admin consent
TEAMS_APP_ID=your-teams-app-id

JIRA Integration

VariableDefaultDescription
JIRA_BASE_URLJira instance URL (e.g. https://yourorg.atlassian.net)
JIRA_EMAILJira account email for API authentication
JIRA_API_TOKENJira API token. Generate at id.atlassian.com
JIRA_DEFAULT_PROJECTDefault project key for issue creation (e.g. PROJ). Can be overridden per-action

Requires the action framework to be enabled (ATLAS_ACTIONS_ENABLED=true).

# JIRA integration for the createJiraTicket action
JIRA_BASE_URL=https://yourorg.atlassian.net
JIRA_EMAIL=you@example.com
JIRA_API_TOKEN=your-api-token
JIRA_DEFAULT_PROJECT=PROJ

Stripe Billing

Stripe billing integration for SaaS deployments. Self-hosted deployments do not need these — the self-hosted experience has no billing or usage limits.

VariableDefaultDescription
STRIPE_SECRET_KEYStripe secret key (test or live). Enables billing routes and Better Auth Stripe plugin when set
STRIPE_WEBHOOK_SECRETStripe webhook signing secret for verifying webhook events
STRIPE_TEAM_PRICE_IDStripe Price ID for the Team plan (monthly)
STRIPE_TEAM_ANNUAL_PRICE_IDStripe Price ID for the Team plan (annual discount)
STRIPE_ENTERPRISE_PRICE_IDStripe Price ID for the Enterprise plan

When STRIPE_SECRET_KEY is set, billing routes are mounted at /api/v1/billing and the Better Auth Stripe plugin handles checkout, webhooks, and subscription lifecycle at /api/auth/stripe/*.

For local development, use Stripe CLI to forward webhooks:

stripe listen --forward-to localhost:3001/api/auth/stripe/webhook

Enterprise

VariableDefaultDescription
ATLAS_DEPLOY_MODEautoDeployment mode: saas (hosted product features, enterprise-gated), self-hosted, or auto (detect from environment). When auto, resolves to saas if enterprise is enabled and an internal database is configured
ATLAS_ENTERPRISE_ENABLEDfalseSet true to enable enterprise features (SSO, SCIM, PII detection, custom roles). Requires a valid license key for production use
ATLAS_ENTERPRISE_LICENSE_KEYLicense key for enterprise features. Obtain from useatlas.dev/enterprise
ATLAS_APPROVAL_EXPIRY_HOURS24Hours before pending approval requests auto-expire. See Approval Workflows

These can also be configured via atlas.config.ts.

SLA Monitoring

SaaS only. Thresholds for SLA alerting.

VariableDefaultDescription
ATLAS_SLA_LATENCY_P99_MSP99 latency threshold in milliseconds. When unset, the system applies an internal default of 5000ms for alert evaluation
ATLAS_SLA_ERROR_RATE_PCTError rate threshold as a percentage (0–100). When unset, the system applies an internal default of 5% for alert evaluation
ATLAS_SLA_WEBHOOK_URLWebhook URL for SLA alert notifications. Receives POST requests with alert payloads

Backups

SaaS only. Automated internal database backups.

VariableDefaultDescription
ATLAS_BACKUP_SCHEDULE0 3 * * *Cron expression (5 fields) for automated backup schedule
ATLAS_BACKUP_RETENTION_DAYS30Number of days to retain backups before automatic deletion
ATLAS_BACKUP_STORAGE_PATH./backupsDirectory path for backup file storage. Must not contain ..

Custom Domains (Railway)

SaaS only. Required for custom domain support via Railway.

VariableDefaultDescription
RAILWAY_API_TOKENWorkspace-scoped Railway API token
RAILWAY_PROJECT_IDRailway project ID for the Atlas deployment
RAILWAY_ENVIRONMENT_IDRailway environment ID (e.g. production)
RAILWAY_WEB_SERVICE_IDRailway service ID for the web service (custom domains point here)

Demo Mode

VariableDefaultDescription
ATLAS_DEMO_ENABLEDfalseEnable demo mode at /demo. Allows unauthenticated users to try Atlas against the sample database with an email gate
ATLAS_DEMO_RATE_LIMIT_RPM10Max requests per minute per demo user
ATLAS_DEMO_MAX_STEPS10Max agent steps per demo request (lower than authenticated default of 25)

Requires BETTER_AUTH_SECRET for demo token signing.


Runtime

VariableDefaultDescription
PORT3001HTTP port for the standalone Hono API server. Most platforms (Railway, Vercel) set this automatically

Settings

VariableDefaultDescription
ATLAS_SETTINGS_REFRESH_INTERVAL30000Hot-reload interval for settings in milliseconds (default: 30s). Controls how often the API re-reads workspace-level settings from the database. Set to 0 to disable periodic refresh

Status Page

VariableDefaultDescription
NEXT_PUBLIC_STATUS_URLExternal status page URL. When set, the built-in status page redirects here and the app shows incident banners from the feed
NEXT_PUBLIC_OPENSTATUS_SLUGOpenStatus status page slug for JSON feed. Used to fetch and display incident banners in the web frontend

Logging & Observability

VariableDefaultDescription
ATLAS_LOG_LEVELinfoPino log level: trace, debug, info, warn, error, fatal
OTEL_EXPORTER_OTLP_ENDPOINTOpenTelemetry collector endpoint (e.g. http://localhost:4318). When set, the API server (atlas-api) and web frontend (atlas) emit distributed trace spans for HTTP requests, agent steps, SQL queries, and explore commands

See Observability for the full setup guide.


See Also

  • Configuration — Declarative atlas.config.ts for multi-datasource, plugins, and RLS
  • Deploy — Platform-specific env var setup for Railway, Vercel, and Docker
  • Authentication — Auth mode setup and required variables
  • CLI Referenceatlas doctor validates your environment configuration
  • Troubleshooting — Diagnosing startup errors from missing or invalid variables
Edit on GitHub

Last updated on

On this page