Skip to content

CRS

Self-hosted relay that lets a small group share Claude, OpenAI, Gemini and Droid subscriptions through one serWei-Shaw/claude-relay-service

Stars
12.8k
Forks
1.9k
Licence
MIT
Language
JavaScript
Last update
5 days ago
Type
App

What it is

Claude Relay Service is a server you host yourself that sits between tools like Claude Code and the official AI APIs. You add your subscription accounts to it, create separate API keys for each person, and point your tools at your server instead of the vendor directly. It tracks token usage per key and rotates across accounts when one has a problem.

  • Point Claude Code at your server using ANTHROPIC_BASE_URL and a key you created in the admin panel
  • Issue separate API keys to friends and set rate, concurrency or model limits on each
  • View per-user token usage and cost estimates in the web dashboard
  • Route Gemini CLI through your server using the documented Gemini environment variables

Great for

  • Developers comfortable running a Node.js server and Redis themselves
  • Small groups who want to split one shared Claude subscription with known members
  • People who want usage tracking and per-user keys for their own AI tool access
  • Users who are willing to maintain the server and handle OAuth setup

Not ideal for

  • Anyone who wants a turnkey hosted service with no server to maintain, since the README describes self-hosting only
  • Users who need guaranteed access, because the README warns that using the project may violate Anthropic's terms and may lead to account bans
  • Beginners with no command-line experience, since setup involves Redis, environment files and OAuth steps
Step-by-step guide: how to use CRSInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    See the README

    You'll need: Node.js 18 or higher · Redis 6 or higher · Linux recommended (per README)

    Run the management script installer (recommended)

    curl -fsSL https://pincc.ai/manage.sh -o manage.sh && chmod +x manage.sh && ./manage.sh install

    Clone the repository for manual setup

    git clone https://github.com/Wei-Shaw//claude-relay-service.git

    Install Node dependencies

    npm install

    Initialize and generate admin credentials

    npm run setup
  2. 2

    Run it

    • Install the service with the management script or follow the manual steps in the README
    • Open http://your-server:3000/web (or the port you chose) in a browser and log in with the admin credentials from data/init.json
    • Add a Claude account through the OAuth flow in the Claude accounts tab
    • Create an API key in the API Keys tab and set it as ANTHROPIC_AUTH_TOKEN with ANTHROPIC_BASE_URL pointing at your server
  3. 3

    Get the most out of it

    • Set ADMIN_USERNAME and ADMIN_PASSWORD in advance rather than relying on generated credentials
    • Configure per-key rate, concurrency, model and client restrictions when sharing keys
    • Use per-account 503 and 5xx cooldown overrides in the admin panel to tune routing behavior
    • Use a static proxy IP per account if you are concerned about several accounts sharing one IP, as the README suggests

Downloads

Strengths

  • Keeps requests between your own server and the upstream API rather than a third-party mirror, as the README describes
  • Supports multiple accounts with automatic switching when one fails
  • Provides per-key limits and usage statistics in a web admin panel

Trade-offs

  • The README includes a security notice that versions v1.1.248 and below have an admin authentication bypass, so you must run a recent release
  • The README states that using the project may violate Anthropic's terms of service and that users bear the risk
  • Cloud servers in some regions may be blocked by Cloudflare, according to the README's experience notes

How it compares

ProjectStarsTypeLevelUpdatedBest for
claude-relay-service (this)12.8kAppadvanced5 days agoDevelopers comfortable running a Node.js server and Redis themselves
agentic-awesome-skills49kDev toolintermediate4 days agoDevelopers using Codex or Claude who want agent-chosen instructions for a project
OmniRoute83.8kAppintermediate4 days agoDevelopers who use several AI coding tools and want one place to configure providers
ai-website-cloner-template38.4kAppintermediate17 days agoDevelopers who want a working Next.js starting point for a site they already own
claude-hud29.1kAppbeginner4 days agoDevelopers who use Claude Code daily and want to see context usage at a glance
magpie28.2kAppintermediate4 days agoPeople who use more than one AI coding agent and want one place to manage their models

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.