
Deploy 9Router
Self-hosted AI router for Claude, Gemini, Cursor & OpenAI tools.
9router
Just deployed
/app/data
Deploy and Host 9Router on Railway
9Router is a self-hosted AI gateway and LLM router that helps developers connect Claude, Codex, Cursor, OpenAI-compatible tools, and multiple AI providers through a single unified endpoint. It is useful for managing model access, routing requests, switching providers, and simplifying AI development workflows from one central dashboard.
About Hosting 9Router
Hosting 9Router on Railway gives you a simple way to run your own AI routing gateway without managing servers manually. With this template, users only need to provide an INITIAL_PASSWORD before clicking deploy. Railway handles the deployment process, service hosting, networking, and runtime environment.
Once deployed, 9Router can be used as a centralized AI gateway for developer tools, coding assistants, API clients, and OpenAI-compatible integrations. It helps reduce provider lock-in by allowing users to manage multiple AI models, API keys, and routing behavior from a single self-hosted dashboard.
Common Use Cases
- Use one unified AI gateway for Claude, Codex, Cursor, Gemini CLI, Claude Code, and OpenAI-compatible tools.
- Route AI requests across multiple LLM providers from a single dashboard.
- Manage AI model access, provider switching, and development workflows in one place.
- Create a self-hosted AI proxy for internal tools, coding agents, and API clients.
- Reduce dependency on a single AI provider by centralizing model routing.
Dependencies for 9Router Hosting
- A Railway account.
- A secure
INITIAL_PASSWORDfor accessing the 9Router dashboard. - AI provider accounts or API access, depending on which models you want to connect after deployment.
- Developer tools or AI clients that support OpenAI-compatible API endpoints.
Deployment Dependencies
- 9Router Website: https://9router.com/
- 9Router GitHub Repository: https://github.com/decolua/9router
- Railway: https://railway.com/
Implementation Details
This Railway template is designed for a simple self-hosted deployment flow. Before deploying, the user only needs to configure the required INITIAL_PASSWORD value from the Railway template configuration screen.
The INITIAL_PASSWORD is used as the login password for the 9Router dashboard after the deployment is completed. Make sure to use a secure password and keep it private.
After Railway finishes the deployment, open the generated Railway public URL and log in to the 9Router dashboard using the password you configured earlier.
How to Use 9Router After Deployment
After 9Router is successfully deployed on Railway, the minimal setup is:
- Open the deployed 9Router URL from Railway.
- Log in using the
INITIAL_PASSWORDyou configured before deployment. - Go to the provider settings.
- Add your AI providers, such as OpenAI, Anthropic, Gemini, OpenRouter, or other supported providers.
- Create or configure an API key inside 9Router.
- Use the 9Router endpoint in your AI client, application, or OpenAI-compatible tool.
Once the provider and API key are configured, 9Router can be used immediately as a unified AI endpoint.
Using 9Router with CLI Tools
For CLI tools such as Gemini CLI, Claude Code, or other coding assistants, additional local configuration may be required.
Inside the 9Router dashboard:
- Open the
CLI Toolssection. - Select the CLI tool you want to use.
- Follow the manual configuration shown by 9Router.
- Apply the configuration on your local computer.
- Use the 9Router endpoint and API key as instructed.
Each CLI tool may require a different environment variable or configuration file, so always follow the specific guide shown inside the CLI Tools section.
Why Deploy 9Router on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you do not have to deal with manual server configuration, while still allowing you to scale vertically and horizontally when needed.
By deploying 9Router on Railway, you are one step closer to supporting a complete AI development workflow with minimal operational burden. You can host your AI gateway, API services, databases, agents, and other developer tools in one place.
Deploy it, add your providers, configure your endpoint, and start routing your AI tools through your own self-hosted gateway.
Template Content
9router
decolua/9router:latestINITIAL_PASSWORD
