This example configuration, especially the docker run command, is intended for use on synology nas devices (DSM 7 and DSM 6).
In this example, vaultwarden web will run on port 4444. Vaultwarden docker container will run on port 5151
and websocket (rocket) will run on port 5152
. These ports will be mapped inside the container.
Also the folder /volume1/docker/vaultwarden
will be mapped to /data
inside the container.
- Nginx: Change
Servername
to your synology server name where vaultwarden should be accessible - Nginx: change the
ssl_certificate
options to your needs - Docker: Change Timezone (
--env "TZ=Europe/Berlin"
) to your needs.
- Copy
vaultwarden.conf
to/usr/local/etc/nginx/sites-enabled/vaultwarden.conf
- Restart nginx service
synoservice -restart nginx
- In case of errors, check logs located in
/var/log/nginx/
- In case of errors, check logs located in
docker run \
--name "vaultwarden" \
--privileged \
--runtime "runc" \
--volume "/volume1/docker/vaultwarden:/data:rw" \
--log-driver "db" \
--restart "always" \
--publish "0.0.0.0:5152:3012/tcp" \
--publish "0.0.0.0:5151:80/tcp" \
--network "bridge" \
--hostname "vaultwarden" \
--expose "3012/tcp" \
--expose "80/tcp" \
--env "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
--env "LOG_FILE=/data/bitwarden.log" \
--env "TZ=Europe/Berlin" \
--env "WEBSOCKET_ENABLED=true" \
--detach \
--tty \
--interactive \
"vaultwarden/server:latest" \
"/start.sh"