Self-Hosting
This page covers running the hosted product's stack on your own server: the API, the databases, and the Cloudflare Worker gateway in front of them. Identity still goes through Clerk and the MCP endpoint is still the gateway.
If you want ArchGraph with no identity provider and no gateway — the profile for an internal network or an air-gapped host — that is a different configuration with a different compose file. See On-premise.
ArchGraph can be self-hosted using Docker Compose. The infrastructure configuration is maintained in the archgraph-infra repository.
Requirements
- Docker and Docker Compose
- 4 vCPU, 8 GB RAM minimum
- 50 GB disk space
Quick start
git clone https://github.com/Deaxu/archgraph-infra.git
cd archgraph-infra
cp .env.example .env
# Edit .env with your passwords and configuration
./scripts/deploy.sh
This is the production profile. The on-premise profile uses
.env.onprem.example and docker-compose.onprem.yml instead — see
On-premise.
Services
| Service | Image | Memory |
|---|---|---|
| API | ghcr.io/deaxu/archgraph-api:latest | 1 GB |
| Worker | ghcr.io/deaxu/archgraph-api:latest | 2 GB |
| Neo4j | neo4j:5-community | 2 GB |
| PostgreSQL | postgres:16-alpine | 512 MB |
| Redis | redis:7-alpine | 256 MB |
MCP Gateway
For the MCP gateway (Cloudflare Workers), see the archgraph-gateway repository. You can either use the hosted version at mcp.archgraph.dev or deploy your own Worker.
Backups
Use the provided backup script to dump Neo4j and PostgreSQL:
./scripts/backup.sh
This creates database dumps and uploads them to Cloudflare R2 (requires rclone configuration).