Claude Code Hub is an AI API proxy platform designed for teams and enterprises. It eliminates the friction of managing multiple AI providers by providing a unified endpoint for all of them. Smart load balancing, multi-tenant control, full API key lifecycle management, real-time monitoring, and cost analytics come standard—all wrapped in a modern, intuitive UI. Deploy with a single command and take full control over your model pricing and API complexity.
Manage OpenAI, Claude, Gemini, and other models through a single interface. Stop jumping between fragmented dashboards and disparate endpoints. By integrating once, you significantly reduce long-term development and maintenance overhead.
Distribute traffic according to custom weights. Automatic failover ensures high availability even if a specific provider experiences downtime. Session stickiness prevents user disconnections during model switches, maintaining a seamless experience mid-task.
Designed for organizational hierarchies. Assign granular permissions and usage quotas to specific users or teams. By setting independent limits for different departments, you ensure that high-volume engineering tasks don't exhaust the marketing team's budget.
Manage API keys with ease: generate, rotate, or expire them on demand. Set automated expiration dates to deprecate keys on schedule. Proactive rotation minimizes the "blast radius" should a secret ever be compromised.
Monitor request volume, track spending, and analyze performance via visual dashboards. Gain insights into cost trends, user activity rankings, and provider latency. Identify and resolve failures before they impact your end users.
A clean, responsive dashboard built with Shadcn UI, featuring a native dark mode. The interface is optimized for both desktop and mobile use, making it easy to manage your infrastructure from any device without needing a manual.
Leverage Docker to handle the heavy lifting. A single command spins up the entire stack, including automatic database migrations and health checks. Move from a fresh environment to a functional proxy in minutes.
You only need Docker and Docker Compose installed to get started.
The docker-compose.yaml file configures both the PostgreSQL database and the core application service:
services:
postgres:
image: postgres:18
container_name: claude-code-hub-db
restart: unless-stopped
ports:
- "35432:5432"
environment:
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
POSTGRES_DB: ${DB_NAME:-claude_code_hub}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-claude_code_hub}"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
app:
image: zsio/claude-code-hub:latest
container_name: claude-code-hub-app
depends_on:
postgres:
condition: service_healthy
env_file:
- ./.env
environment:
NODE_ENV: production
PORT: 23000
DSN: postgresql://${DB_USER:-postgres}:${DB_PASSWORD:-postgres}@postgres:5432/${DB_NAME:-claude_code_hub}
ports:
- "23000:23000"
restart: unless-stopped
volumes:
postgres_data:
driver: local
Open a terminal in the project directory and run:
# Start all services in detached mode
docker compose up -d
# Follow the logs to confirm a successful startup
docker compose logs -f
Run docker compose ps. Both containers should be listed as healthy or running.
Create a .env file in the project root and configure the following values:
# Admin login token (use a strong password)
ADMIN_TOKEN=!!!change-me-to-a-strong-password!!!
# Database settings
DB_USER=postgres
DB_PASSWORD=!!!change-me!!!
DB_NAME=claude_code_hub
| Variable | Required | Default | Purpose |
|---|---|---|---|
ADMIN_TOKEN |
✅ | change-me |
Token for admin dashboard access. |
DB_USER |
❌ | postgres |
Database username. |
DB_PASSWORD |
❌ | postgres |
Database password. Change this for production. |
DB_NAME |
❌ | claude_code_hub |
Name of the database. |
AUTO_MIGRATE |
❌ | true |
Automatically runs DB migrations on startup. |
# View logs
docker compose logs -f # All services
docker compose logs -f app # Application only
docker compose logs -f postgres # Database only
# Restart services
docker compose restart # Restart everything
docker compose restart app # Restart application only
# Stop services
docker compose stop # Stop containers (preserves state)
docker compose down # Stop and remove containers
# Update to the latest version
docker compose pull
docker compose up -d
# Database Backup
docker exec claude-code-hub-db pg_dump -U postgres claude_code_hub > backup_$(date +%Y%m%d_%H%M%S).sql
# Database Restore
docker exec -i claude-code-hub-db psql -U postgres claude_code_hub < backup.sql
# Reset (Warning: This deletes all data)
docker compose down -v
Navigate to http://localhost:23000 and log in using the ADMIN_TOKEN defined in your .env file.
claude-code-router to translate the protocols, then point Claude Code Hub to that router’s address.Point your API clients to the proxy endpoint. Comprehensive documentation is available at http://localhost:23000/usage-doc.
Under Settings → Price Management, define per-token pricing for input and output for each model. The system will automatically calculate usage costs and allow you to export reports for accounting.
Update the ADMIN_TOKEN in your .env file and run docker compose restart app.
If a port is already in use, modify the host port mapping in docker-compose.yaml:
services:
app:
ports:
- "8080:23000" # Change 8080 to any free port
postgres:
ports:
- "15432:5432" # Change 15432 to any free port
Restart the stack after saving your changes.
First, verify the database connection:
docker compose exec app sh -c 'echo "SELECT version();" | psql $DSN'
Check for specific migration errors in the logs:
docker compose logs app | grep -i migration
You can also attempt to trigger migrations manually:
docker compose exec app pnpm db:migrate
server {
listen 443 ssl http2;
server_name your-domain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:23000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Direct Support: Any provider offering a Claude Code-compatible API.
Indirect Support (via claude-code-router): Zhipu AI (GLM), Moonshot AI (Kimi), Packy, Alibaba Qwen, Baidu Wenxin, and others.
To set up indirect providers, deploy claude-code-router, configure your upstream services there, and then add the router's address as a provider within Claude Code Hub.
docker compose ps for status and docker stats for resource consumption.VACUUM ANALYZE and ensure frequently queried columns are indexed.
NOF0 Open Source AI Trading Arena Puts Crypto Models Head to Head
DupCheck: Open-Source Image Duplication & Tampering Detection (Python)
Grey Deer VPN: Residential IPs for Secure Global Access
One API Setup Guide: Manage LLM Keys and Access 100+ AI Models
Strapi Setup Guide: Local Development & Cloud Deployment
Perplexica: The Open-Source AI Search Engine Powered by Your Own LLMs
Trae Agent: Run Complex Dev Workflows With Plain English Prompts
AI看线: A-Share Analysis with K-Line Charts and Gemini AI Forecasts
PDF Patcher: Open-Source PDF Editing and Bookmark Utility for Windows
ChatTTS: A Text-to-Speech Model Optimized for Dialogue
How to Highlight Top 3 and Bottom 3 Bars in an Excel Chart
XMIF VPN Free Trial & $0.70/Month Plan – No Logs, 4K Speed