DBdock can be configured viaDocumentation Index
Fetch the complete documentation index at: https://docs.dbdock.xyz/llms.txt
Use this file to discover all available pages before exploring further.
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
| Field | Type | Default | Description |
|---|---|---|---|
format | 'custom' | 'plain' | 'directory' | 'tar' | 'custom' | PostgreSQL backup format |
compression.enabled | boolean | true | Apply zstd compression |
compression.level | 0–11 | 6 | zstd compression level |
encryption.enabled | boolean | true | AES-256-GCM encryption |
retention.enabled | boolean | true | Enable automatic cleanup |
retention.maxBackups | number | 100 | Cap total backup count |
retention.maxAgeDays | number | 30 | Delete backups older than N days |
retention.minBackups | number | 5 | Never delete below this count |
retention.runAfterBackup | boolean | true | Run cleanup after each backup |
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
| Variable | Description |
|---|---|
DBDOCK_DB_URL | Full PostgreSQL URL |
DATABASE_URL | Same as DBDOCK_DB_URL (alternative name) |
DBDOCK_DB_PASSWORD | Password (when not using URL form) |
DB_HOST | Database host |
DB_PORT | Database port |
DB_USER | Database user |
DB_NAME | Database name |
Storage
| Variable | Description |
|---|---|
STORAGE_PROVIDER | local | s3 | r2 | cloudinary |
STORAGE_BUCKET | Bucket/container name |
STORAGE_LOCAL_PATH | Path for local storage |
DBDOCK_STORAGE_ACCESS_KEY | S3/R2 access key |
DBDOCK_STORAGE_SECRET_KEY | S3/R2 secret key |
DBDOCK_CLOUDINARY_API_KEY | Cloudinary API key |
DBDOCK_CLOUDINARY_API_SECRET | Cloudinary API secret |
Encryption
| Variable | Description |
|---|---|
DBDOCK_ENCRYPTION_SECRET | 64-char hex key |
ENCRYPTION_ENABLED | true | false |
ENCRYPTION_ITERATIONS | PBKDF2 iterations (default 100000) |
Alerts
| Variable | Description |
|---|---|
DBDOCK_SMTP_USER | SMTP username |
DBDOCK_SMTP_PASS | SMTP password |
DBDOCK_SLACK_WEBHOOK | Slack incoming webhook URL |
DBDOCK_CUSTOM_WEBHOOK | Custom HTTP webhook URL |
Runtime
| Variable | Description |
|---|---|
DBDOCK_CONFIG_PATH | Path to dbdock.config.json (default: ./dbdock.config.json) |
DBDOCK_STRICT_MODE | true to refuse any secret read from the config file |
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.
