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.

ccLoad logo

Self-host ccLoad

v4.13.1

AI gateway pooling keys and accounts for coding agents

BetaOpen SourceMIT
Updated8 hours ago
LanguageGo
Setup difficultyModerate
Stars
428
Port
8080 (HTTP service port for admin console and API endpoints)
Docker
ghcr.io/caidaoli/ccload
Install with Docker
ccLoad admin dashboard showing statistics and cost accounting

What is ccLoad?

This Go program runs on your own machine or server. It accepts requests from coding assistants like Claude Code, Codex, and Gemini, then forwards them to whichever upstream provider you've configured — whether that's an API key, a relay service, or a signed-in subscription account. If one provider fails or hits a rate limit, the gateway automatically tries the next one before the user sees any error. It translates between different API formats so clients don't need to match the upstream protocol. Every request is metered for cost, with optional daily and monthly spending limits per token. A web dashboard lets you manage providers, create access tokens, and watch live traffic. The whole thing is a single binary with SQLite built in; Postgres and MySQL are optional extras. You can deploy it with Docker, Docker Compose, Homebrew, a downloaded binary, Hugging Face Spaces, or by building from source.

Should you self-host ccLoad?

ccLoad scores 52/100 on selfhost.directory (how scoring works) and ranks #19 of 39 in API Gateway. It has 428 GitHub stars.

It shipped 2 stable releases in the past year. The latest, v4.13.1, came out on 19 October 2026. New versions land roughly every 1 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.

Its closest alternative on selfhost.directory is Kong Gateway (82/100, 44 311 stars). It scores higher overall, so compare the two before you pick. See ccLoad vs Kong Gateway side by side.

Features

  • Admin Console
  • Automatic Failover
  • Auto-Updates
  • Cost Tracking and Caps
  • CSV import/export
  • Custom Request Rules
  • Local Token Counting
  • Model Thinking Suffix
  • Per-Channel Proxy and Time Windows
  • Priority Routing with Health Scoring
  • Protocol conversion
  • Responses WebSocket Support
  • Scoped Cooldown
  • Subscription account channels

ccLoad README

How to install ccLoad

Install ccLoad with Docker

Environment variables
CCLOAD_PASS (required), PORT, CCLOAD_API_TOKENS, CCLOAD_MYSQL, CCLOAD_POSTGRES, TZ, SQLITE_PATH, SQLITE_JOURNAL_MODE, CCLOAD_ALLOW_INSECURE_TLS, GIN_MODE, CCLOAD_ANTHROPIC_CLI_VERSION_SYNC

docker run -d --name ccload
-p 8080:8080
-e CCLOAD_PASS=your_admin_password
-v ccload_data:/app/data
ghcr.io/caidaoli/ccload:latest

Recommended for production. Data persists in Docker volume.

How to configure ccLoad

  • CCLOAD_ALLOW_INSECURE_TLS0Disable upstream TLS certificate verification (not for production)

    Disable upstream TLS certificate verification (not for production)

    values: 0|1

  • CCLOAD_ANTHROPIC_CLI_VERSION_SYNCtrueSync Claude Code CLI version from GitHub hourly for OAuth fingerprint

    Sync Claude Code CLI version from GitHub hourly for OAuth fingerprint

    values: true|false

  • CCLOAD_API_TOKENSPre-provisions API access tokens at startup. Supports token|description format, comma-separated

    Pre-provisions API access tokens at startup. Supports token|description format, comma-separated

  • CCLOAD_ENABLE_SQLITE_REPLICA0Hybrid storage switch: persist through MySQL/PostgreSQL and read from local SQLite replica

    Hybrid storage switch: persist through MySQL/PostgreSQL and read from local SQLite replica

    values: 0|1

  • CCLOAD_MYSQLMySQL DSN for external persistence

    MySQL DSN for external persistence

  • CCLOAD_PASSAdmin console password (required, service exits without it)

    Admin console password (required, service exits without it)

  • CCLOAD_POSTGRESPostgreSQL DSN for external persistence

    PostgreSQL DSN for external persistence

  • CCLOAD_RELEASE_BASE_URLCustom base URL for release metadata and asset downloads

    Custom base URL for release metadata and asset downloads

  • GIN_MODEreleaseGin framework run mode

    Gin framework run mode

    values: release|debug

  • PORT8080HTTP listen port

    HTTP listen port

  • SQLITE_JOURNAL_MODEWALSQLite journal mode

    SQLite journal mode

    values: WAL|DELETE|TRUNCATE|PERSIST|MEMORY|OFF

  • SQLITE_PATHdata/ccload.dbSQLite database file path

    SQLite database file path

  • TZUTCContainer timezone

    Container timezone

ccLoad releases & version history

FAQ

What do I need to run ccLoad?

A Linux, macOS or Windows machine, or any Docker host on amd64 or arm64. Set an admin password in CCLOAD_PASS and start the binary or container; the admin console is at /web/.

Where are my keys and request data stored?

In ccLoad's own database on your server: SQLite by default, with MySQL or PostgreSQL optional. Clients only receive ccLoad tokens. Raw upstream request capture is off by default, and when enabled, sensitive headers are masked.

Can I move from New API or One API to ccLoad?

Clients only need a new base URL and a ccLoad token. Channels have to be added again in the admin console or imported from ccLoad's own CSV format; there is no importer for New API or One API data. User accounts, top-ups and group billing do not carry over.

How does ccLoad compare with CLIProxyAPI, GPT-Load and New API?

They solve different jobs. CLIProxyAPI turns account logins into compatible APIs, GPT-Load is a general multi-credential gateway, and New API serves many users with quotas and billing. ccLoad is built around Claude Code and Codex sessions: failover before the first byte, cooldown scoped to the key, model or URL, cost on every request, and Responses WebSocket.

How is ccLoad different from a regular API relay or reverse proxy?

ccLoad retries the next channel before any output reaches the client, cools down only the failing key, model or URL, converts between four API protocols, accepts subscription account credentials as channels, and records the cost of every request with per-token limits.

Is using subscription accounts through ccLoad against provider terms?

It can be. Some providers limit subscription credentials to their own apps, and many forbid sharing one account among several people. ccLoad does not change those terms: check each provider's terms before adding account channels, and use only API-key channels where compliance is required.

Can I use my ChatGPT or Claude subscription through ccLoad?

Yes, you can import Codex (ChatGPT) or Claude credentials as channels in the admin console. Antigravity, xAI, CodeBuddy, Z.ai Coding Plan, Cursor and Zed accounts are supported too. ccLoad refreshes tokens and tracks quota windows.

Which clients work with ccLoad?

Any client that speaks Anthropic Messages, OpenAI Chat Completions, OpenAI or Codex Responses (including Responses WebSocket), or the Gemini API, such as Claude Code, Codex and SDKs or tools that let you set a base URL.

Is ccLoad free?

Yes, ccLoad is MIT licensed and runs on your own server or a free Hugging Face Space. There is no hosted service or subscription; you only pay your upstream providers as usual.

What is ccLoad?

ccLoad is an open-source, self-hosted AI API gateway written in Go that gives Claude Code, Codex, Gemini and OpenAI-compatible clients one base URL, and routes each request to one of your upstream API keys or accounts with automatic failover, protocol conversion and cost tracking.

More in API Gateway

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…