How to Self-Host LLM Gateway
Deploy LLM Gateway locally or in the cloud using our unified Docker image or split services.

Option 1: Unified Docker Image (Easiest)
docker run -d \--name llmgateway \--restart unless-stopped \-p 3002:3002 -p 3005:3005 -p 4001:4001 -p 4002:4002 \-v ~/llmgateway_data:/var/lib/postgresql/data \-e AUTH_SECRET=your-secret-key-here \ghcr.io/theopenco/llmgateway-unified:latest
docker run -d \--name llmgateway \--restart unless-stopped \-p 3002:3002 -p 3005:3005 -p 4001:4001 -p 4002:4002 \-v ~/llmgateway_data:/var/lib/postgresql/data \-e AUTH_SECRET=your-secret-key-here \ghcr.io/theopenco/llmgateway-unified:latest
Prefer pinning the image to the latest release tag. You can also run it via Docker Compose.
Option 2: Split Services via Docker Compose
git clone https://github.com/theopenco/llmgateway.gitcd llmgatewaycp .env.example .env# edit .envdocker compose -f infra/docker-compose.split.yml up -d
git clone https://github.com/theopenco/llmgateway.gitcd llmgatewaycp .env.example .env# edit .envdocker compose -f infra/docker-compose.split.yml up -d
Access
- Web: http://localhost:3002
- Docs: http://localhost:3005
- API: http://localhost:4002
- Gateway: http://localhost:4001
See the full guide: Self Host
.