
Deploy CLIProxyAPI (Self-Hosted)
Self-host CLIProxyAPI with persistent accounts and sticky sessions.
CLIProxyAPI
Just deployed
/data
Deploy and Host CLIProxyAPI (Self-Hosted) on Railway
CLIProxyAPI connects Claude Code, Codex, and other supported provider accounts to compatible API endpoints. This template includes persistent storage, generated access keys, and a web interface for managing accounts.
About Hosting CLIProxyAPI (Self-Hosted)
The template deploys one service with an HTTPS domain and a persistent /data volume. Configuration and accounts survive redeployments. Session affinity keeps conversations on the same account, with automatic failover when another eligible account is available.
Common Use Cases
- Connect coding tools from multiple computers.
- Manage several provider accounts in one place.
- Use one endpoint for Claude Code and Codex.
Dependencies for CLIProxyAPI (Self-Hosted) Hosting
- Persistent storage, included in this template.
- Your own supported provider accounts or API credentials.
Implementation Details
After deployment, open /management.html and sign in with MANAGEMENT_PASSWORD from Railway’s variables. Connect your accounts, then configure your clients with INITIAL_API_KEY and the service URL. Codex uses the URL followed by /v1.
See the source repository and setup guides for Claude Code and Codex.
Why Deploy CLIProxyAPI (Self-Hosted) 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 CLIProxyAPI (Self-Hosted) 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.
Template Content
