Skip to content

Vaultwarden (Bitwarden) in Docker on a Synology NAS

Please note if you are using DSM7.2 or higher you should use the Container Manager version of this guide from the menu.
This guide has reached the end of its updates as most people are now on the latest DSM update - This guide is correct as of 08/12/2023 however no further updates will be added.
Adjusted the Reverse Proxy for WebSockets28/08/2023
Historic updates now at the end of the guide.

What is Vaultwarden/Bitwarden?

Vaultwarden is a rewrite of the official Bitwarden server using the Rust language, it was created to reduce the need for the number of containers required for the official server.

It is compatible with all the official Bitwarden apps and Browser extensions. It is a great way to self-host a password manager it gives you complete control over your passwords and allows you to have automatic syncing across web, desktop and mobile apps.

Let’s Begin

This guide contains three parts:

  • Part 1 — Setting up the container via the DSM GUI
  • Part 2 — Setting up DDNS, Reverse Proxy and SSL
  • Part 3 — Setting up the Bitwarden Clients

Before we start head over to the short guide below to set up a Bridge Network

Part 1 — Container Set up (DSM GUI)

Downloading the Vaultwarden Image

Open up Docker within DSM and navigate to the ‘Registry’ section and search for ‘vaultwarden’ in the search box and download the ‘vaultwarden/server’ version

The pop-up box will ask which version you want to download, make sure you choose ‘Latest’ from the list of available versions.

Select ‘Latest’ from the tags

You can check the status of the download over on the ‘Image’ tab.

Setting up the container

In Docker click on the ‘Image’ tab, in the list of your containers select the ‘vaultwarden/server’ image and click on ‘Launch’

You will be greeted with the Network screen, we will be using the ‘synobridge’ network we created earlier select it from the list and click Next.

General Settings

Next you will be greeted with the General Settings screen, this is where you can start specifying some of your preferences.

You can change the name of the container to anything you like, and you may want to enable Auto Restart as this will ensure the container starts automatically if you reboot your NAS.

You will also notice a Configure capabilities button — don’t change anything in here!

Next up we are going to click on the ‘Advanced Settings’ button, this will take you to a new window with a number of tabs which we are going to work through.


We need to add two additional variables, the first disables any random person signing up for an account on your personal hosted version, the second enables the Admin panel which allows you to invite users.

Argon2 Hashing

As of version 1.28 of Vaultwarden it is recommended to create an Argon2 hashed admin token rather than using a plaintext one. We will be doing this via the Argon2 Hash Generator online if you wish to do this via SSH follow the instructions here.

Go to and enter the following variables into the form and then press ‘Generate Hash’.

OptionVariable to Select or Enter
Plain Text InputEnter either a long string of characters or a secure long ‘password’ aka token, you will use this to log in to your admin panel, so it needs to be secure, and you must remember it!
SaltPress the Cog it will generate a random string of characters
Parallelism Factor4
Memory Cost65540
Hash Length64
Three Argon VersionsSelect Argon2id

As you can see above we have generated our hash.

We can now enter the amended hash into our Environment section.

ADMIN_TOKENYour hashed admin token from above
You must come and change this to false later

You do not need to set up anything on these tabs.

Press ‘Save’ to go back to the initial setup screen, then press ‘Next’

Port Settings

As Vaultwarden uses port 80 for its web interface by default we need to change this to ensure we don’t have any conflicts with DSM’s web functions.

You will see the Container Port section prefilled you must not change these ports. Change the ‘Local ports’ from ‘Auto’ to the values below.

Local PortContainer PortType
Port Settings

Volume Settings

We will now be specifying the directories where Vaultwarden will store its configuration files and database.

Click on Add Folder, click on the ‘docker’ share and create a new sub-folder called ‘vaultwarden’ click on this folder and click ‘select’

In the Mount path section for this folder enter ‘/data’ it should now look like the screenshot below, click next.


You have now completed the setup of the container.

You will be shown an overall summary of the settings we have specified, this is a good time to double-check everything is correct. Finally, click on Done and the container should start to boot.

