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.
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.
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.
STEP 5
Now click the “Create” button. Follow the instructions in the image below.
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
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.
STEP 8
Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.
STEP 9
Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.
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.
STEP 11
Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.
STEP 12
Once you click on User-defined script, a new window will open. Follow the instructions below:
- General: In the Task field type in Install Vaultwarden. Uncheck the “Enabled” option. Select root User.
- Schedule: Select Run on the following date then select “Do not repeat“.
- 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.
STEP 13
After you click OK on STEP 12 a new warning pop up window will open. Click OK.
After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.
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.
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.
STEP 17
Type in your own Email, Name and Password, then click Create Account. Follow the instructions in the image below.
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.
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.
Your Vaultwarden at a glance!
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.
STEP 21
Click General settings. Follow the instructions in the image below.
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.
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.
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.
STEP 26
You can now invite your friends/family to your Vaultwarden vault.
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 Monday / November 18th, 2024 at 8:58 PM