Self-Hosting Environment Variables
Full .env reference for self-hosted Future AGI — secrets, database credentials, runtime flags, LLM provider keys, email, and frontend build-time configuration.
About
Reference for every environment variable the stack reads from .env. Grouped by purpose: secrets, database credentials, runtime flags, LLM provider keys, email, and frontend build-time config.
cp .env.example .env
The stack boots fine with defaults. Replace CHANGEME secrets before sharing with others.
Required secrets
| Variable | Generate with | Used by |
|---|---|---|
SECRET_KEY | openssl rand -hex 32 | Django sessions, CSRF, password reset |
PG_PASSWORD | openssl rand -base64 24 | PostgreSQL auth |
MINIO_ROOT_PASSWORD | openssl rand -base64 24 | MinIO object storage auth |
AGENTCC_INTERNAL_API_KEY | openssl rand -hex 32 | Backend ↔ gateway shared secret |
Database credentials
| Variable | Default | Notes |
|---|---|---|
PG_USER | futureagi | PostgreSQL username |
PG_PASSWORD | CHANGEME | Must change |
PG_DB | futureagi | PostgreSQL database name |
MINIO_ROOT_USER | futureagi | MinIO username |
MINIO_ROOT_PASSWORD | CHANGEME | Must change |
CH_USE_REPLICATED_ENGINES | false | true only for multi-node ClickHouse |
Ports
All configurable. See Requirements → Ports reference for the full table with defaults and exposure scope.
Backend runtime
| Variable | Default | Description |
|---|---|---|
ENV_TYPE | development | development · staging · prod — prod mode disables debug output, enables check --deploy |
FAST_STARTUP | false | Skip migrations on restart (dev only). Always false in production. |
GRANIAN_WORKERS | 1 | ASGI worker processes. Set to CPU count in production. |
GRANIAN_THREADS | 2 | Threads per worker. |
ENABLE_GRPC | true | Enable gRPC endpoint. |
ENABLE_HTTP | true | Enable HTTP/REST endpoint. |
Temporal worker
| Variable | Default | Description |
|---|---|---|
TEMPORAL_NAMESPACE | default | Temporal namespace. |
TEMPORAL_ALL_QUEUES | true | Single worker polls all queues. Set false + use dev overlay for per-queue workers. |
TEMPORAL_MAX_CONCURRENT_ACTIVITIES | 50 | Max concurrent activity tasks. |
TEMPORAL_MAX_CONCURRENT_WORKFLOW_TASKS | 50 | Max concurrent workflow tasks. |
LLM gateway
| Variable | Default | Description |
|---|---|---|
AGENTCC_INTERNAL_API_KEY | CHANGEME | Must change. Backend authenticates gateway calls with this. |
LLM provider keys
Leave blank for providers you’re not using.
| Variable | Provider |
|---|---|
OPENAI_API_KEY | OpenAI |
ANTHROPIC_API_KEY | Anthropic |
GOOGLE_API_KEY | Google Gemini |
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_REGION | AWS Bedrock + S3 |
Email (Mailgun)
Required for email-based sign-up and password reset. Without these, create users via the Django shell — see User Management.
| Variable | Description |
|---|---|
MAILGUN_API_KEY | Mailgun private API key |
MAILGUN_SENDER_DOMAIN | Verified Mailgun sending domain |
DEFAULT_FROM_EMAIL | From: address for outbound emails |
SERVER_EMAIL | Django admin error emails |
Frontend build-time
Warning
These are baked into the JS bundle at Vite build time. Changing them requires rebuilding: docker compose build frontend
| Variable | Default | Description |
|---|---|---|
VITE_HOST_API | http://localhost:8000 | Backend URL as seen by the browser. In production: your public backend URL. |
VITE_ENVIRONMENT | development | Frontend analytics and feature flags. |
Optional
| Variable | Default | Description |
|---|---|---|
RECAPTCHA_ENABLED | false | Enable reCAPTCHA on registration. |
RECAPTCHA_SECRET_KEY | — | reCAPTCHA v2/v3 server-side key. |
VITE_GOOGLE_SITE_KEY | — | reCAPTCHA client-side key (requires frontend rebuild). |
FUTURE_AGI_CLOUD_API_KEY | — | EE-tier Cloud features only. Leave blank for OSS. |
FUTURE_AGI_CLOUD_API_URL | https://api.futureagi.com | Do not change. |
Next Steps
Questions & Discussion