Self-Hosting
Deploy the full Future AGI platform on your own infrastructure with Docker Compose.
About
Future AGI is the complete platform to test, guard, and monitor AI agents. Build self-improving agents that ship smarter with every version. Self-hosting runs the entire platform on your infrastructure. The backend is built on Django, the frontend on React + Vite. All data stays on your machines.
When to self-host
- Data residency or compliance: Traces, datasets, and evaluation outputs never leave your network.
- Air-gapped environments: Run without outbound internet access (air-gapped support is coming; Docker Compose today assumes outbound access for pulling base images and LLM APIs).
- Cost control at scale: For high-volume workloads, run your own infrastructure instead of the hosted plan.
- Customization: Modify any part of the platform to fit internal systems.
If none of these apply, the hosted version at app.futureagi.com is easier to operate.
Deployment options
| Option | Status |
|---|---|
| Docker Compose | Available |
| Helm Charts (Kubernetes) | Coming soon |
| Air-gapped | Coming soon |
Prerequisites
| Requirement | Minimum | Recommended |
|---|---|---|
| RAM | 8 GB | 16 GB |
| Disk | 20 GB free | 50 GB+ |
| CPU | 4 cores | 8 cores |
| Docker | 24.0+ | Latest stable |
| Docker Compose | v2.20+ | Latest stable |
| Python | 3.11 | 3.11 |
Install Docker and Compose
Install Docker Desktop for Mac, or use Colima for a lighter alternative:
brew install docker docker-compose colima
colima start --cpu 4 --memory 8 --disk 64If using Docker Desktop, go to Settings > Resources and set RAM to at least 8 GB and disk to 64 GB.
sudo apt-get update
sudo apt-get install -y docker.io docker-compose-v2
sudo systemctl start docker && sudo systemctl enable docker
sudo usermod -aG docker $USERLog out and back in for the group change to take effect.
Install Docker Desktop for Windows with WSL 2 backend enabled.
Verify:
docker --version # 24.0+
docker compose version # v2.20+
Clone the repository
- Fork the repository on GitHub.
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/future-agi.git
cd future-agi
cp .env.example .env
Configure environment
Replace every CHANGEME value in .env:
openssl rand -hex 32 # for SECRET_KEY and AGENTCC_INTERNAL_API_KEY
openssl rand -base64 24 # for PG_PASSWORD
| Variable | What it’s for |
|---|---|
SECRET_KEY | Django session signing and CSRF |
PG_PASSWORD | PostgreSQL password |
AGENTCC_INTERNAL_API_KEY | Shared secret between backend and gateway |
Tip
For a quick local test, the stack boots fine without changing anything. The CHANGEME values only matter when you expose the instance to others.
Run the Stack
docker compose up
To run in the background:
docker compose up -d
docker compose logs -f backend # watch startup progress
Once all services are up, open the frontend and backend:
- Frontend: http://localhost:3031
- Backend API: http://localhost:8000
Verify all services are healthy:
docker compose ps
Create your account
The email registration flow requires Mailgun credentials (MAILGUN_API_KEY and MAILGUN_SENDER_DOMAIN in .env). Without Mailgun, create a user via the Django shell:
docker compose exec backend python manage.py shell -c "
from django.contrib.auth.hashers import make_password
from accounts.models import User
User.objects.create(email='you@example.com', password=make_password('your-password'))
"
Log in with those credentials.
Stop, reset, and upgrade
# Stop (data persists in Docker volumes)
docker compose down
# Stop and wipe all data (fresh start)
docker compose down -v
# Upgrade to latest
git pull
docker compose build
docker compose up -d
Note
Migrations run automatically on boot. If a migration fails after an upgrade, run docker compose exec backend python manage.py migrate manually and check the release notes.
Development mode
Use the dev overlay for hot reload and per-queue workers:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up
This adds hot reload for backend code, per-queue Temporal workers, exposed database ports, and a Temporal UI.
Production checklist
Before exposing to users:
- Replace every
CHANGEMEvalue in.env - Set
ENV_TYPE=prodandFAST_STARTUP=false - Put a reverse proxy (Caddy, Nginx, or Traefik) in front for TLS
- Replace Compose databases with managed equivalents (RDS, ClickHouse Cloud, ElastiCache, S3)
- Increase backend workers (
GRANIAN_WORKERSin.env) to match your CPU count - Set up backups for PostgreSQL (
pg_dump) and ClickHouse (BACKUP) - Use a secrets manager instead of a plain
.envfile
Troubleshooting
| Problem | Fix |
|---|---|
| First build takes 10+ minutes | Normal. Images build from source. Subsequent starts are under 30 seconds. |
| Container keeps restarting | Run docker compose logs SERVICE_NAME. Usually a missing env var or port conflict. All ports are configurable in .env. |
| Backend never shows startup complete | Allocate at least 8 GB RAM to Docker. Check with docker info. |
| Frontend shows blank page | The VITE_HOST_API variable in .env must match the backend URL accessible from your browser. Changing it requires rebuilding: docker compose build frontend. |
For anything not listed, open an issue at github.com/future-agi/future-agi/issues with the output of docker compose logs.