Deploy 9Router Cline

Point the Cline VS Code extension at your own router

Deploy 9Router Cline

Just deployed

/app/data

Deploy and Host self hosted 9Router Cline (Open-Source LLM Router) on Railway

Deploy 9Router on Railway and point the Cline VS Code extension at your own OpenAI-compatible router.

About Hosting 9Router Cline open-source software on Railway (self hosted 9Router for Cline template)

This template runs one service: decolua/9router pinned at 0.5.95, health-checked at /api/health, with a volume at /app/data for SQLite state, combos, API keys and usage.

Railway handles TLS, the public domain and restarts, and generates INITIAL_PASSWORD, JWT_SECRET, API_KEY_SECRET and MACHINE_ID_SALT per deploy with REQUIRE_API_KEY on.

Why Deploy 9Router Cline, the OpenRouter alternative on Railway (Railway Free Trial)

OpenRouter sits between you and every provider, adds a fee, and holds your routing rules.

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying 9Router Cline on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Railway vs Other Hosting Providers and VPS for 9Router Cline self hosting

Cline only needs a reachable HTTPS base URL, so the question is who patches the box.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanPinned image, TLS on your domain, /app/data volume, secrets per deployA droplet you patch, secure, and back up yourself
AWSTemplate deploy, health checks, no VPC to wireECS or EC2 plus ALB, security groups, EBS; more parts
HetznerSame stack, dashboard at /dashboard, API at /v1Cheap compute, but you own Docker, TLS, backups

Either way, Cline just needs that /v1 URL to answer.

Common Use Cases for hosted 9Router Cline

  • All-day coding sessions that outlast one subscription quota: Cline sends long contexts and many tool-call turns. When the first account in your combo returns a quota error, 9Router moves to the next entry and the task continues instead of dying mid-diff.
  • A team sharing one router with per-person keys: create a separate 9Router API key for each developer so usage stays attributable. Never hand out INITIAL_PASSWORD; that is only for the dashboard owner.
  • Switching models without touching each laptop: edit the combo once in the dashboard and every machine picks up the change at the next request.
  • Cheaper models for routine edits: put a small model first for quick file reads and formatting, and keep a stronger one later in the chain for refactors where tool calling has to be reliable.
  • Tracking usage per account: 9Router's dashboard shows which subscription or API account spent what, which is more trustworthy than Cline's own estimate built from prices you typed in.

Dependencies for 9Router Cline Docker hosted on Railway

Cline only needs three things from the router: a reachable OpenAI-compatible base URL, a key, and a model id. That keeps the dependency list short, with no Postgres, no Redis and no external queue to babysit.

Deployment Dependencies for Managed 9Router Cline Service (LLM Router)

  • One service, one volume: decolua/9router:0.5.95 pinned by digest, port 20128, volume /app/data for SQLite state and usage, health check /api/health.
  • Generated secrets: INITIAL_PASSWORD for the first dashboard login (the template replaces the upstream default), JWT_SECRET, API_KEY_SECRET, MACHINE_ID_SALT.
  • Fixed variables: PORT, HOSTNAME, DATA_DIR, BASE_URL, NEXT_PUBLIC_BASE_URL, CLOUD_URL, AUTH_COOKIE_SECURE, ENABLE_REQUEST_LOGS, plus REQUIRE_API_KEY on so Cline always needs a key.
  • Optional, empty by default: HEADROOM_URL, SEARXNG_URL.

Implementation Details for 9Router Cline (Using 9Router official docker image)

The image serves the dashboard at /dashboard and the OpenAI-compatible API at /v1. Give teammates their own keys rather than the dashboard password.

How does 9Router Cline compare against other LLM routers and gateways

9Router vs OpenRouter (OpenRouter Alternative)

  • Own accounts: 9Router chains your subscription, cheap API and free tier; OpenRouter bills one hosted key.
  • Fallback: when an account hits quota, the combo moves on and Cline's task keeps going.
  • Where OpenRouter wins: zero upkeep, one balance, a model catalog you never patch or restart.

9Router vs LiteLLM (LiteLLM Alternative)

  • Config style: LiteLLM is a YAML proxy; 9Router is a dashboard where you wire providers and combos.
  • Same idea: both do ordered fallback, and both expose an OpenAI-compatible /v1 for Cline.
  • Where LiteLLM wins: more routing hooks and scripting depth for teams that live in config.

9Router vs Portkey (Portkey Alternative)

  • Footprint: one container, port 20128, a SQLite file on /app/data; no Postgres or Redis.
  • Cost: MIT software, no paid router plan; you pay providers directly.
  • Where Portkey wins: guardrails, caching and hosted observability for compliance-heavy teams.

