selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Oh My CPA logo

Self-host Oh My CPA

v0.3.15

Control plane & observability for CLIProxyAPI AI gateway

BetaOpen SourceMIT
Updated4 hours ago
LanguageTypescript
Setup difficultyModerate
MobileResponsive
ThemeDark mode
Stars
276
Port
8080 (HTTP console)
Requires
CLIProxyAPI (CPA)
Docker
wiziscool/oh-my-cpa
Install with Docker Compose
Oh My CPA dashboard split view showing light and dark themesRequest records with latency, tokens, and cost per requestModel price book grouped by provider with custom overridesOAuth credentials with state and quota managementAI provider list with enable switches and trafficDashboard, request records, and OAuth management on mobile

What is Oh My CPA?

Should you self-host Oh My CPA?

Oh My CPA scores 49/100 on selfhost.directory (how scoring works) and ranks #15 of 19 in API Management. It has 276 GitHub stars.

It shipped 11 stable releases in the past year. The latest, v0.3.15, came out on 28 October 2026. New versions land roughly every 1 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Kong (81/100, 44 314 stars). It scores higher overall, so compare the two before you pick. See Oh My CPA vs Kong side by side.

Features

  • AI Provider Management
  • Background Usage Collection
  • Client API Key Management
  • Custom & Linked Pricing
  • Live Routing Visualization
  • Logs and Audit Trail
  • Model catalog
  • Model Playground
  • Model Usage Panels
  • OAuth credential management
  • Observability dashboard
  • OpenRouter Price Book
  • Plugin Store & Trusted Plugin Pages
  • Request Records with Full-Text Search
  • Request-Time Cost Snapshots

Oh My CPA README

How to install Oh My CPA

Install Oh My CPA with Docker Compose

Environment variables
CPA_MANAGEMENT_KEY, OMCPA_MASTER_KEY, OMCPA_CPA_BASE_URL, OMCPA_CPA_MANAGEMENT_KEY, OMCPA_DATA_DIR

services: cli-proxy-api: image: eceasy/cli-proxy-api:latest restart: unless-stopped ports: - "127.0.0.1:8317:8317" environment: MANAGEMENT_PASSWORD: ${CPA_MANAGEMENT_KEY:?} volumes: - ./config.yaml:/CLIProxyAPI/config.yaml - ./auths:/root/.cli-proxy-api - ./logs:/CLIProxyAPI/logs - ./plugins:/CLIProxyAPI/plugins

oh-my-cpa: image: wiziscool/oh-my-cpa:latest restart: unless-stopped depends_on: - cli-proxy-api ports: - "127.0.0.1:8080:8080" environment: OMCPA_CPA_BASE_URL: http://cli-proxy-api:8317 OMCPA_CPA_MANAGEMENT_KEY: ${CPA_MANAGEMENT_KEY:?} OMCPA_MASTER_KEY: ${OMCPA_MASTER_KEY:?} OMCPA_DATA_DIR: /data volumes: - oh-my-cpa-data:/data

oh-my-cpa-updater: image: wiziscool/oh-my-cpa:latest restart: unless-stopped command: ["updater", "serve"] user: "0:0" read_only: true cap_drop: [ALL] volumes: - /var/run/docker.sock:/var/run/docker.sock

volumes: oh-my-cpa-data:

Requires Docker Engine with Compose plugin and CLIProxyAPI v8.0.0+. Generates CPA_MANAGEMENT_KEY and OMCPA_MASTER_KEY via openssl.

