I’m trying to set up Duplicati in a Docker container using a preload file to initialize the settings encryption key and the web UI password. However, when I start the container, I always get the following error:
duplicati | Missing encryption key, unable to encrypt your settings database
duplicati | Please set a value for SETTINGS_ENCRYPTION_KEY and recreate the container
My preload.json looks like this:
{
"env": {
"server": {
"SETTINGS_ENCRYPTION_KEY": "password",
"DUPLICATI__WEBSERVICE_PASSWORD": "password"
}
}
}
The file is located in the same directory as my docker-compose.yml:
/mnt/Rust/configs/dockge/stacks/duplicati
Permissions are:
-rwxrwxrwx 1 root root 140 Jun 28 12:25 preload.json
My docker-compose.yml is:
services:
duplicati:
image: lscr.io/linuxserver/duplicati:latest
container_name: duplicati
environment:
- PUID=0
- PGID=0
- TZ=Europe/Berlin
- DUPLICATI_PRELOAD_SETTINGS=/run/secrets/preloadsettings
volumes:
- /mnt/Rust/configs/duplicati:/config
- /mnt/Rust/backups:/backups
- /mnt/Rust/configs:/source/configs:ro
- /mnt/Rust/truenas-configs:/source/truenas:ro
ports:
- 8200:8200
restart: unless-stopped
secrets:
- preloadsettings
secrets:
preloadsettings:
file: ./preload.json
networks: {}
From what I can tell:
-
The preload file is in the correct location.
-
Docker appears to mount the secret without errors.
-
The file permissions seem fine.
Am I missing something in the JSON structure or the Docker configuration?