9Router vs direct provider keys in Cline

  • The trade: a raw key in Cline stalls the task when that account runs dry; a combo keeps going.
  • Team shape: one Base URL and per-person 9Router keys, with usage per account in the dashboard.
  • Watch the cost line: Cline prices Model Configuration fields, so 9Router usage is the truth.
  • Keep REQUIRE_API_KEY on: never hand teammates INITIAL_PASSWORD, only their own keys.
  • Where raw keys win: nothing to deploy, patch or restart; if one account is enough, Cline alone is simpler.

How to use 9Router Cline (the OSS AI model router)?

Once the deploy is green, here is the first-day path from an empty dashboard to a Cline task that actually runs.

  1. Open /dashboard and log in with INITIAL_PASSWORD from Railway variables.
  2. Connect provider accounts, then build a combo (fallback order matters).
  3. Create an API key and copy it.
  4. Install Cline in VS Code, open settings from the gear icon.
  5. Pick API Provider OpenAI Compatible, set Base URL https://your-domain/v1.
  6. Paste the key, and the Model ID exactly as the dashboard lists it.
  7. Set context window and max output tokens to the real model limits.
  8. Send a test task, then confirm the request in 9Router usage.

How to self host 9Router Cline on other VPS Services (9Router self hosting guide)

Off Railway it is a Node app plus a persistent disk. Skip the volume and combos, keys and usage vanish on restart.

Clone the Repository

git clone https://github.com/decolua/9router.git
cd 9router
git checkout v0.5.95

Install Dependencies

Docker is the short path: pull decolua/9router:0.5.95 and skip the build. A source install is npm install, then npm run build.

docker pull decolua/9router:0.5.95

Configure Environment Variables

Save these as .env with real secret values. INITIAL_PASSWORD is the dashboard login only, never a Cline key.

PORT=20128
DATA_DIR=/app/data
BASE_URL=https://your-domain
REQUIRE_API_KEY=true
INITIAL_PASSWORD=a-strong-password
JWT_SECRET=random-string
API_KEY_SECRET=random-string
MACHINE_ID_SALT=random-string

Start the 9Router Cline Application

docker run -d --name 9router -p 20128:20128 \
  --env-file .env -v /srv/9router:/app/data decolua/9router:0.5.95

Check /api/health, then open https://your-domain/dashboard, add providers, build a combo and create a Cline key. Railway already does that part: pinned image, port, volume and generated secrets come with the template.

Official Pricing of 9Router Cline (9Router pricing)

9Router has no paid plan and no per-seat license. The real bill comes from the providers behind your combo, charged to your own accounts at their published rates. 9Router's dashboard usage is tracking only, not an invoice.

9Router Cline cloud vs self hosted comparison (Pricing, features, costs, and more)

Self hosting keeps provider credentials, combos, and usage history in your own SQLite volume; 9Router's cloud sync is optional. Here's what the split costs you.

Monthly cost of self hosting 9Router Cline on Railway

Railway runs about $3-8/mo for one user at roughly 512 MB RAM, and the $5 trial covers your first stretch of Cline traffic. 9Router itself is MIT licensed and free, with no paid 9Router plan.

System Requirements for Hosting 9Router Cline on a VPS

A small instance is enough: roughly 512 MB RAM for a single user, one volume mounted at /app/data for SQLite plus its automatic backups, and port 20128 reachable from your laptop. No Postgres, no Redis.

Frequently Asked Questions (FAQs)

What Base URL do I use in Cline?

https://your-domain/v1, with the trailing /v1 and no trailing slash after it. Drop it into the OpenAI Compatible provider's Base URL field.

What goes in the Model ID field?

The combo name or provider model id exactly as the 9Router dashboard lists it. Copy it character for character; a typo in the combo name fails at request time, not at save time.

Why does Cline show a different cost than 9Router?

Cline estimates from the input and output prices you type in Model Configuration. 9Router records actual per-account usage, so trust the dashboard when the two disagree.

What happens when an account hits its quota mid-task?

9Router moves to the next entry in the combo and Cline keeps going, usually without a visible error. The retry shows up in 9Router usage against the fallback account.

Can teammates share one router?

Yes. Give each person their own 9Router API key so usage stays attributable, and keep INITIAL_PASSWORD to yourself.

Does it work with other VS Code agents?

Any client that speaks the OpenAI-compatible API can point at the same /v1 endpoint with its own key. Cline is just the one this template is tuned for.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
NEW
Möbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7