Skip to content

Dockup reads one YAML file, by default /etc/dockup/dockup.yml (override with --config or DOCKUP_CONFIG). Per-source policy is not configured here: it lives on volume and container labels, see Labels reference.

yaml
host: nas-01
listen: ":9779"
state-dir: /var/lib/dockup
tmp-dir: /var/lib/dockup/tmp
timezone: Europe/Berlin
log-level: info
log-format: json
max-concurrent: 1
helper-image: gitea.vladfaust.com/vladfaust/dockup:latest
KeyDefaultDescription
hostcontainer hostnameIdentifies this host in archive keys. Set it explicitly (compose hostname:) — the default is the container id.
listen:9779Address for /healthz, /readyz and /metrics.
state-dir/var/lib/dockupSQLite state, the instance lock and the spool directory. Use a persistent volume.
tmp-dir<state-dir>/tmpWhere archives are spooled before upload. Must hold the largest compressed archive.
timezoneUTCIANA name used by cron schedules and retention buckets.
log-levelinfodebug, info, warn, error.
log-formatjsonjson or text.
max-concurrent1How many backups may run at once.
helper-imagecurrent imageImage used for short-lived archive/restore containers.
stop-timeout30sGrace period before a container stopped for a backup is killed.

defaults ​

Applied to every source that does not override them with labels.

yaml
defaults:
  schedule: daily
  targets: [nas]
  filename: "{source}_{timestamp}"
  compression: zstd
  encrypt: false
  verify: false
  catch-up: false
  keep-last: 7
  keep-daily: 0
  keep-weekly: 0
  keep-monthly: 0
  max-age: 0

When targets is empty and exactly one target is configured, that target is used.

schedules ​

Named cron expressions referenced by dockup.schedule. Five field syntax plus @daily, @hourly, @weekly, @monthly, @yearly, @every <duration>.

yaml
schedules:
  hourly: "17 * * * *"
  daily: "23 3 * * *"
  weekly: "41 4 * * 0"
  monthly: "13 5 1 * *"

The four names above are built in and can be overridden. A dockup.schedule value that is not a configured name is parsed as an inline cron expression.

targets ​

Each target is a destination. local and s3 are supported.

yaml
targets:
  nas:
    type: local
    path: /backups
    prefix: dockup

  s3:
    type: s3
    endpoint: https://s3.example.com   # omit for AWS
    region: eu-central-1
    bucket: dockup
    prefix: dockup
    access-key: ${S3_ACCESS_KEY}
    secret-key: ${S3_SECRET_KEY}
    session-token: ""
    force-path-style: true             # needed by MinIO and most S3 clones
KeyApplies toDescription
typebothlocal or s3.
prefixbothKey prefix. Defaults to dockup.
pathlocalDirectory that receives the archives.
endpoints3Custom S3 endpoint URL.
regions3Signing region.
buckets3Bucket name.
access-key, secret-key, session-tokens3Credentials. Prefer the -file variants or environment variables.
force-path-styles3Use endpoint/bucket/key instead of bucket.endpoint/key.

Secrets ​

Every secret accepts three forms, in order of precedence:

yaml
secret-key: literal                 # wins when set
secret-key-file: /run/secrets/s3    # read at startup, trailing whitespace trimmed
secret-key: ${S3_SECRET_KEY}        # environment interpolation

${VAR} fails fast when the variable is unset. ${VAR:-fallback} supplies a default.

Secrets never appear in logs, dockup config show or dockup status: they are replaced with **redacted**.

encryption ​

yaml
encryption:
  age:
    recipients:
      - age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
    identity: /run/secrets/age-identity   # for restores
    # or, for passphrase encryption:
    passphrase-file: /run/secrets/age-passphrase
  • recipients encrypt. A source only encrypts when dockup.encrypt=true (or defaults.encrypt).
  • identity decrypts X25519 archives, passphrase decrypts passphrase archives. identity and passphrase are mutually exclusive.
  • Archives are compressed first, then encrypted, and get a .age suffix.

hooks ​

Named command sets, referenced by a container's dockup.hook label. Commands run inside that container with sh -c.

yaml
hooks:
  postgres:
    pre:
      - pg_dump -Fc -f /var/lib/postgresql/dump.pgcustom app
    post:
      - rm -f /var/lib/postgresql/dump.pgcustom

A failing pre command aborts the backup for that source; post commands always run, including after a failure.

notify ​

