Skip to main content
kRouter

Install

Three ways to install kRouter.

Pick NPM if you just want it to work. Pick Docker if you self-host. Pick Git if you want to hack on the code. All three are MIT-licensed, free, and self-hosted.

Recommended

Install via NPM

Requires Node.js 20.9 or newer. Global install runs the tray app and dashboard locally.

Installbash
npm install -g @sifxprime/krouter
Run in backgroundbash
krouter -t
Upgrade laterbash
npm install -g @sifxprime/krouter@latest

The dashboard is at http://localhost:20128/dashboard

Self-host

Install via Docker

Multi-platform linux/amd64 + linux/arm64. Published to Docker Hub and GitHub Container Registry.

Run (prints your dashboard password)bash
KROUTER_PASSWORD="$(openssl rand -base64 18)" && echo "Dashboard password: $KROUTER_PASSWORD"
docker run -d \
  -p 20128:20128 \
  -e INITIAL_PASSWORD="${KROUTER_PASSWORD:?run the line above first}" \
  -v "$HOME/.krouter:/app/data" \
  -e DATA_DIR=/app/data \
  --name krouter \
  sifxprime/krouter:latest
Or from GHCRbash
docker pull ghcr.io/sifxprime/krouter:latest
Manage containerbash
docker logs -f krouter      # tail logs
docker stop krouter         # stop
docker start krouter        # start again
docker rm -f krouter        # remove

For development

Install via Git

Clone the repo if you want to modify the code or run the hot-reloading dev server. Requires Node.js 20.9 or newer and Git.

Clone & startbash
git clone https://github.com/sifxprime/krouter.git
cd krouter
npm install
npm run dev
Production buildbash
npm run build:deploy
npm run start

Cleanup

Uninstall

Three steps: stop the server, remove the package, then optionally remove the local data directory.

1. Stop the serverbash
# Right-click the tray icon → Quit
# or:
pkill -f krouter
2. Remove the packagebash
npm uninstall -g @sifxprime/krouter
3. Optional — remove local databash
rm -rf ~/.krouter

The ~/.krouter directory holds your OAuth refresh tokens, provider settings, request history, and the MITM root CA. Step 3 is irreversible — back it up first if you might reinstall.


Prerequisites

ToolMinimumNotes
Node.js20.9 or newernode -v to check. Windows: nodejs.org. macOS: brew install node@22.
Sudo / adminOnly for MITM modeRouter mode needs no privileges. MITM interception (Antigravity, GitHub Copilot, Kiro IDE, Claude Desktop) binds :443 and edits the hosts file (/etc/hosts on macOS and Linux). It does not work inside Docker.

What happens next

On first run, kRouter creates ~/.krouter/ (the SQLite database and settings, plus the MITM certificate once you use MITM). It is per-user and fully reset by deleting that folder.

  1. Dashboard → Providers → click any tile. OpenCode Free needs no login.
  2. Dashboard → Endpoint → API Keys: a Default Key is created on your first visit. Tools on the same machine can skip it; anything calling from another machine needs one.
  3. Point your IDE at http://localhost:20128/v1. From another machine, use this machine's address and the key.

FAQ

Install questions

Which IDEs and tools work with kRouter?

Any OpenAI-compatible client. The dashboard sets up Claude Code, Codex, OpenCode, Cline, Kilo Code, Factory Droid, OpenClaw and others for you, and has guides for Cursor (which needs a tunnel or cloud endpoint, not localhost), Roo, Continue and Amp. Antigravity, GitHub Copilot, Kiro and Claude Desktop have no endpoint setting, so kRouter routes them through local MITM interception. Requests are translated between the OpenAI, Anthropic and Gemini formats automatically.

Can I run kRouter on a server for my whole team?

Yes. Run kRouter on a VPS behind Nginx or Caddy, or expose it with Cloudflare Tunnel or Tailscale, and give each teammate a kRouter API key: callers on other machines always need one. Kiro can also connect with a long-lived API key (ksk_) instead of a browser login, which suits a headless server.

How do I install kRouter?

Run "npm install -g @sifxprime/krouter" and then "krouter -t" (Node.js 20.9 or newer), open the dashboard at http://localhost:20128/dashboard, connect a provider, and point your tool at http://localhost:20128/v1. Docker and source installs are also supported.