dbdock.config.json, environment variables, or a mix of both. Secrets always live in environment variables — never in the config file.
Config file structure
dbdock.config.json has four top-level sections:
Database
Option 1 — URL via environment (recommended)
SetDBDOCK_DB_URL or DATABASE_URL to a full PostgreSQL URL. When present, it overrides anything in dbdock.config.json.
Option 2 — Config file with password in env
DBDOCK_DB_PASSWORD.
Option 3 — .pgpass
For host-level credential isolation, use PostgreSQL’s .pgpass file:
.pgpass automatically when present.
Storage
Pick one provider. Each has its own dedicated page with setup instructions:Local
Filesystem storage for single-server setups.
AWS S3
S3 or any S3-compatible service.
Cloudflare R2
Zero-egress object storage.
Cloudinary
Media platform with generous free tier.
Backup
Encryption key is read from
DBDOCK_ENCRYPTION_SECRET. Generate a key:
Alerts
See the dedicated alert pages for setup:SMTP via Gmail, SendGrid, SES, Mailgun, or any provider.
Slack
Incoming webhooks.
Environment variables reference
DBDock reads from both.env and .env.local. .env.local takes priority.
Database
Storage
Encryption
Alerts
Runtime
Strict mode
SetDBDOCK_STRICT_MODE=true to enforce environment-only secrets. DBDock will refuse to load any configuration where a secret appears in the config file, preventing accidental commits.
Recommended for CI and production.
Config migration
If you have secrets indbdock.config.json from an older version:
.env, cleans up the config file, and updates .gitignore. See migrate-config.
