How to Install Vaultwarden on Your Synology NAS

How to Install Vaultwarden on Your Synology NAS

Vaultwarden is an unofficial Bitwarden server implementation written in Rust. Vaultwarden is compatible with the official Bitwarden clients, and is ideal for self-hosted deployments where running the official resource-heavy service is undesirable. In this step by step guide I will show you how to install Vaultwarden on your Synology NAS using Docker. If you are a more proficient user, I recommend the following installation for Vaultwarden: Install Vaultwarden With Portainer. Note: If you want to Install the official Bitwarden, check out my new article on How to Install Bitwarden on Your Synology NAS.

💡Note: This guide works perfectly with the latest version of Vaultwarden 1.30.5

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Container Manager via Synology “Package Center”. If you run an older DSM version (under 7.2), search for Docker instead of Container Manager.

Download Container Manager Synology Docker

  • STEP 3

Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.

  • STEP 4

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 1

  • STEP 5

Now click the “Create” button. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 2

  • STEP 6

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in Vaultwarden. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: vaultwarden.yourname.synology.me
Port: 443

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 5151

Vaultwarden Synology NAS Set up 3

  • STEP 7

On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.

Synology Proxy WebSocket

  • STEP 8

Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 4

  • STEP 9

Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 5

  • STEP 10

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it vaultwarden. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Vaultwarden Synology NAS Set up 6

  • STEP 11

Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.

Synology User Defined Script

  • STEP 12

Once you click on User-defined script, a new window will open. Follow the instructions below:

  1. General: In the Task field type in Install Vaultwarden. Uncheck the “Enabled” option. Select root User.
  2. Schedule: Select Run on the following date then select “Do not repeat“.
  3. Task Settings: Check “Send run details by email“, add your email then copy paste the code below in the Run command area. After that, click OK.
docker run -d --name=vaultwarden \
-p 3012:3012 \
-p 5151:80 \
-e ADMIN_TOKEN=mariushosting007mariushosting@@@ \
-v /volume1/docker/vaultwarden:/data \
--restart always \
vaultwarden/server

Note: Before you paste the code above in the Run command area below, change the value for the ADMIN_TOKEN with your own value. mariushosting007mariushosting@@@ is an example for an admin token, you should invent your own admin token. Note: A long admin token is better. You can use letters, numbers and special characters.

Vaultwarden Synology NAS Set up 8 new 2023

  • STEP 13

After you click OK on STEP 12 a new warning pop up window will open. Click OK.

Vaultwarden Synology NAS Set up 9

After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.

Synology Task Scheduler Confirm Admin Password

  • STEP 14

After you click Submit on STEP 13, select your “Install Vaultwarden” Task then click the “Run” tab. You will be asked to run Install Vaultwarden – click OK. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 10

  • STEP 15

Go back to STEP 1 or you will deal with karma 🙂.

  • STEP 16

Now open your browser and type in your HTTPS/SSL certificate like this https://vaultwarden.yourname.synology.me In my case it’s https://vaultwarden.mariushosting.synology.me If everything goes right, you will see the Vaultwarden homepage. Click Create account. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 11

  • STEP 17

Type in your own Email, Name and Password, then click Create Account. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 12

  • STEP 18

Your account is created! Type in your own Email that you have previously added at STEP 17 then click Continue. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 13

  • STEP 19

Your account is created! Type in your own Master password that you have previously created at STEP 17 then click Log in with master password. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 14

Your Vaultwarden at a glance!

Vaultwarden Synology NAS Set up 15

  • STEP 20

Now open your browser and connect to your own synology.me DDNS address, for example https://vaultwarden.yourname.synology.me/admin You will be asked for an Authentication key. Copy paste your own ADMIN_TOKEN that you have previously created at STEP 12 then click Enter. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 16

  • STEP 21

Click General settings. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 17

  • STEP 22

In the Domain URL field type in your own synology.me DDNS instead of http. Disable user registration by unchecking the Allow new signups. Click Save to save the settings.

Vaultwarden Synology NAS Set up 18 new 2023

  • STEP 23

Now set up your Vaultwarden SMTP. This can be useful if you want to invite new users in Vaultwarden. Click SMTP Email Settings. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 19

  • STEP 24

Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory.

  • STEP 25

Add your own SMTP settings from your email provider. You can test if everything works perfectly by sending a test email. Click Save to save the settings. Follow the instructions in the image below.

Vaultwarden Synology NAS Set up 20

  • STEP 26

You can now invite your friends/family to your Vaultwarden vault.

Invite new users in Vaultwarden 2023

Enjoy Vaultwarden!

Note: Can I run Docker on my Synology NAS? See the supported models.
Note: Find out how to update the Vaultwarden container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Thursday / April 11th, 2024 at 5:01 PM