This guide deploys Agent Commander on Coolify with Cloudflare DNS.
Production:
yourdomain.com- public feature dive sitedocs.yourdomain.com- documentationapp.yourdomain.com- dashboard (keep private if not public)api.yourdomain.com- control plane (keep private if not public)
Local development:
localhost:3000- dashboardlocalhost:8080- control plane
If you are not running a public app, only create DNS records for yourdomain.com,
docs.yourdomain.com, and www.yourdomain.com (redirect to apex).
Create a new project in Coolify and attach a Postgres database.
Create a service from this repo using deploy/Dockerfile.control-plane.base.
Environment:
DATABASE_URL- from Coolify PostgresJWT_SECRET- strong secretHOST=0.0.0.0PORT=8080- Optional
OPENAI_API_KEY,OPENAI_MODEL - Optional
DEEPGRAM_API_KEY
Domain:
api.yourdomain.com(optional, keep private if you are not exposing the API)
Health check:
/health
Create a service from this repo using deploy/Dockerfile.dashboard.base.
Environment:
NEXTAUTH_URL=https://app.yourdomain.comNEXTAUTH_SECRET- strong secretCONTROL_PLANE_JWT_SECRET- must matchJWT_SECRETNEXT_PUBLIC_CONTROL_PLANE_URL=https://api.yourdomain.comNEXT_PUBLIC_CONTROL_PLANE_WS_URL=wss://api.yourdomain.com/v1/ui/stream- Optional
ACCESS_SECRET(access code login) - Optional
GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET - Optional
ADMIN_EMAILS/ALLOWED_EMAILS
Domain:
app.yourdomain.com(optional, keep private if you are not exposing the dashboard)
If using GitHub OAuth, set:
- Homepage URL:
https://app.yourdomain.com - Callback URL:
https://app.yourdomain.com/api/auth/callback/github
Create two static services from this repo:\n\n1) Feature site (apex)\n- Dockerfile: deploy/Dockerfile.site\n- Domain: yourdomain.com\n\n2) Docs site\n- Dockerfile: deploy/Dockerfile.docs\n- Domain: docs.yourdomain.com
Create A records pointing to your Coolify server IP:
yourdomain.com-><server-ip>docs.yourdomain.com-><server-ip>www.yourdomain.com-><server-ip>(redirect to apex)
Recommended Cloudflare settings:
- SSL/TLS mode: Full (strict)
- Always use HTTPS: on
- WebSockets: on (default)
- Proxy status: proxied (orange cloud)
If you want a scripted setup, see scripts/cloudflare-dns.mjs.
For www redirects, see scripts/cloudflare-redirect.README.md.
- If you want a public demo later, add
appandapiand lock them down with Cloudflare Access.