Self-Hosting Future AGI: Deploy on Your Own Infrastructure
Deploy the full Future AGI platform on your own infrastructure using Docker Compose. Follow the step-by-step guide to get all services running locally.
About
Future AGI is fully open-source. Self-hosting runs the entire stack on your machines — all traces, datasets, evaluations, and model calls stay within your network. Backend is Django, frontend is React + Vite, LLM gateway is Go.
Not sure if you need this? The hosted version at app.futureagi.com is easier to operate. Self-host when you need data residency, air-gapped environments, cost control at scale, or deep customization.
Quick start
git clone https://github.com/future-agi/future-agi.git
cd future-agi
cp .env.example .env
docker pull futureagi/future-agi:v1.8.19_base
docker compose up
First boot builds from source (~10–15 min). After Application startup complete:
| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Backend API | http://localhost:8000 |
| PeerDB UI | http://localhost:3001 — peerdb / peerdb |
Deployment options
| Option | Status |
|---|---|
| Docker Compose | Available |
| Helm / Kubernetes | Coming soon |
| Air-gapped | Coming soon |
Architecture
21 containers across four layers.
Browser
└─ frontend (React/nginx)
└─ backend (Django) ──── gateway (Go) ──── OpenAI · Anthropic · Gemini · Bedrock
├── postgres primary DB + WAL replication
├── clickhouse analytics store
├── redis cache / pub-sub
├── minio object storage
└── temporal ──── worker background jobs / eval pipelines
postgres ──── PeerDB CDC ──── clickhouse (continuous replication)
Application — frontend · backend · worker · gateway · serving · code-executor
Data — postgres · clickhouse · redis · minio
Workflow — temporal
CDC (PeerDB) — peerdb-catalog · peerdb-temporal · peerdb-minio · peerdb-flow-api · peerdb-flow-worker · peerdb-flow-snapshot-worker · peerdb-server · peerdb-ui · peerdb-temporal-init · peerdb-init
| Layer | Service | Purpose |
|---|---|---|
| App | frontend | React SPA served by nginx |
| App | backend | Django REST + gRPC + WebSocket API |
| App | worker | Temporal worker — evals, agent loops, data jobs |
| App | gateway | Go LLM proxy — routing, retries, rate limits, logging |
| App | serving | Embeddings and small model inference |
| App | code-executor | nsjail-sandboxed eval code runner (privileged: true required) |
| Data | postgres | Primary DB — users, traces, datasets, evals, prompts |
| Data | clickhouse | Analytics DB — replicated from Postgres via PeerDB |
| Data | redis | Cache, rate limits, WebSocket pub/sub |
| Data | minio | S3-compatible object storage (swap for S3 in prod) |
| Workflow | temporal | Durable workflow engine — shares main Postgres |
| CDC | PeerDB stack | Continuous Postgres → ClickHouse replication (10 services) |
Next Steps
Requirements
Hardware tiers, platform compatibility, ports reference.
Docker Compose
Setup, deployment modes, day-to-day operations.
Environment Variables
Full .env reference — secrets, ports, flags, keys.
System Configuration
LLM gateway providers, PeerDB mirrors, Temporal workers.
User Management
Create accounts via email or Django shell.
Production
Hardening, backups, monitoring, upgrades.
Troubleshooting
Solutions for every known error.
Questions & Discussion