
Deploy CLI Proxy API (Self-Hosted)
Self-host CLIProxyAPI with persistent accounts and sticky sessions.
CLI Proxy API
Just deployed
/data
Deploy and Host CLI Proxy API (Self-Hosted) on Railway
CLI Proxy API 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 CLI Proxy API (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 CLI Proxy API (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 CLIPROXY_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 CLI Proxy API (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 CLI Proxy API (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
CLI Proxy API
ghcr.io/hosmelq/railway-cliproxyapi-template:latest