You should now be able to access the web interface via the IP of your NAS followed by the port 8122


Successful start up

You will not be able to register an account yet, as you must have a valid SSL certificate in place.

Part 2 – DDNS, SSL and Reverse Proxy

Before we start, make sure you have registered for a Synology Account as we are going to be using their DDNS service.

In order to successfully use the reverse proxy you will also need to forward port 443 to you NAS IP. (You will need to check how to do this on your own router) This port will be used for secure web traffic.


A DDNS address allows you to get external access to Vaultwarden and other services via a subdomain provided by Synology, this is useful on home internet connections where your ISP may change your IP address on a regular basis.

Note: If you want to access DSM via this new address you will either need to create an additional Reverse Proxy for it or open port 5001 on your router.

In the DSM Control panel go to ‘External Access’ and then to the ‘DDNS’ tab

Click on ‘Add’, then fill out the following sections.

Service ProviderSynology
HostnameThis can be anything it will be used to access your NAS externally
Email:Log into your Synology account
External Address (IPv4)This should be filled in automatically
External Address (IPv6)This should be filled in automatically if your ISP is using IPv6
Get a Cert from Let’s EncryptTick this box
Enable HeartbeatTick this box

Now press OK, DSM will apply your settings. It can take a few moments to set up and the DSM interface will refresh. You will likely receive a certificate error which you will need to accept to get back into DSM.

Reverse Proxy

So you don’t have to open up additional ports on your router for Vaultwarden we are going to set up a reverse proxy subdomain. This means you can access Vaultwarden without using a port number as it will route all traffic through the secure 443 port.

This can be used for any service on your NAS, it will see the address asked for and internally redirect the request to the port number specified.

Go back into the Control Panel and access the ‘Login Portal’ then in the ‘Advanced’ tab click ‘Reverse Proxy’ and then click on ‘Create’.

We are now going to enter some rules, so when you access the URL specified you will automatically be sent to Vaultwarden web UI.

Use the settings below, you will need to amend the Hostname section in line with the hostname you registered earlier, and the IP of your NAS.

Reverse Proxy Name:bitwarden
Protocol:HTTPS (change the part after ‘bitwarden.’ to your own hostname you registered earlier.
Hostname:Your NAS IP or ‘localhost’

Next click on the ‘Custom Header’ tab and click Create ‘WebSocket’ and then press Save.

You should now be able to access the Bitwarden (Vaultwarden) web UI by going to https://bitwarden.yourhostname it will be a secure connection, and you should have no SSL errors.

SSL Working

Setting up the Admin Settings

As we disabled sign-ups via the main log in screen you will need to invite yourself and any other users from the admin panel.

Go to

Enter the admin token which is the string of text or ‘password’ you used to create the Argon2 token (you don’t use the actual Argon2 string).

Admin Token

We need to change a few options to enable user sign up emails. (Please note that you will not be able to use Gmail SMTP in this step as they have disabled ‘unsecure’ 3rd party application login. Also, if you plan on using Yahoo you will need to set up an app specific password – as shown in this guide)

In General Settings. Amend the Domain URL to your own.

Domain URL

Next you will need to amend your own email settings in the SMTP Email Settings section.

This will need to be in line with your email provider, once you have entered the details click Save at the bottom of the screen, you can then send a test email to yourself to ensure its working.

The final step will be to send yourself an invitation email via the Users’ panel at the top of the page. This allows you to create an account by clicking the link in the email.

Users settings screen

You have now successfully set up Vaultwarden.

Part 3 — Setting Up the Bitwarden Clients.

Now you have set up Vaultwarden you can use the various Mobile, Desktop or Browser Add-ons.

It’s very easy to point these to your personal self-hosted version. In the main login screen click the ‘Logging in on:’ and select ‘Self-hosted’

In the pop-up screen enter your full address for the server e.g.

You have now completed the guide.


Q) I am receiving the notice “You are using a plain text ADMIN_TOKEN which is insecure.”

