Canonical docs hub: docs/README.md
The bundled architecture intentionally limits exposure:
- dashboard binds to
127.0.0.1:3000 - main proxy API binds to
127.0.0.1:8317 - PostgreSQL stays on the internal Docker network
- the management API is consumed internally by the dashboard
- Docker access is mediated through
tecnativa/docker-socket-proxy
Only OAuth callback ports are published by default.
Protect infrastructure/.env:
chmod 600 infrastructure/.envRelevant secrets:
JWT_SECRETMANAGEMENT_API_KEYCOLLECTOR_API_KEYPROVIDER_ENCRYPTION_KEYDEPLOY_SECRET
| Port | Exposure | Purpose |
|---|---|---|
22/tcp |
external | SSH |
8085/tcp |
external when needed | OAuth callback |
1455/tcp |
external when needed | OAuth callback |
54545/tcp |
external when needed | OAuth callback |
51121/tcp |
external when needed | OAuth callback |
11451/tcp |
external when needed | OAuth callback |
127.0.0.1:3000 |
loopback only | dashboard |
127.0.0.1:8317 |
loopback only | proxy API |
Always allow SSH before enabling UFW.
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw limit 22/tcp comment "SSH"
sudo ufw allow 8085/tcp comment "CLIProxyAPI OAuth"
sudo ufw allow 1455/tcp comment "CLIProxyAPI OAuth"
sudo ufw allow 54545/tcp comment "CLIProxyAPI OAuth"
sudo ufw allow 51121/tcp comment "CLIProxyAPI OAuth"
sudo ufw allow 11451/tcp comment "CLIProxyAPI OAuth"
sudo ufw enable
sudo ufw status numberedIf you do not need remote OAuth flows, omit the callback-port rules.
- Keep the management plane private.
- Do not expose
CLIPROXYAPI_MANAGEMENT_URLpublicly. - Put your own reverse proxy in front of the loopback dashboard and proxy ports if you need remote access.
- Terminate TLS outside the bundled stack.
- The bundled stack does not provision certificates.
- If you expose the dashboard or proxy publicly, enforce HTTPS at your own ingress layer.
-
Rotate secrets periodically.
-
Configure firewall rules only for what you actually use.
- always allow SSH first
- only open OAuth callback ports when remote OAuth logins are needed
- keep
3000and8317private unless deliberately fronted by another layer
- Use
PROVIDER_ENCRYPTION_KEY.
Without it, custom provider API keys cannot be re-decrypted for re-sync after process restarts.
- Review logs and health checks.
cd infrastructure
./manage.sh logs dashboard
./manage.sh logs cliproxyapi
curl -s http://127.0.0.1:3000/api/health- Protect backups.
- store them outside the primary host
- encrypt them when moving to remote storage
- test restore procedures
- Sessions use signed JWT cookies and are invalidated by
sessionVersion. - Cookie
secureis enabled automatically in production when requests are served over HTTPS through a reverse proxy. - State-changing authenticated routes validate
Originagainst the effective request origin andDASHBOARD_URL. GET /api/healthchecks both the database and the proxy, so it is a better signal than checking only whether the web process is alive.- Provider ownership, audit logs, usage history, and system settings are persisted in PostgreSQL.
- Docker actions are restricted twice: by
docker-socket-proxyand by the dashboard-side container allowlist.
providerMutex is in-process only. It protects concurrent provider updates inside one dashboard process, but it is not safe as a distributed lock for multi-instance deployments.