---
title: "Deploy 9router"
description: "Self-hosted AI router for Cursor, Claude, Gemini, OpenAI & 60+ AI providers"
category: "AI/ML"
url: https://railway.com/deploy/9router-4
---

# Deploy 9router

Self-hosted AI router for Cursor, Claude, Gemini, OpenAI & 60+ AI providers

**[Deploy 9router on Railway](https://railway.com/template/9router-4)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/9router-4/manifest.json

- **Creator:** ZtoA
- **Category:** AI/ML
- **Total deploys:** 3

## Template content

### 9router https://i.imgur.com/yjb5HvR.png

- **Image:** decolua/9router:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host 9router on Railway

9router is a self-hosted AI gateway that lets you connect coding tools such as Claude Code, Codex, Cursor, Cline, and Copilot to multiple AI providers through a single endpoint. It supports 60+ providers, provider switching, automatic fallback, multiple accounts, and an OpenAI-compatible API.

## About Hosting 9router

Hosting 9router on Railway gives you a publicly accessible instance of the 9router gateway without having to manage a VPS or configure a server manually. This template runs the `decolua/9router:latest` Docker image, exposes the service on port `8080`, and stores 9router data in a persistent volume mounted at `/app/data`. Railway also generates the initial dashboard password through the `INITIAL_PASSWORD` variable. After deployment, open your Railway URL, log in to the 9router dashboard, add your AI providers, and configure your coding tools or applications to use the 9router endpoint.

## Common Use Cases

* Connect Claude Code, Codex, Cursor, Cline, and other coding tools to multiple AI providers.
* Route requests between different AI providers and use automatic fallback when a provider reaches a limit.
* Provide a single OpenAI-compatible endpoint for applications and developer tools.
* Manage multiple AI provider accounts and model configurations from one dashboard.

## Dependencies for 9router Hosting

* A Railway account.
* API access or accounts for the AI providers you want to use with 9router.
* A persistent Railway volume mounted at `/app/data`.

### Implementation Details

This template runs 9router using the `decolua/9router:latest` Docker image.

The service listens on port `8080` and uses a persistent volume mounted at `/app/data` for storing 9router data.

After deploying the template, copy the value of `INITIAL_PASSWORD` from the service's **Variables** section in Railway. Use this password to log in to the 9router dashboard for the first time.

## Why Deploy 9router on Railway?

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 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.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/9router-4