A) A recent update changed the Admin Token used to access the admin panel to make it more secure. You can follow the next steps to migrate over.

  1. Follow the section of the guide to create the Argon2 token, you can use the existing ‘password’ aka admin token for this as it will still be used for the actual admin login screen, Important: when you get to the part that asks you to add the additional $ into the token skip that and come back here.
  2. Stop the Project and then edit the yaml and completely remove the existing ADMIN_TOKEN variable.
  3. Start the container again and login to the admin panel with your usual admin password. Scroll down to the bottom of the General Settings section and paste your Argon2 hash into the Admin token/Argon2 PHC option and save the settings.
  4. Restart the project again, and you will now be using the new hash and can log in with your usual password

Looking for some help, join our Discord community

If you are struggling with any steps in the guides or looking to branch out into other containers join our Discord community!

Buy me a beverage!

If you have found my site useful please consider pinging me a tip as it helps cover the cost of running things or just lets me stay hydrated. Plus 10% goes to the devs of the apps I do guides for every year.

Historic UpdatesDate
New guide Published29/12/2021
Updated with Admin Panel Options30/12/2021
Changed the port number from 8112 to 8122 so it doesn’t conflict with Deluge01/01/2021
Updated screenshots and steps for DSM7.1 17/06/2022
Added new port settings and Docker Bridge Network23/07/2022
Note added about not using gmail/google/ email for setup and a note about a app specific password for yahoo05/12/2022
Compose version number removed and small wording amendments09/04/2023
Amended the path to save the compose file – this is for security, so the container has no access to the file contents.14/04/2023
Update to Admin_Token to use Argon2 Hash24/04/2023
Historic Updates
Published inDockerOther Tools 7.1Synology


  1. Kenny Kenny

    Another great walkthru Doc. Well I have VaultWarden running on my NAS. Problem is finding a SMTP server to use for sending myself an email to register. Gmail is out. Can you recommend another. Thought Xfinity would be an option but it’s not working for me neither. Thanks for any assistance.

  2. Nim Nim

    Is it possible to run 2 or 3 Vaultwarden instances on the same NAS? I can’t see any issue creating and forwarding multiple HTTP ports, but the port 3012 (I presume for WebSockets) not sure if this needs to be different in each instance or kept the same. Or the same as a container port and then a different port as the local port.

    • Dr_Frankenstein Dr_Frankenstein

      The apps will likely be expecting a specific port for the websockets. You can create multiple users under the same instance if that’s why you are looking to spin up multiple copies.

  3. Rick Rick

    Hey, tied to follow the guide but wasn’t able to get to the point to access to bitwarden after the reverse proxy was set up. It says can’t reach the page. I can confirm my ddns works and was able to ping it. I was able to ddns check and the WAN IP matches with the router WAN ip address. I have port forwarded enable for port 443. So I’m a bit stuck in this section to log into it securely. I am able to log into the bitwarden through the local ip address and port number.

    • Dr_Frankenstein Dr_Frankenstein

      Hey a few things to check
      1) Make sure you are specifying https:// in the url
      2) Double check the proxy settings match up with the guide
      3) Try connecting in a private browser window as a lot of browsers start caching the error page even if the underlying site is working.
      4) It doesn’t sound like it but add any firewall exceptions if required.
      5) Try via a mobile off of Wifi

      Failing that sometimes you might have to give it a little while for the new DDNS domain to update across DNS servers as it can sometimes take a little while.

  4. Marco Marco

    Hello a user using vaultwarden cannot login to the webintferface “an unexpected error” appears.

    Do you have any idea how I can solve this?

  5. M M

    hey great guide – thanks so much. I had an issue using Argon2 hash – when i used the Argon output in encoded form as my ADMIN_TOKEN it wouldn’t accept the token, but if i did it as plain text then it worked. Do I need to use a different environment variable so it knows its using a hased token?

    • Dr_Frankenstein Dr_Frankenstein

      Hey, just to clarify you enter the ARGON2 in your environment variables, you then log in with the ‘password’ you used to create the Hash. If so that would be correct.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed. – writing Synology Docker Guides since 2016 – Join My Discord!