Skip to main content

Environment variables

Configuration for DeployDock is driven by environment variables consumed by apps/api (NestJS) and apps/worker (BullMQ). Local defaults live in apps/api/.env.example in your deploy-dock source checkout.

In this page

API (apps/api)

VariableRequiredDefault (example)Purpose
DATABASE_URLYespostgresql://panel:panel@127.0.0.1:5432/panelPostgreSQL connection string for Prisma.
REDIS_HOSTFor queue127.0.0.1Redis host for BullMQ when the queue module is loaded.
REDIS_PORTFor queue6379Redis port.
JWT_ACCESS_SECRETYeschange-me-to-long-randomSecret used to sign JWT access tokens. Use a long random value in production.
JWT_ACCESS_TTLNo15mAccess token lifetime (string parsed by the auth layer).
PANEL_SECRETS_KEYYeschange-me-32-byte-or-longer-secretKey material for AES-256-GCM encryption of sensitive values (e.g. database user passwords at rest).
PANEL_WEB_ORIGINYes (CORS)http://127.0.0.1:5173Allowed browser origin(s) for CORS; in prod Docker samples use http://localhost:8080. Comma-separated list is supported in code.
PANEL_API_PORTNo4000HTTP listen port for the API process.
PANEL_DRY_RUNNo0When 1, runtime adapters avoid destructive OS mutations (useful for demos; worker compose often sets 1).
PANEL_DISABLE_QUEUENo0When 1, the BullMQ panel queue module is not loaded. Application create/deploy then call finishDeployLocal on the API (marks deployment success without running the worker pipeline).
PANEL_APPS_ROOTNo/var/www/deploy-dock-appsBase path used when computing per-application installPath ({root}/{serverId}/{slugified-name}).
PANEL_FILES_ROOTNo/var/wwwDocumented default for file-manager roots in .env.example (behavior depends on files service implementation).

Secrets (JWT_ACCESS_SECRET, PANEL_SECRETS_KEY) should be rotated on a schedule that matches your policy. Never commit real .env files.

Worker (apps/worker)

The worker reads the following from the environment (see apps/worker/src/main.ts):

VariableRequiredDefaultPurpose
DATABASE_URLYes(set in Compose)Prisma access to the same database as the API.
REDIS_HOSTYes127.0.0.1BullMQ Redis host.
REDIS_PORTNo6379BullMQ Redis port.
REDIS_PASSWORDNounsetOptional Redis password passed to BullMQ connection.
PANEL_DRY_RUNNo0Passed into adapter context as dryRun for provision/build/start steps.

The API does not list REDIS_PASSWORD in .env.example; add it when your Redis instance requires auth.

Docker Compose overrides

  • Dev stack (deploy/docker/docker-compose.yml): sets DATABASE_URL, REDIS_*, JWT_ACCESS_SECRET, PANEL_SECRETS_KEY, PANEL_WEB_ORIGIN, PANEL_DISABLE_QUEUE for api; worker gets PANEL_DRY_RUN=1 by default.
  • Prod-style stack (deploy/docker/docker-compose.prod.yml): supports shell defaults for JWT_ACCESS_SECRET, PANEL_SECRETS_KEY, PANEL_WEB_ORIGIN, PANEL_DRY_RUN via ${VAR:-default} patterns in the compose file.

Security notes

From the monorepo README: database user secrets at rest use AES-256-GCM via PANEL_SECRETS_KEY. OS-level operations are intended to go through allowlisted commands in @deploydock/command-runner. Prefer PANEL_DRY_RUN=1 when demonstrating the stack without mutating the host.

For the canonical list of keys as checked into the repo, open deploy-dock/apps/api/.env.example.