ConfigurationServer
Server
You can adjust the server configuration with the following environment variables.
You can adjust the server configuration with the following environment variables.
Variables
| Env var | Required | Description | Supported values | Default value when missing |
|---|---|---|---|---|
DD_PUBLIC_URL | ⚪ | Public-facing URL for OIDC callbacks and links (auto-detected from request if not set) | URL (e.g., https://drydock.example.com) | auto-detected |
DD_SERVER_ENABLED | ⚪ | If REST API must be exposed | true, false | true |
DD_SERVER_PORT | ⚪ | Http listener port | from 0 to 65535 | 3000 |
DD_SERVER_TRUSTPROXY | ⚪ | Trust X-Forwarded-For headers when behind a reverse proxy | true, false, or hop count (1, 2, etc.) | false |
DD_SERVER_TLS_ENABLED | ⚪ | Enable HTTPS+TLS | true, false | false |
DD_SERVER_TLS_KEY | ⚪ | TLS server key (required when DD_SERVER_TLS_ENABLED is enabled) | File path to the key file | |
DD_SERVER_TLS_CERT | ⚪ | TLS server certificate (required when DD_SERVER_TLS_ENABLED is enabled) | File path to the cert file | |
DD_SERVER_CORS_ENABLED | ⚪ | Enable CORS Requests | true, false | false |
DD_SERVER_CORS_ORIGIN | ⚪ | Supported CORS origin | * | |
DD_SERVER_CORS_METHODS | ⚪ | Supported CORS methods | Comma separated list of valid HTTP verbs | GET,HEAD,PUT,PATCH,POST,DELETE |
DD_SERVER_FEATURE_CONTAINERACTIONS | ⚪ | Enable start, stop, restart, and update actions via API and UI | true, false | true |
DD_SERVER_FEATURE_DELETE | ⚪ | If deleting operations are enabled through API & UI | true, false | true |
DD_SERVER_FEATURE_WEBHOOK | ⚪ | Enable the webhook API endpoints | true, false | true |
DD_SERVER_WEBHOOK_TOKEN | ⚪ | Bearer token for webhook authentication (required when webhooks enabled) | Any string | |
DD_SERVER_METRICS_AUTH | ⚪ | Require authentication on /metrics endpoint | true, false | true |
DD_SESSION_SECRET | ⚪ | Override the auto-generated session secret for cookie signing | Any string | auto-generated |
DD_RUN_AS_ROOT | ⚪ | Skip privilege drop from root to node user (required for read-only socket mounts) | true, false | false |
Examples
Disable http listener
services:
drydock:
image: codeswhat/drydock
...
environment:
- DD_SERVER_ENABLED=falsedocker run \
-e DD_SERVER_ENABLED=false \
...
codeswhat/drydockSet http listener port to 8080
services:
drydock:
image: codeswhat/drydock
...
environment:
- DD_SERVER_PORT=8080docker run \
-e DD_SERVER_PORT=8080 \
...
codeswhat/drydockEnable HTTPS
services:
drydock:
image: codeswhat/drydock
...
environment:
- DD_SERVER_TLS_ENABLED=true
- DD_SERVER_TLS_KEY=/drydock_certs/server.key
- DD_SERVER_TLS_CERT=/drydock_certs/server.crtdocker run \
-e "DD_SERVER_TLS_ENABLED=true" \
-e "DD_SERVER_TLS_KEY=/drydock_certs/server.key" \
-e "DD_SERVER_TLS_CERT=/drydock_certs/server.crt" \
...
codeswhat/drydockReverse proxy (trust proxy)
services:
drydock:
image: codeswhat/drydock
...
environment:
- DD_SERVER_TRUSTPROXY=1docker run \
-e DD_SERVER_TRUSTPROXY=1 \
...
codeswhat/drydockSecrets from files
Any DD_* environment variable can be loaded from a file by appending __FILE to the variable name and setting the value to the file path. This is useful for Docker secrets and other secret management tools.
services:
drydock:
image: codeswhat/drydock
...
environment:
- DD_SERVER_WEBHOOK_TOKEN__FILE=/run/secrets/webhook_token
secrets:
- webhook_token
secrets:
webhook_token:
file: ./webhook_token.txtdocker run \
-e DD_SERVER_WEBHOOK_TOKEN__FILE=/run/secrets/webhook_token \
-v ./webhook_token.txt:/run/secrets/webhook_token:ro \
...
codeswhat/drydock