yaml
notify:
  on-success: false
  webhook:
    url: https://example.com/dockup
    headers:
      Authorization: Bearer ${WEBHOOK_TOKEN}
  healthcheck:
    success: https://hc-ping.com/<uuid>
    fail: https://hc-ping.com/<uuid>/fail
  telegram:
    token-file: /run/secrets/telegram-token
    chat-id: "123456789"
KeyDescription
on-successAlso notify when a run succeeds (failures are always notified).
—Every channel is independent: a failing notification is logged and never fails the backup.
webhook.urlReceives a JSON run summary via POST.
webhook.headersExtra request headers; values are redacted from output.
healthcheck.success / .failGET pings in the healthchecks.io style.
telegram.token / .chat-idBot API message delivery.

Environment overrides ​

VariableConfiguration key
DOCKUP_CONFIGconfiguration file path
DOCKUP_HOSThost
DOCKUP_LISTENlisten
DOCKUP_STATE_DIRstate-dir
DOCKUP_TMP_DIRtmp-dir
DOCKUP_TIMEZONEtimezone
DOCKUP_LOG_LEVELlog-level
DOCKUP_LOG_FORMATlog-format
DOCKUP_MAX_CONCURRENTmax-concurrent
DOCKUP_HELPER_IMAGEhelper-image
DOCKUP_STOP_TIMEOUTstop-timeout
DOCKUP_DEFAULT_SCHEDULEdefaults.schedule
DOCKUP_DEFAULT_TARGETSdefaults.targets (comma separated)
DOCKUP_DEFAULT_FILENAMEdefaults.filename
DOCKUP_DEFAULT_COMPRESSIONdefaults.compression
DOCKUP_DEFAULT_ENCRYPTdefaults.encrypt
DOCKUP_DEFAULT_VERIFYdefaults.verify
DOCKUP_DEFAULT_CATCH_UPdefaults.catch-up
DOCKUP_DEFAULT_KEEP_LASTdefaults.keep-last
DOCKUP_DEFAULT_KEEP_DAILYdefaults.keep-daily
DOCKUP_DEFAULT_KEEP_WEEKLYdefaults.keep-weekly
DOCKUP_DEFAULT_KEEP_MONTHLYdefaults.keep-monthly
DOCKUP_DEFAULT_MAX_AGEdefaults.max-age
DOCKUP_AGE_RECIPIENTSencryption.age.recipients (comma separated)
DOCKUP_AGE_IDENTITYencryption.age.identity
DOCKUP_AGE_PASSPHRASEencryption.age.passphrase
DOCKUP_NOTIFY_ON_SUCCESSnotify.on-success
DOCKUP_NOTIFY_WEBHOOK_URLnotify.webhook.url
DOCKUP_NOTIFY_HEALTHCHECK_OKnotify.healthcheck.success
DOCKUP_NOTIFY_HEALTHCHECK_FAILnotify.healthcheck.fail
DOCKUP_NOTIFY_TELEGRAM_TOKENnotify.telegram.token
DOCKUP_NOTIFY_TELEGRAM_CHAT_IDnotify.telegram.chat-id

Targets and hooks are map-valued, so they are configured in YAML and use ${VAR} interpolation plus -file secrets rather than a long list of environment variables.

Example ​

yaml
host: nas-01
state-dir: /var/lib/dockup

defaults:
  schedule: daily
  targets: [nas]
  keep-daily: 7
  keep-weekly: 4
  keep-monthly: 12
  max-age: 400d
  encrypt: true

targets:
  nas:
    type: local
    path: /backups
  offsite:
    type: s3
    endpoint: https://s3.example.com
    region: us-east-1
    bucket: dockup-nas-01
    force-path-style: true
    access-key: ${S3_ACCESS_KEY}
    secret-key-file: /run/secrets/s3-secret

encryption:
  age:
    recipients: [${AGE_RECIPIENT}]
    identity: /run/secrets/age-identity

hooks:
  postgres:
    pre: ["pg_dump -Fc -f /var/lib/postgresql/dump.pgcustom app"]
    post: ["rm -f /var/lib/postgresql/dump.pgcustom"]

notify:
  healthcheck:
    success: ${HC_PING_URL}
    fail: ${HC_PING_URL}/fail
  telegram:
    token-file: /run/secrets/telegram-token
    chat-id: ${TELEGRAM_CHAT_ID}

Released under the Mozilla Public License 2.0.