How to Self-Host LLM Gateway

Deploy LLM Gateway locally or in the cloud using our unified Docker image or split services.

LLM Gateway

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

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.git
cd llmgateway
cp .env.example .env
# edit .env
docker compose -f infra/docker-compose.split.yml up -d

Access

See the full guide: Self Host.

    How to Self-Host LLM Gateway - Blog - LLM Gateway