Skip to Content

Dokploy

Deploy Greenlight as a Compose app in Dokploy .

Steps

  1. Create a Compose application pointing at this repository.

  2. Set the compose file to docker-compose.self-host.yml.

  3. Generate secrets locally with npm run env:ensure -- --profile self-host, then paste variables from .env.self-host (or start from .env.self-host.example and set secrets yourself).

  4. Confirm strong secrets are set:

    • POSTGRES_PASSWORD
    • AUTH_SECRET
    • CALLBACK_SIGNING_SECRET
    • WEBHOOK_SECRET
    • GREENLIGHT_API_KEY (bootstraps admin key when USE_AUTH=true and api_keys is empty)
  5. Set PUBLIC_WEBHOOK_URL to your public HTTPS API host (no trailing slash).

  6. Route traffic in Dokploy (services use expose, not host ports):

    Two subdomains (recommended):

    Public URLServiceContainer portPath
    https://app.example.comgreenlight-ui3000/
    https://api.example.comgreenlight8100/
    AUTH_URL=https://app.example.com PUBLIC_WEBHOOK_URL=https://api.example.com

    Same host with path prefix (e.g. API under /wh):

    Public URLServiceContainer portPath in Dokploy
    https://greenlight.example.comgreenlight-ui3000/
    https://greenlight.example.com/whgreenlight8100/wh (leading slash required)
    AUTH_URL=https://greenlight.example.com PUBLIC_WEBHOOK_URL=https://greenlight.example.com/wh

    Traefik/Dokploy must strip /wh when forwarding to core (core routes are rooted at /webhooks, /v1, /healthz, not /wh/...).

    Health checks (internal container probes only — not public URLs):

    ServiceProbe URL
    greenlight-uihttp://127.0.0.1:3000/api/health
    greenlighthttp://127.0.0.1:8100/healthz

    Do not use /wh/healthz for API health — /healthz is not under the /wh prefix.

  7. Deploy, then register channels via API or the Admin UI.

Docs site only (build on server): use compose file docker-compose.docs.build.yml with .env.docs — see Docker.

Webhook URLs

Each channel uses:

{PUBLIC_WEBHOOK_URL}/webhooks/{organization_id}/{platform}/{channel_id}

Configure that URL in Slack Event Subscriptions, Azure Bot messaging endpoint, Discord Interactions, Meta Callback URL, Google Chat App URL, etc.

After deploy

  • Open the Admin UI /setup once to create the super admin
  • Register at least one PROMPT channel
  • Send a test prompt from the UI or POST /v1/prompts/new

See Platforms for per-platform webhook details.