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.
Install Container Manager via Synology “Package Center”. If you run an older DSM version (under 7.2), search for Docker instead of Container Manager.
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.
Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.
Now click the “Create” button. Follow the instructions in the image below.
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:
Check Enable HSTS
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.
Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.
Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.
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.
Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.
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.
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.
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.
Go back to STEP 1 or you will deal with karma 🙂.
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.
Type in your own Email, Name and Password, then click Create Account. Follow the instructions in the image below.
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.
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!
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.
Click General settings. Follow the instructions in the image below.
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.
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.
Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory.
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.
You can now invite your friends/family to your Vaultwarden vault.
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 Wednesday / November 22nd, 2023 at 1:38 AM