How to configure Oh My CPA

  • OMCPA_BASE_PATH/omcSub-path the console is served under. omc, /omc/ and /omc are equivalent; / serves it at the root

    Sub-path the console is served under. omc, /omc/ and /omc are equivalent; / serves it at the root

  • OMCPA_CPA_BASE_URLCPA's address, for example http://127.0.0.1:8317

    CPA's address, for example http://127.0.0.1:8317

  • OMCPA_CPA_MANAGEMENT_KEYCPA's plaintext management key. Also the console's sign-in password

    CPA's plaintext management key. Also the console's sign-in password

  • OMCPA_CPA_REPOrouter-for-me/CLIProxyAPIowner/name the checks read, for a fork

    owner/name the checks read, for a fork

  • OMCPA_CPA_TLS_SKIP_VERIFYfalseSkip certificate verification when CPA uses a private certificate

    Skip certificate verification when CPA uses a private certificate

    values: true, false

  • OMCPA_CPA_USAGE_ADDRhost and port of OMCPA_CPA_BASE_URLhost:port of CPA's usage stream

    host:port of CPA's usage stream

  • OMCPA_DATA_DIR./dataDirectory holding oh-my-cpa.db. Local disk only

    Directory holding oh-my-cpa.db. Local disk only

  • OMCPA_DEMO_MODEfalseServe the console from the built-in fixture

    Serve the console from the built-in fixture

    values: true, false

  • OMCPA_ENV_FILENames another .env file to read

    Names another .env file to read

  • OMCPA_GOOGLE_FONTS_URLhttps://fonts.googleapis.comThe Google Fonts stylesheet API the font library installs from, or a compatible mirror

    The Google Fonts stylesheet API the font library installs from, or a compatible mirror

  • OMCPA_LISTEN_ADDR:8080Listen address

    Listen address

  • OMCPA_MASTER_KEYAt-rest encryption key: a 64-character hex key (openssl rand -hex 32) or at least 32 bytes

    At-rest encryption key: a 64-character hex key (openssl rand -hex 32) or at least 32 bytes

  • OMCPA_OMC_REPOWizisCool/oh-my-cpaowner/name the checks read, for a fork

    owner/name the checks read, for a fork

  • OMCPA_PUBLIC_URLThe address browsers use. An https:// value marks the session cookie Secure

    The address browsers use. An https:// value marks the session cookie Secure

  • OMCPA_REQUEST_TIMEOUT15sTimeout for ordinary CPA management calls

    Timeout for ordinary CPA management calls

  • OMCPA_TRUSTED_PROXY_CIDRSComma-separated CIDRs of reverse proxies whose forwarding headers may be trusted for login throttling

    Comma-separated CIDRs of reverse proxies whose forwarding headers may be trusted for login throttling

  • OMCPA_UPDATE_CHECK_ENABLEDtrueThe six-hourly release sweep

    The six-hourly release sweep

    values: true, false

  • OMCPA_UPDATE_CHECK_ON_PAGE_LOADtrueThe check the System Information page makes when opened

    The check the System Information page makes when opened

    values: true, false

  • OMCPA_UPDATER_ENABLEDtruefalse makes the console ignore an updater and offer no update action

    false makes the console ignore an updater and offer no update action

    values: true, false

  • OMCPA_UPDATER_URLhttp://oh-my-cpa-updater:8090Where the console looks for the updater

    Where the console looks for the updater

  • OMCPA_USAGE_BATCH_SIZE1000Records read per poll (1-10000)

    Records read per poll (1-10000)

  • OMCPA_USAGE_IDLE_INTERVAL1sFirst wait after an empty poll

    First wait after an empty poll

  • OMCPA_USAGE_INBOX_RETENTION_DAYS7Days a captured payload is kept after it was decoded into a request record, 0 to keep it as long as the record

    Days a captured payload is kept after it was decoded into a request record, 0 to keep it as long as the record

  • OMCPA_USAGE_INGEST_MODEautoUsage collection mode

    Usage collection mode

    values: auto, subscribe, resp_pull, http_pull, off

  • OMCPA_USAGE_MAX_IDLE_INTERVAL10sCeiling the idle backoff grows to

    Ceiling the idle backoff grows to

  • OMCPA_USAGE_RETENTION_DAYS90Days of request records kept, 0 to keep them all

    Days of request records kept, 0 to keep them all

  • OMCPA_VERSIONembedded stable tag; v0.1.0-dev for untagged source buildsOptional display/User-Agent version override; does not change the installed build

    Optional display/User-Agent version override; does not change the installed build

  • TZsystem zoneServer calendar

    Server calendar

Oh My CPA releases & version history

More in API Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…