Configuration is managed through infrastructure/.env.
| Variable | Required | Description | Default / Example |
|---|---|---|---|
DOMAIN |
Yes | Base domain for your installation | example.com |
DASHBOARD_SUBDOMAIN |
Yes | Dashboard subdomain | dashboard |
API_SUBDOMAIN |
Yes | API subdomain | api |
DASHBOARD_URL |
Yes | Full dashboard URL (used for OAuth callbacks, Telegram links) | https://dashboard.example.com |
API_URL |
Yes | Full API URL (used for proxy model config) | https://api.example.com |
DATABASE_URL |
Yes | PostgreSQL connection string | postgresql://user:pass@host:5432/db |
POSTGRES_PASSWORD |
Yes | PostgreSQL password | Generated by installer |
JWT_SECRET |
Yes | JWT signing secret (min 32 chars) | Generated by installer |
MANAGEMENT_API_KEY |
Yes | CLIProxyAPI management API key (min 16 chars) | Generated by installer |
INSTALL_DIR |
Yes | Absolute path to project root | Set by installer |
TZ |
No | Server timezone | UTC |
| Variable | Required | Description | Default |
|---|---|---|---|
CLIPROXYAPI_MANAGEMENT_URL |
No | Internal management API URL | http://cliproxyapi:8317/v0/management |
NODE_ENV |
No | Runtime environment | development |
JWT_EXPIRES_IN |
No | JWT token expiration time | 7d |
LOG_LEVEL |
No | Pino log level (fatal, error, warn, info, debug, trace) |
info |
LOG_DIR |
No | Directory for log file storage | <cwd>/logs |
CLIPROXYAPI_CONTAINER_NAME |
No | Docker container name for CLIProxyAPI | cliproxyapi |
DOCKER_HOST |
No | Docker socket proxy URL (for container management) | tcp://docker-proxy:2375 |
GITHUB_REPO |
No | GitHub repo for update checks | itsmylife44/cliproxyapi-dashboard |
SYNC_TOKEN_MAX_AGE_DAYS |
No | Config sync token expiration in days | 90 |
COLLECTOR_API_KEY |
No | API key for automated usage collection cron service (64-char hex) | Generated by installer |
BACKUP_SCHEDULER_KEY |
No | API key for the backup scheduler cron service (64-char hex) | Generated by installer |
ALLOW_LOCAL_PROVIDER_URLS |
No | Permit custom providers to target localhost / RFC1918 (Ollama, LM Studio, llama.cpp). Cloud metadata (169.254.169.254, 100.100.100.200) stays blocked. |
false |
| Variable | Required | Description | Default |
|---|---|---|---|
PERPLEXITY_SIDECAR_SECRET |
No | Shared secret for sidecar authentication (min 16 chars) | — |
PERPLEXITY_COOKIES |
No | Perplexity Pro session cookies | — |
| Variable | Required | Description | Default |
|---|---|---|---|
WEBHOOK_HOST |
No | Webhook server URL for deploy triggers | http://localhost:9000 |
DEPLOY_SECRET |
No | Secret for deploy webhook authentication | — |
CLIProxyAPIPlus configuration lives in infrastructure/config/config.yaml. The dashboard provides a structured UI for editing it, but you can also edit the file directly:
api-keys:
- "sk-your-api-key-here"
providers:
- name: "claude"
type: "claude"
# Provider-specific configuration...
- name: "gemini"
type: "gemini"
api-key: "YOUR_GEMINI_API_KEY"
# Provider-specific configuration...Dashboard-specific settings are managed through the Settings page in the UI:
- User management (admin password)
- Config Sync token management
- Theme preferences
The dashboard can automatically sync your OpenCode configurations to your local machine using the companion plugin.
- Generate a Sync Token: Navigate to Settings -> Config Sync in the dashboard
- Install the Plugin: Add
opencode-cliproxyapi-syncto your OpenCode plugins - Configure: Create
~/.config/opencode-cliproxyapi-sync/config.jsonwith your dashboard URL and sync token - Auto-Sync: On every OpenCode startup, the plugin checks for config changes and updates your local
opencode.jsonandoh-my-openagent.json
npx opencode install opencode-cliproxyapi-syncOr add manually to your opencode.json:
{
"plugin": [
"opencode-cliproxyapi-sync",
"oh-my-openagent@latest"
]
}The plugin supports OCX profiles — each profile can have its own sync config.
For full plugin documentation, see opencode-cliproxyapi-sync.
The dashboard automatically collects usage statistics from CLIProxyAPIPlus every 5 minutes using a dedicated cron service.
- Usage Collector Service: Runs as a Docker container with cron job
- Collection Endpoint:
POST /api/usage/collectfetches data from CLIProxyAPI - Data Storage: Usage records stored in PostgreSQL with deduplication
- Dashboard Display: View statistics on the Usage page
COLLECTOR_API_KEY: Authentication key for the cron service (automatically generated during installation)
If usage data isn't appearing in your dashboard:
- Check collector service:
docker compose ps usage-collector - Verify API key:
grep COLLECTOR_API_KEY infrastructure/.env - View logs:
docker compose logs usage-collector - Manual trigger: Click "Refresh" on Usage page (admin only)
For detailed troubleshooting and advanced configuration, see infrastructure/docs/USAGE_COLLECTION.md.
The dashboard can create scheduled database backups via a dedicated cron service that mirrors the usage collector. Configure the schedule under Settings → Backup.
- Backup Scheduler Service:
backup-schedulercontainer ticks every 5 minutes - Scheduled Endpoint:
POST /api/admin/backup/scheduledis idempotent — it only creates a backup when the configured cron time has elapsed - Retention: Old
SCHEDULEDbackups are removed according to the retention setting (days) - Time Zone: The cron expression is evaluated using the container's
TZ(falls back to UTC on invalid TZ)
BACKUP_SCHEDULER_KEY: Bearer token for the scheduler service (auto-generated during installation)- At least one admin user must exist; backups are attributed to the oldest admin
Installs that predate the scheduler need the new key and service added manually:
# Add the key if missing
grep -q '^BACKUP_SCHEDULER_KEY=' infrastructure/.env || \
echo "BACKUP_SCHEDULER_KEY=$(openssl rand -hex 32)" >> infrastructure/.env
# Start the new container
cd infrastructure && docker compose up -d backup-scheduler- Scheduler running?
docker compose ps backup-scheduler - Key present?
grep BACKUP_SCHEDULER_KEY infrastructure/.env - Logs:
docker compose logs backup-schedulerand dashboard logs forBACKUP_SCHEDULED_TICK - Schedule enabled? Settings → Backup — verify "Enabled" and the next run timestamp
Share your configuration with others:
- Publish: Generate a unique share code (format:
XXXX-XXXX) for your config - Subscribe: Enter a share code to sync with a publisher's model selection
- Automatic Sync: Subscribers see publisher's models on page reload
- Subscriber Isolation: Subscribers keep their own MCP servers and plugins
- Mutual Exclusivity: Users can be either publisher OR subscriber, not both