Skip to content

Commit 0f741db

Browse files
committed
Set a default password
1 parent ec38b6a commit 0f741db

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ services:
9494
- PGID=1000
9595
- TZ=Etc/UTC
9696
- SETTINGS_ENCRYPTION_KEY=
97+
- DUPLICATI__WEBSERVICE_PASSWORD=
9798
- CLI_ARGS= #optional
9899
volumes:
99100
- /path/to/duplicati/config:/config
@@ -113,6 +114,7 @@ docker run -d \
113114
-e PGID=1000 \
114115
-e TZ=Etc/UTC \
115116
-e SETTINGS_ENCRYPTION_KEY= \
117+
-e DUPLICATI__WEBSERVICE_PASSWORD= \
116118
-e CLI_ARGS= `#optional` \
117119
-p 8200:8200 \
118120
-v /path/to/duplicati/config:/config \
@@ -133,6 +135,7 @@ Containers are configured using parameters passed at runtime (such as those abov
133135
| `-e PGID=1000` | for GroupID - see below for explanation |
134136
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
135137
| `-e SETTINGS_ENCRYPTION_KEY=` | Encryption key for settings database. Minimum 8 characters, alphanumeric. |
138+
| `-e DUPLICATI__WEBSERVICE_PASSWORD=` | Password for the webui. If left unset will default to `changeme` and can be changed from the webui settings. |
136139
| `-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 |
137140
| `-v /config` | Contains all relevant configuration files. |
138141
| `-v /backups` | Path to store local backups. |

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ param_ports:
3333
param_usage_include_env: true
3434
param_env_vars:
3535
- { env_var: "SETTINGS_ENCRYPTION_KEY", env_value: "", desc: "Encryption key for settings database. Minimum 8 characters, alphanumeric."}
36+
- { 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."}
3637

3738
# optional container parameters
3839
opt_param_usage_include_env: true

root/etc/s6-overlay/s6-rc.d/init-duplicati-config/run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ if [[ -f "/config/Duplicati-server.sqlite" ]]; then
1616
fi
1717
else
1818
# New install
19+
if [[ -z ${DUPLICATI__WEBSERVICE_PASSWORD} ]]; then
20+
printf "changeme" > /run/s6/container_environment/DUPLICATI__WEBSERVICE_PASSWORD
21+
fi
1922
if [[ -n ${SETTINGS_ENCRYPTION_KEY} ]]; then
2023
# Enable settings encryption
2124
true

0 commit comments

Comments
 (0)