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.

CC-Router logo

Self-host CC-Router

v0.6.2

Proxy that rotates Claude Max accounts for higher throughput

BetaOpen SourceMIT
Updated4 months ago
LanguageTypescript
Setup difficultyModerate
Stars
40
Port
3456 (Main proxy HTTP server)
Requires
Node.js
Install with Docker Compose
CC-Router live terminal dashboard showing account health, request counts, token usage, and recent activity

What is CC-Router?

CC-Router runs locally on macOS, Linux, or Windows and sits between Claude Code and the Anthropic API. It round-robins requests across two to twenty Claude Max accounts, refreshes OAuth tokens before they expire, and detects rate-limit responses to cool down busy accounts. An OpenAI Responses-compatible endpoint lets Codex CLI use ChatGPT/Codex subscriptions through the same proxy. Deployment options include an npm global install that can run as a background daemon with launchd or systemd auto-start, a Docker Compose stack with optional LiteLLM for a web dashboard, or a client-only mode that points to a remote instance. A live terminal dashboard shows per-account health, request counts, and token usage. Claude Desktop traffic can be intercepted via mitmproxy. The project is MIT-licensed and requires Node.js 20+.

Should you self-host CC-Router?

CC-Router scores 37/100 on selfhost.directory (how scoring works) and ranks #143 of 166 in Developer Tools. It has 40 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is openhands (87/100, 92 105 stars). It scores higher overall, so compare the two before you pick. See CC-Router vs openhands side by side.

CC-Router README

How to install CC-Router

Install CC-Router with Docker Compose

Docker Desktop installed and running
Environment variables
PORT, LITELLM_PORT, LITELLM_MASTER_KEY, LITELLM_URL, ACCOUNTS_PATH, NODE_ENV

cc-router docker up

or: cc-router start --litellm

Runs cc-router with optional LiteLLM sidecar for usage dashboard and rate limiting

How to configure CC-Router

  • ACCOUNTS_PATH/app/accounts.jsonPath to accounts.json file

    Path to accounts.json file

  • CC_ROUTER_TELEMETRYProject-specific telemetry override

    Project-specific telemetry override

    values: 0

  • CC_ROUTER_TOKENProxy secret for Codex CLI when router is password-protected

    Proxy secret for Codex CLI when router is password-protected

  • DO_NOT_TRACKDisable telemetry (standard env var)

    Disable telemetry (standard env var)

    values: 1

  • LITELLM_MASTER_KEYcc-router-local-devMaster key for LiteLLM dashboard authentication

    Master key for LiteLLM dashboard authentication

  • LITELLM_PORT4000Port for LiteLLM dashboard

    Port for LiteLLM dashboard

  • PORT3456Port for the main proxy server

    Port for the main proxy server

  • proxyRequestTimeoutMsProxy request timeout in milliseconds

    Proxy request timeout in milliseconds

More in Proxy

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…