Skip to main content

Environment variables

All configuration comes from the environment. See .env.example in the repo root. Secrets must come from a secret store in production, never a committed file.

Postgres

VariableNotes
POSTGRES_USERDefault zeallm
POSTGRES_PASSWORDRequired — compose fails if unset
DATABASE_URLFull URL; local tooling uses host port 55432

Portal

VariableNotes
AUTH_SECRETNextAuth secret (32 random bytes). Rotating invalidates sessions
AUTH_URLPortal public URL
ZEALLM_ENCRYPTION_KEYAES-256-GCM master key (64 hex / base64) or akv:<secret-name>
ZEALLM_ENCRYPTION_KEY_FALLBACKPrevious key during rotation
ZEALLM_ADMIN_EMAILSComma-separated bootstrap admins
ZEALLM_ALLOWED_DOMAINEmail domain restriction
AUTH_DEV_BYPASStrue = password-less sign-in. Dev only
AZURE_AD_CLIENT_ID / _SECRET / _TENANT_IDEntra ID SSO (required in production)
NEXT_PUBLIC_DOCS_URLDocumentation site URL. Default http://localhost:3002
ZEAGATE_PUBLIC_URLPublic gateway URL shown to clients (portal only)
OPENAI_API_KEYSeeds an OpenAI credential on first portal boot

Gateway

VariableNotes
DATABASE_URLRequired
ZEALLM_ENCRYPTION_KEYRequired
REDIS_URLShared rate limits + cache invalidation
ZEALLM_TIMEZONEBudget reset timezone (default UTC)
ZEALLM_BUDGET_RESET_TIMEHH:MM (default 00:00)
AZURE_KEY_VAULT_URLResolves akv: refs
ZEAGATE_PORTListen port (default 8080)
ZEAGATE_CACHE_TTL_SECONDSIn-memory cache TTL (default 15)
ZEALLM_PORTAL_URLPortal URL for gateway internals

Email

VariableNotes
SMTP_HOSTOptional; without it invites still create accounts
SMTP_PORTDefault 587
SMTP_USER / SMTP_PASS / SMTP_FROMSMTP auth and from-address

Do not reuse developer .env values in production. Generate fresh secrets and rotate anything that was ever shared.