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.
npm install -g @sifxprime/krouterkrouter -tnpm install -g @sifxprime/krouter@latestThe 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.
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:latestdocker pull ghcr.io/sifxprime/krouter:latestdocker logs -f krouter # tail logs
docker stop krouter # stop
docker start krouter # start again
docker rm -f krouter # removeFor 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.
git clone https://github.com/sifxprime/krouter.git
cd krouter
npm install
npm run devnpm run build:deploy
npm run startCleanup
Uninstall
Three steps: stop the server, remove the package, then optionally remove the local data directory.
# Right-click the tray icon → Quit
# or:
pkill -f krouternpm uninstall -g @sifxprime/krouterrm -rf ~/.krouterThe ~/.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
| Tool | Minimum | Notes |
|---|---|---|
| Node.js | 20.9 or newer | node -v to check. Windows: nodejs.org. macOS: brew install node@22. |
| Sudo / admin | Only for MITM mode | Router 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.
- Dashboard → Providers → click any tile. OpenCode Free needs no login.
- 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.
- 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.