GAIA is several apps (API, web, bots) talking to several services (PostgreSQL, MongoDB, Redis, LLM providers, OAuth integrations). Environment variables are how each app finds those services and authenticates with them. If you’re self-hosting or developing locally, this page is the reference for what goes in each .env file and what happens when something is missing.You rarely need all of them: a minimal local setup needs only the database URLs and auth keys shown in Manual Setup below. Everything else enables a specific feature, skip a key and that feature is disabled, but the app still runs.GAIA uses Pydantic settings to load environment variables with validation. Settings are defined in apps/api/app/config/settings.py with two modes:
Development: Most keys optional, missing ones just disable features
Production: All integration keys required for full functionality
Variables are lazily loaded: the app starts even with missing keys.
Automated Setup: The GAIA CLI automatically discovers required environment variables from your codebase using Python AST parsing (for API) and source analysis (for Web). Run gaia init to skip manual configuration.
DISCORD_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.
GAIA’s memory runs on a self-hosted engine (PostgreSQL + ChromaDB + local
embeddings) — no external API keys are required. All variables below are
optional and have sensible defaults.
Variable
Description
GAIA_EMBEDDING_MODEL
Embedding model name (default mixedbread-ai/mxbai-embed-large-v1)
GAIA_EMBEDDING_DIM
Embedding vector dimension (default 1024)
MEMORY_EMBEDDING_SIDECAR_URL
URL of a shared embedding sidecar; loads the model in-process when unset
GAIA_CHROMA_COLLECTION_SUFFIX
Suffix appended to ChromaDB collection names (for isolating environments)
# EnvironmentENV=developmentHOST=http://localhost:8000FRONTEND_URL=http://localhost:3000# Databases (Docker defaults)MONGO_DB=mongodb://mongo:27017/gaiaREDIS_URL=redis://redis:6379POSTGRES_URL=postgresql://postgres:postgres@postgres:5432/langgraphCHROMADB_HOST=chromadbCHROMADB_PORT=8000RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/# Auth (required)WORKOS_API_KEY=sk_test_xxxxWORKOS_CLIENT_ID=client_xxxxWORKOS_COOKIE_PASSWORD=your-32-character-random-secret# Google OAuth (optional in dev)GOOGLE_CLIENT_ID=xxxx.apps.googleusercontent.comGOOGLE_CLIENT_SECRET=GOCSPX-xxxx# AI (add what you need)OPENAI_API_KEY=sk-xxxxGOOGLE_API_KEY=AIza-xxxx# Search & ToolsTAVILY_API_KEY=tvly-xxxxFIRECRAWL_API_KEY=fc-xxxx# MediaCLOUDINARY_CLOUD_NAME=your-cloudCLOUDINARY_API_KEY=xxxxCLOUDINARY_API_SECRET=xxxx# MonitoringSENTRY_DSN=https://xxxx@sentry.io/xxxxPOSTHOG_API_KEY=phc_xxxx