Skip to content

Commit

Permalink
Set a default password
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed Aug 29, 2024
1 parent ec38b6a commit 0f741db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ services:
- PGID=1000
- TZ=Etc/UTC
- SETTINGS_ENCRYPTION_KEY=
- DUPLICATI__WEBSERVICE_PASSWORD=
- CLI_ARGS= #optional
volumes:
- /path/to/duplicati/config:/config
Expand All @@ -113,6 +114,7 @@ docker run -d \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e SETTINGS_ENCRYPTION_KEY= \
-e DUPLICATI__WEBSERVICE_PASSWORD= \
-e CLI_ARGS= `#optional` \
-p 8200:8200 \
-v /path/to/duplicati/config:/config \
Expand All @@ -133,6 +135,7 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e SETTINGS_ENCRYPTION_KEY=` | Encryption key for settings database. Minimum 8 characters, alphanumeric. |
| `-e DUPLICATI__WEBSERVICE_PASSWORD=` | Password for the webui. If left unset will default to `changeme` and can be changed from the webui settings. |
| `-e CLI_ARGS=` | Optionally specify any [CLI variables](https://duplicati.readthedocs.io/en/latest/07-other-command-line-utilities/) you want to launch the app with |
| `-v /config` | Contains all relevant configuration files. |
| `-v /backups` | Path to store local backups. |
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ param_ports:
param_usage_include_env: true
param_env_vars:
- { env_var: "SETTINGS_ENCRYPTION_KEY", env_value: "", desc: "Encryption key for settings database. Minimum 8 characters, alphanumeric."}
- { env_var: "DUPLICATI__WEBSERVICE_PASSWORD", env_value: "", desc: "Password for the webui. If left unset will default to `changeme` and can be changed from the webui settings."}

# optional container parameters
opt_param_usage_include_env: true
Expand Down
3 changes: 3 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-duplicati-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ if [[ -f "/config/Duplicati-server.sqlite" ]]; then
fi
else
# New install
if [[ -z ${DUPLICATI__WEBSERVICE_PASSWORD} ]]; then
printf "changeme" > /run/s6/container_environment/DUPLICATI__WEBSERVICE_PASSWORD
fi
if [[ -n ${SETTINGS_ENCRYPTION_KEY} ]]; then
# Enable settings encryption
true
Expand Down

0 comments on commit 0f741db

Please sign in to comment.