---
title: "Deploy CLIProxyAPI with CPA Manager Plus: AI Gateway Dashboard"
description: "Run CLIProxyAPI with a dashboard for usage, cost, quota and failures."
category: "AI/ML"
url: https://railway.com/deploy/cpa-manager-cliproxyapi
---

# Deploy CLIProxyAPI with CPA Manager Plus: AI Gateway Dashboard

Run CLIProxyAPI with a dashboard for usage, cost, quota and failures.

**[Deploy CLIProxyAPI with CPA Manager Plus: AI Gateway Dashboard on Railway](https://railway.com/template/cpa-manager-cliproxyapi)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/cpa-manager-cliproxyapi/manifest.json

- **Creator:** blueorange
- **Category:** AI/ML

## Template content

### CLIProxyAPI https://github.com/seakee.png

- **Image:** ghcr.io/onepush-dev/cpa-cliproxyapi:8.0.51
- **Health check:** /healthz
- **Public domain:** Yes

### CPA Manager Plus https://github.com/seakee.png

- **Image:** ghcr.io/onepush-dev/cpa-manager-plus:1.14.10
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host CPA Manager Plus with CLIProxyAPI on Railway

![CPA Manager Plus logo](https://github.com/seakee.png)

CLIProxyAPI is an open source **AI gateway** that turns your model accounts and API keys into one OpenAI, Gemini, Claude and Codex compatible endpoint, so any client or SDK can use them with a single key. CPA Manager Plus is a self-hosted **management panel and observability dashboard** for it: it keeps persistent request history and breaks down tokens, estimated cost, quota windows, failures and account health by model, provider, account and API key. Both projects are MIT licensed; CLIProxyAPI has about 59,200 GitHub stars and CPA Manager Plus about 4,100. This template deploys CLIProxyAPI 8.0.51 and CPA Manager Plus 1.14.10 in Full Mode, already connected over Railway's private network with generated keys, volumes and health checks. Hosted gateways and observability tools usually charge per request or per seat. This stack on Railway costs about $5–10/month, plus whatever you pay your model providers.

---

## What This Template Deploys

| Service | Purpose |
|---|---|
| **CLIProxyAPI** | The gateway, from `ghcr.io/onepush-dev/cpa-cliproxyapi:8.0.51`. Public domain on port `8080` serving the `/v1` API and the management API, health check on `/healthz`, volume at `/app/data` for `config.yaml`, auth files and OAuth credentials. |
| **CPA Manager Plus** | The panel and Manager Server, from `ghcr.io/onepush-dev/cpa-manager-plus:1.14.10`. Public domain for the dashboard at `/management.html`, health check on `/health`, volume at `/data` for its SQLite request history and settings. |

The panel reaches CLIProxyAPI on its private address with the shared management key, so it is connected the first time you sign in.

---

## About Hosting CPA Manager Plus and CLIProxyAPI

Running a gateway on a laptop means it stops when the laptop sleeps, and its usage data disappears with each restart. Hosting both services gives every app and teammate a stable endpoint and keeps the history in one place.

**One compatible endpoint.** Clients call OpenAI, Gemini, Claude or Codex style APIs at one URL with one client key, and CLIProxyAPI routes them to your configured providers.

**Many providers and accounts.** Configure Gemini, Codex, Claude, Vertex, xAI and OpenAI-compatible providers, with priorities, model aliases and several accounts per provider.

**Request monitoring.** Search persistent request history with status, latency, tokens and redacted failure evidence to find out why requests fail.

**Cost and usage analytics.** Break down calls, tokens and estimated cost by model, provider, account, API key, project and time range. Prices sync from public model price lists, with local overrides.

**Quota and account health.** See credential state, quota windows and reset times, so an exhausted account shows up before your users notice.

**Configuration in a panel.** Manage providers, OAuth logins, client keys, plugins and logs without editing files by hand.

---

## Deploy CPA Manager Plus in Under 5 Minutes

1. Click **Deploy on Railway**. All keys are generated for you.
2. Wait for both services to turn healthy; the first deploy takes about a minute.
3. Open the CPA Manager Plus domain with `/management.html` on the end and sign in with `CPA_MANAGER_ADMIN_KEY`.
4. Add your providers, API keys or OAuth logins in the panel.
5. Point your clients at the CLIProxyAPI domain with `/v1` on the end, using `CPA_API_KEY` as the Bearer token.

---

## Important: Use Credentials You Are Allowed to Use

CLIProxyAPI can route requests through OAuth logins for consumer and coding subscriptions as well as regular API keys. Many providers restrict how subscription accounts may be used, so check each provider's terms before connecting an account, and prefer official API keys for shared or production traffic.

Both domains are public. The `/v1` API needs `CPA_API_KEY`, and the management API and panel need their own keys, so keep all three private and give each app its own client key.

---

## Common Use Cases

- **Finding failing requests:** see failure rates, status codes and the affected model or account.
- **Tracking AI spend:** break down tokens and estimated cost by project, client key or model.
- **Quota monitoring:** catch accounts that have run out before requests start failing.
- **One endpoint for a team:** give each teammate or app its own client key on a shared gateway.
- **Routing coding tools:** send Claude Code, Codex or other clients through one compatible API.
- **Provider failover:** set priorities so traffic moves to another account or provider.
- **Auditing usage:** export request history as JSONL for reports.

---

## Configuration

| Variable | Service | Default | Description |
|---|---|---|---|
| `CPA_API_KEY` | CLIProxyAPI | 🔐 Auto-generated | Client key for `/v1` requests; seeds `config.yaml` on first boot |
| `MANAGEMENT_PASSWORD` | CLIProxyAPI | 🔐 Auto-generated | Unlocks the management API; shared with the panel |
| `CPA_MANAGER_ADMIN_KEY` | CPA Manager Plus | 🔐 Auto-generated | Admin key to sign in to the panel |
| `CPA_MANAGEMENT_KEY` | CPA Manager Plus | references `MANAGEMENT_PASSWORD` | Lets the panel call CLIProxyAPI |
| `CPA_UPSTREAM_URL` | CPA Manager Plus | private CLIProxyAPI URL, port `8080` | Gateway the panel manages and monitors |

**Client keys.** `CPA_API_KEY` only seeds the first key. Create more keys in the panel so you can revoke one client without affecting the others.

**OAuth logins that redirect to localhost.** Some sign-in flows redirect your browser to a localhost address that will not load. Copy the full URL from the address bar and paste it back into the panel to finish the login.

**Custom domains.** Add them to either service in Railway. The panel talks to the gateway privately, so no variable changes are needed.

**Updates.** The template pins CLIProxyAPI 8.0.51 and CPA Manager Plus 1.14.10. CLIProxyAPI releases often and is already at 8.1.1, so test new versions before relying on them.

**Backups.** Credentials and config live on the CLIProxyAPI volume, and request history on the panel volume. Back up both.

---

## Tips for Running the Gateway

**Name your keys.** Give each client key a clear name so cost and failure breakdowns point straight at the app or person responsible.

**Check failures by account.** When errors rise, filter the request history by account first; a single expired credential often explains them.

**Set local prices for aliases.** If you use model aliases or internal models, add price overrides so cost estimates stay accurate.

**Watch quota windows.** Use the quota view to spread traffic across accounts before one hits its limit.

**Keep the official panel in mind.** CLIProxyAPI's own Management Center still works with the management key if you want the upstream interface.

**Size for your traffic.** Both services are light; raise memory only if you keep very long request history or heavy traffic.

---

## CPA Manager Plus vs. Alternatives

| Feature | CPA Manager Plus on Railway | Official CLIProxyAPI panel | LiteLLM | Hosted AI gateways |
|---|---|---|---|---|
| Hosting | Self-hosted | Self-hosted | Self-hosted | Hosted SaaS |
| License | MIT | MIT | MIT core | Proprietary |
| Persistent request history | ✅ | ❌ | ✅ | ✅ |
| Cost breakdown by key and account | ✅ | ❌ | ✅ | ✅ |
| Quota and account health | ✅ | Basic | ❌ | Varies |
| OAuth account logins | ✅ | ✅ | ❌ | ❌ |
| Price | About $5–10/month | Free with CLIProxyAPI | Hosting cost | Often per request or seat |

The official panel is enough if you only manage providers and keys. LiteLLM covers a wider range of providers and budgets. CPA Manager Plus is the pick when you already use CLIProxyAPI and want history, cost and quota in one dashboard.

---

## Dependencies for CPA Manager Plus Hosting

- A Railway account.
- Model provider API keys or accounts you are allowed to use.

### Deployment Dependencies

- [CLIProxyAPI on GitHub](https://github.com/router-for-me/CLIProxyAPI): gateway source and releases
- [CPA Manager Plus on GitHub](https://github.com/seakee/CPA-Manager-Plus): panel source and releases
- [CPA Manager Plus documentation](https://cpamp-docs.seakee.dev/en/): setup, panel modes and features

### Implementation Details

Both images wrap the upstream releases with small start scripts for Railway. CLIProxyAPI writes its first `config.yaml` from the template keys, and the Manager Server stores request history in SQLite on its volume.

---

## Frequently Asked Questions

**What does this template deploy?**
CLIProxyAPI as an AI gateway and CPA Manager Plus as its dashboard, already connected.

**How much does it cost to host?**
About $5–10/month on Railway, plus your model provider costs.

**Which key signs in to the panel?**
`CPA_MANAGER_ADMIN_KEY`, at the CPA Manager Plus domain plus `/management.html`.

**How do clients authenticate?**
They send `CPA_API_KEY` as a Bearer token to the CLIProxyAPI domain plus `/v1`.

**Why are there two services?**
CLIProxyAPI handles requests and credentials; CPA Manager Plus stores history and serves the dashboard.

**Can I use any subscription account?**
Only accounts and keys you are allowed to use under each provider's terms.

---

## Why Deploy and Host CPA Manager Plus 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 CPA Manager Plus with CLIProxyAPI on Railway, you get one AI endpoint for all your apps, with request history, cost and quota in a dashboard you control.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/cpa-manager-cliproxyapi
