selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
CliRelay logo

Self-host CliRelay

v0.5.9

AI gateway for coding CLIs with multi-tenant control panel

BetaOpen SourceMIT
Updatedlast week
LanguageGo
Setup difficultyModerate
ThemeDark mode
Stars
1 044
Ports
8317 (API and control panel), 8085 (Management API (localhost only)), 1455 (Internal service (localhost only)), 54545 (Internal service (localhost only)), 51121 (Internal service (localhost only)), 11451 (Internal service (localhost only))
Requires
PostgreSQL, Redis
Docker
ghcr.io/kittors/clirelay
Install with Docker Compose
Monitor center showing health score, live traffic and golden-signal tilesMonitor center traffic and reliability trends with latency distribution and failure analysisMonitor center channel health, portal user ranking, traffic flow and weekday-hour heatmapDashboard with request, token, cost and cache KPIs and live system monitorRequest log table with channel, user, cache and token columnsModel performance table with latency, first token, speed, tokens and costMonitor center in dark themeAdd AI account dialog grouped by browser sign-in, device code and credential importCredential import with risk notice, steps and bulk paste

What is CliRelay?

CliRelay is a self-hosted AI gateway that consolidates your AI coding subscriptions and API keys behind a single endpoint compatible with OpenAI, Claude, Gemini, and Codex clients. It provides a multi-tenant web console at /manage for adding upstream accounts through OAuth sign-in, credential import, or API keys. You can manage client keys with spending quotas and rate limits, route requests across channel groups with automatic failover, and view detailed request logs showing token usage and cost. The proxy handles translation between OpenAI Chat/Responses, Anthropic Messages, and Gemini protocols. It requires PostgreSQL 15+ for persistent data and Redis 7+ for caches, locks, and rate limits. Deployment uses Docker Compose, which also runs an updater sidecar for in-panel updates. The project extends CLIProxyAPI with a management layer, control panel, and operational features.

Should you self-host CliRelay?

CliRelay scores 51/100 on selfhost.directory (how scoring works). It has 1 044 GitHub stars.

It shipped 10 stable releases in the past year. The latest, v0.5.9, came out on 11 October 2026. New versions land roughly every 2 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Features

  • Automatic failover and routing
  • In-panel updates
  • Protocol translation
  • Request logging and monitoring
  • Spend quotas and rate limits
  • Terminal UI
  • Web Control Panel

CliRelay README

How to install CliRelay

Install CliRelay with Docker Compose

Environment variables
CLIRELAY_ADMIN_PASSWORD, CLIRELAY_POSTGRES_PASSWORD, CLIRELAY_UPDATER_TOKEN (auto-generated on first start)

git clone https://github.com/kittors/CliRelay.git cd CliRelay

Linux bind mounts need write access for the non-root container user:

sudo chown -R 10001:10001 auths logs data

docker compose up -d

Starts CliRelay, PostgreSQL 15, Redis 7, and the updater sidecar. Container runs as user 10001:10001.

CliRelay releases & version history

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…