Self-hosted AI gateway. Route, translate , with access keys, budgets, and a built-in dashboard.
5.8K
Self-hosted AI gateway — one endpoint, format translation, fallback routing, token saving, spend control, access keys, built-in dashboard.

Endpoint page — token saver toggles & endpoint config
Every AI app speaks a different API format. Every provider has different keys, models, and rate limits. aigloo fixes this. One local endpoint, one key. Point any app at it — Claude Code, opencode, Cursor, Codex, or anything that supports a custom base URL. It translates formats, routes across providers with automatic fallback, compresses token-heavy context, and tracks every cent.
docker run -d \
-p 18080:18080 \
-v "$HOME/.aigloo:/data" \
--name aigloo \
xk1ko/aigloo:latest
Open http://localhost:18080 — default password: 123456 (change it in Settings after logging in).
services:
aigloo:
image: xk1ko/aigloo:latest
ports:
- "18080:18080"
volumes:
- ./data:/data
restart: unless-stopped
docker compose up -d
Your tools aigloo Providers
────────── ──────────────────── ──────────────
Claude Code ──┐ ┌──► Anthropic
opencode ──┤ format translation ├──► OpenAI
Cursor ──┼─► routing & fallback ─────┼──► OpenRouter
Codex ──┤ token compression ├──► Gemini
any app* ──┘ spend tracking └──► Ollama / custom
▲
│
one endpoint
one API key
* any app that supports a custom base URL + API key
provider/model directly (key round-robin) or define combo aliases for multi-provider fallback chains.http://localhost:18080 with a gateway key.provider/model direct (key round-robin) or combo aliases with multi-provider fallback chains; auto-rotates keys on 429/5xx/timeout

Access Keys — model allowlist, rate limit, spend cap per key

Budgets — rolling spend caps with live countdown
# Claude Code (Anthropic format)
export ANTHROPIC_BASE_URL=http://localhost:18080
export ANTHROPIC_API_KEY=my-key
# opencode / Cursor / Cline / Codex (OpenAI format)
export OPENAI_BASE_URL=http://localhost:18080/v1
export OPENAI_API_KEY=my-key
Model resolution (in order): combo alias → provider/model.
Any app that supports a custom base URL + API key works — just set the model to provider/model.
Claude Code · opencode · Cursor · Codex · Cline · Continue · Roo · Aider · Gemini CLI · Qwen Code · Kilo Code · Crush · Droid · Copilot
Everything is configurable from the dashboard — providers, combos, budgets, token savers, access keys, settings. Under the hood, config.yaml is the source of truth and hot-reloads — dashboard changes write to it instantly; hand edits apply without restart.
Mount /data to persist config, auth, and usage history between container rebuilds:
-v "$HOME/.aigloo:/data"
Without a mount, data lives inside the container and is lost on docker rm. Layout:
/data/
├── config.yaml # providers, combos, endpoint settings
├── auth.json # admin password hash
├── session-secret # random, generated on first boot — do not hardcode
└── usage.sqlite # usage/quota/savings history
docker run -d \
-p 18080:18080 \
-v "$HOME/.aigloo:/data" \
-e AIGLOO_ADMIN_PASSWORD=your-password \
-e AIGLOO_PORT=18080 \
--name aigloo \
xk1ko/aigloo:latest
SESSION_SECRET is optional — leave it unset and the container generates and persists a random one to /data/session-secret on first boot. Set it explicitly only for multi-instance fleets.
docker logs -f aigloo # view logs
docker stop aigloo # stop
docker start aigloo # start again
docker rm -f aigloo # remove
docker pull xk1ko/aigloo:latest
docker rm -f aigloo
# re-run the quick start command
| Port | 18080/tcp |
| Data dir | /data (env AIGLOO_DATA_DIR) |
| Base | Node.js 22 |
| License | MIT |
| Source | https://github.com/xk1ko/aigloo |
| Platforms | linux/amd64, linux/arm64 |
Content type
Image
Digest
sha256:55339657d…
Size
89.6 MB
Last updated
4 months ago
docker pull xk1ko/aigloo