Skip to main content

Self-Hosting

Two different things are called 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​

ServiceImageMemory
APIghcr.io/deaxu/archgraph-api:latest1 GB
Workerghcr.io/deaxu/archgraph-api:latest2 GB
Neo4jneo4j:5-community2 GB
PostgreSQLpostgres:16-alpine512 MB
Redisredis:7-alpine256 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).