.env file does.
Most variables are optional. A missing key turns off one feature, and the app still starts.
How settings load
Settings live inapps/api/app/config/settings.py and run in one of three modes:
Manual setup (contributors)
1
Copy the example files
2
Set the minimum
In
apps/api/.env:AUTH_MODE=local gives email-and-password sign-in with no outside service. For WorkOS, use AUTH_MODE=workos and set the WorkOS variables.3
Start
API Environment Variables
On a self-hosted instance, the provider and tool keys (AI providers, search, Firecrawl, OpenWeather, LlamaParse, GitHub, Cloudinary, Google OAuth, Composio, Resend, E2B) can be set in Settings → Providers & Tools instead, where they are stored encrypted. The environment variable is used when nothing is saved there.
Always Required
These are required in every mode:
In production and self-host, these are also required:
Instance & Auth Mode
Environment & Deployment
Database & Message Queue
When using Docker Compose, these have sensible defaults.
Authentication & OAuth
AUTH_MODE selects the sign-in method: workos routes users through
WorkOS’s AuthKit hosted UI, while local enables first-party email +
password accounts (the self-host default, also usable in development so
contributors need no WorkOS account — the first account created becomes the
instance admin, and others join by invite link from Settings → Members). The
three WORKOS_*
variables are validated and required only when AUTH_MODE=workos.Computed OAuth callback URLs are generated automatically: -
WORKOS_REDIRECT_URI → {HOST}/api/v1/oauth/workos/callback -
GOOGLE_CALLBACK_URL → {HOST}/api/v1/oauth/google/callback -
COMPOSIO_REDIRECT_URI → {HOST}/api/v1/oauth/composio/callback -
DISCORD_OAUTH_REDIRECT_URI → {HOST}/api/v1/platform-auth/discord/callback -
SLACK_OAUTH_REDIRECT_URI → {HOST}/api/v1/platform-auth/slack/callbackDISCORD_OAUTH_CLIENT_ID and SLACK_OAUTH_CLIENT_ID are optional, without them, users must link their accounts using the /auth bot command instead of the web UI. See Discord Bot and Slack Bot for setup instructions.AI & Machine Learning
OpenAI-compatible gateways (OpenCode, Nous Research, or any custom endpoint) are also configured through Settings → Providers & Tools.
Search & Web Content
Media & Content Processing
External Integrations
Memory & Context
Memory runs locally on PostgreSQL, ChromaDB and a local embedding model. No keys are needed, and the defaults work.Tuning variables
Tuning variables
Payments
Self-host never contacts Dodo, so no payment keys are needed.
Voice Agent
Monitoring & Analytics
Web Environment Variables
Set these inapps/web/.env:
Full Example
Complete apps/api/.env example (development, local auth)
Complete apps/api/.env example (development, local auth)
Minimal apps/api/.env example (self-host)
Minimal apps/api/.env example (self-host)
gaia up generates this for you — shown here for reference:Generate the file for you
gaia up writes a complete self-host configuration. For a source checkout, run the interactive wizard:
.env.example, asks only for missing values, and checks the result.

