
On this page
You can find the German version of this guide here: Vaultwarden auf Synology mit Docker selbst hosten
I wanted to manage my passwords on my own Synology NAS. After a year with Proton Pass, I was still unhappy with its browser integration and synchronization. That led me to Vaultwarden.
Vaultwarden is an independent community project that provides a Bitwarden-compatible server. The server runs on the NAS, while computers and smartphones use the official Bitwarden apps.
This guide covers a setup that is accessible only on the home network or through a VPN. It walks through the local name, the HTTPS connection, and signing in to the apps. Updates, certificates, and backups remain the responsibility of the person running the server.
How the setup works
Every device uses the same address: https://vault.ben. Three components work together behind it:
- DNS translates the name
vault.beninto the IP address of the NAS. - Synology’s reverse proxy accepts the encrypted HTTPS connection and forwards requests to Vaultwarden.
- Vaultwarden runs in a Docker container and stores its data in a separate folder on the NAS.
A certificate lets devices verify that they are connecting to the intended server. This setup uses a private certificate authority, so each device must be configured to trust its certificate once.
The following example values are used throughout the guide:
| Setting | Example value |
|---|---|
| Local DNS name | vault.ben |
| Fixed IP address of the NAS | 192.168.1.100 |
| Address for browsers and apps | https://vault.ben |
| Port on the NAS for the container | 31850 |
| Port inside the container | 80 |
| Data folder in the DSM interface | docker/vaultwarden/data |
The name and IP address are placeholders for the local environment. If the name changes, the certificate, reverse proxy, and apps must all use the same replacement name.
Prerequisites
The setup requires a Synology NAS with Docker support, access to DSM administration, and a local DNS server. The DNS server can run on a router, in Pi-hole, or in AdGuard Home, for example.
Access from outside the home network also requires a working VPN. Setting up the VPN itself is outside the scope of this guide. A backup destination outside the NAS should also be available before the password manager enters regular use.
Depending on the DSM version, Synology’s package is called Docker or Container Manager. The screenshots show the Docker interface. Menu labels may differ between versions; the settings described below are what matter.
1. Set up the local name
An A record on the local DNS server points vault.ben to the NAS. This type of record maps a name to an IPv4 address:
vault.ben → 192.168.1.100The NAS needs a fixed IP address. A DHCP reservation on the router is one way to achieve this: the router assigns the same address each time the NAS joins the network.
All devices must use the local DNS server, including devices connected through the VPN. A local DNS record alone does not provide a VPN connection.
2. Prepare the HTTPS certificates
The web interface and apps will connect over trusted HTTPS. This requires two different certificates:
- The root certificate authority (Root CA) certificate is installed on the devices. It establishes trust.
- The server certificate for
vault.benis installed on the NAS. It is signed by the Root CA and identifies the server.
Create a private certificate authority
The process is covered in Create a Custom Root Certificate Authority .
Alternatively, my tool dools.dev provides an interface for creating certificates locally in the browser.
The Root CA’s private key must remain secret and be stored securely. It will be needed to issue future server certificates. Devices receive only the public Root CA certificate, for example as a .der file.
Install the Root CA certificate on the devices
Windows
The installation follows these steps:
- The
.derfile opens with a double-click, followed by Install Certificate. - Local Machine is selected. This requires administrator privileges.
- Place all certificates in the following store enables manual store selection.
- Trusted Root Certification Authorities is the required store. The wizard then completes the installation.
macOS
Keychain Access can import the certificate into the System keychain and mark it as trusted. The same operation is available in Terminal:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /path/to/root-ca.deriPhone and iPad
Installation and trust are separate steps:
- The Root CA certificate is transferred to the device, for example through AirDrop, and opened.
- The downloaded profile is installed under Settings → General → VPN & Device Management.
- Full trust for the Root CA is enabled under Settings → General → About → Certificate Trust Settings.
The third step is required in addition to installing the profile. Without it, the HTTPS connection may still be rejected.
Android
The certificate is imported under Settings → Security → Encryption & credentials → Install a certificate → CA certificate. The exact menu path depends on the device and Android version. Whether an app trusts a manually installed CA also depends on the app.
Browsers and Bitwarden apps should be fully restarted after the import.
Create the server certificate
The Root CA can now issue a certificate for vault.ben. The steps are described in Create HTTPS Certificates with a Custom Root CA
. dools.dev
can also generate this certificate.
The certificate uses the following details:
| Field | Value |
|---|---|
| Common Name (CN) | vault.ben |
| Subject Alternative Name (SAN) | DNS:vault.ben |
| Optional additional SAN | IP:192.168.1.100 |
| Validity period for this example | One year |
The DNS name must appear in the SAN field. The Common Name alone is not enough for modern clients. Apple’s documentation on trusted server certificates describes further requirements.
The later DSM import requires the private key, vault.ben.key, and the server certificate, vault.ben.crt. Depending on the tool, a certificate chain may also be available as vault.ben-fullchain.crt.
These files need secure storage. A calendar reminder a few weeks before the expiry date helps ensure that the server certificate is renewed in time.
3. Set up the Vaultwarden container
Download the image and create a container
An image is the template for a container. It contains Vaultwarden and the components needed to run it.
The image is available through DSM:
- The Docker package opens from DSM. If it is missing, it can be installed through Package Center.
- A search for
vaultwarden/serverunder Registry finds the image. - The image published by the Vaultwarden project is selected and downloaded. A fixed version number makes the installed version easy to track;
latestrefers to the current version.
Under Image, selecting the downloaded image and choosing Launch opens the setup wizard.
The container name is vaultwarden. Enable auto-restart ensures that it starts again after a NAS restart.
Configure the network and ports
Under Advanced Settings → Network, the container uses the Bridge network.
The following mapping is added under Port Settings:
| Local port on the NAS | Container port | Protocol |
|---|---|---|
31850 | 80 | TCP |
Vaultwarden accepts requests on port 80 inside the container. The mapping makes it available to the reverse proxy on NAS port 31850. If that port is already in use, another available port can be chosen. The reverse proxy must later use the same value.
Store the data persistently
The data must survive container replacement. A folder on the NAS is therefore connected to /data inside the container. This connection is called a volume mapping.
In File Station, a vaultwarden/data subfolder is created inside the docker folder. The following mapping is then added under Volume:
| Setting | Value |
|---|---|
| File/folder on the NAS | docker/vaultwarden/data |
| Mount path inside the container | /data |
| Permission | Read/Write |
DSM’s folder picker selects the folder. Its full filesystem path may be /volume1/docker/vaultwarden/data, for example.
Access should be limited to the accounts and services that need it. This folder contains the database and other sensitive installation data.
Configure registration and admin access
Two variables are added under Environment:
| Variable | Value | Purpose |
|---|---|---|
SIGNUPS_ALLOWED | false | Prevents open account registration |
ADMIN_TOKEN | Argon2id hash of a strong, unique password | Protects the administration page at /admin |
A hash is a value used to verify a password. It allows the configuration to store a hash instead of the admin password in plain text. Signing in still requires the original password.
Vaultwarden provides a built-in hash generator . On a computer with Docker, it can be started with:
docker run --rm -it vaultwarden/server /vaultwarden hashAfter the chosen admin password has been entered twice, the tool prints a hash beginning with $argon2id$. That complete value becomes ADMIN_TOKEN in the DSM interface.
Alternatively, dools.dev
can generate the hash using its Vaultwarden preset. For manual configuration, the parameters used here are 65536 KiB of memory, 3 iterations, 4 parallel threads, and a 32-byte hash. A newly generated random salt provides an additional random input to the calculation.
Apply, Next, and Done save the container settings. The container can remain stopped until HTTPS access is ready.
4. Configure the reverse proxy
The reverse proxy is the entry point to Vaultwarden. It accepts HTTPS requests on port 443 and forwards them internally to the container over HTTP.
In DSM, the feature is available under Control Panel → Login Portal → Advanced → Reverse Proxy. Older versions call this area Application Portal.
Create opens a new rule, with Vaultwarden as its description.
The Source and Destination settings are:
| Setting | Source: device connections | Destination: container connection |
|---|---|---|
| Protocol | HTTPS | HTTP |
| Hostname | vault.ben | localhost |
| Port | 443 | 31850 |
Here, localhost refers to the NAS itself. The destination port matches the local container port configured earlier.
Enable WebSockets
WebSockets allow the server to notify connected clients about changes. The relevant setting is under Custom Header → Create → WebSocket.
DSM adds these headers:
| Name | Value |
|---|---|
Upgrade | $http_upgrade |
Connection | $connection_upgrade |
The rule can then be saved.
Import and assign the certificate
The prepared certificate is imported under Control Panel → Security → Certificate → Add → Add a new certificate → Import certificate.
The import fields accept the private key, the server certificate, and any intermediate certificates. A certificate signed directly by the Root CA has no intermediate CA. Devices must already trust the Root CA; importing the server certificate on the NAS does not establish that trust on the devices.
A name such as Vaultwarden - vault.ben makes the certificate easy to identify. After the import, Settings opens the service assignments. The new certificate is assigned to the vault.ben service.
5. Start the container and create the first account
In the Docker package, the vaultwarden container is selected under Container and started through Action → Start. Its status should change to Running. If startup fails, Details → Log shows the error.
On a device connected to the home network, https://vault.ben should now display the sign-in page without a certificate warning. Account setup follows once this works.
Invite the first account
Open registration is disabled by SIGNUPS_ALLOWED=false. The admin page still allows individual invitations:
- The admin page is available at
https://vault.ben/admin. - Sign-in uses the original admin password from which the hash was generated.
- Under Users → Invite User, the intended email address is entered and saved.
- An account can then be created at
https://vault.benusing that exact email address and a separate master password.
This guide does not configure outgoing email. If the registration link is hidden, the registration page is directly available at https://vault.ben/#/signup. The exception for invited accounts is covered in Vaultwarden’s registration documentation
.
The admin password and master password serve different purposes. The admin password protects server administration. The master password protects the personal vault.
Enable two-factor authentication
A second factor, such as an authenticator app, can be configured in the web vault under Account Settings → Security → Two-step Login. The recovery code should be stored securely outside the vault so that it remains available if the phone is lost.
6. Connect the Bitwarden apps to the server
The apps and browser extensions are available through the official Bitwarden download page . Connecting them to Vaultwarden requires selecting the private server before signing in.
The process is similar across the browser extension, desktop app, and mobile app:
- The sign-in screen provides a server selector or settings menu.
- Self-hosted selects a custom server.
- The server URL is set to
https://vault.benand saved. - Sign-in uses the email address and master password of the account created earlier.
The exact location of the server selector depends on the app version. The URL stays the same on every device. Each additional device also needs the Root CA certificate and working local DNS resolution.
Check synchronization
A new test entry in the browser extension is enough for an initial check. After synchronization, it should also appear in the mobile app. A change made on the phone should then appear in the browser.
If the change does not appear, a manual sync in the app is the first check. Further checks are listed in the troubleshooting section.
7. Access Vaultwarden remotely through a VPN
A VPN gives a device access to the home network while away from home. Vaultwarden then remains available at the same address: https://vault.ben.
An existing VPN connection on the router can be used for this. Examples include WireGuard on a supported router or OpenVPN through Synology VPN Server. The suitable option depends on the available hardware.
Vaultwarden does not require its own router ports to be forwarded from the internet. VPN access is configured and secured separately. The reverse proxy alone does not restrict access to the LAN and VPN; router and firewall rules must also enforce that restriction.
Remote access requires the VPN to provide both a route to the NAS and access to the local DNS server. An active VPN connection is not enough if the device still asks a public DNS server to resolve vault.ben.
A simple test uses a smartphone with Wi-Fi disabled: with the VPN connected, https://vault.ben should open in the browser, and the Bitwarden app should synchronize.
8. Maintain backups, updates, and certificates
Back up all required data
A backup includes the entire docker/vaultwarden/data folder, the container settings, and the certificate files. Private keys need particularly secure storage.
The data folder contains the SQLite database, db.sqlite3, and any file attachments, among other files. A database backup alone is therefore not a complete backup.
A simple backup method is to stop the container briefly, back up the entire data folder, and restart the container afterward. Vaultwarden is unavailable during that time. Backups made while the container is running require a method that produces a consistent database copy. Details are covered in Vaultwarden’s backup guide .
Synology Hyper Backup can transfer backups to a USB drive, a second NAS, or cloud storage. A daily schedule with several retained versions is a starting point. If the container remains running during the backup, database consistency must be handled separately. Backups stored outside personally controlled devices should be encrypted before transfer.
At least one copy should be kept outside the NAS. A restore test is equally important: a backup becomes dependable only once it has been used to restore a working installation.
Update Vaultwarden
An update starts with a complete backup. The desired new vaultwarden/server image is then downloaded, and the container is updated or recreated with it. The exact menu sequence depends on the Docker or Container Manager version.
The port mapping, environment variables, and especially the volume mapping to the existing data folder must be retained. After startup, signing in and synchronization are checked again.
Renew certificates and prepare for recovery
Before the server certificate expires, the existing Root CA issues a new certificate for the same name. The new certificate is imported into DSM and assigned to the reverse proxy rule. As long as the Root CA remains unchanged and valid, it does not need to be reinstalled on the devices.
Recovery on a replacement NAS requires restoring the data folder while the container is stopped and applying the documented container settings. The DNS record, reverse proxy, and certificate must also match the replacement setup. A browser check and a synchronization test confirm that it works.
Common problems and their causes
The name vault.ben cannot be found
nslookup vault.ben shows which IP address the configured DNS server returns. The expected result is the NAS IP address. A different result points to the local DNS record or the device’s DNS settings. Away from home, the VPN’s DNS configuration also needs checking.
The browser shows a certificate warning
Possible causes include a missing Root CA certificate on the device, an expired server certificate, or a certificate issued for a different name. The certificate assignment in DSM also needs checking.
On iPhone and iPad, full trust for the Root CA must be enabled separately. Browsers and apps should be fully restarted after changes. Certificate warnings should be resolved before credentials are entered.
DNS works, but the page is unreachable
The container status is the first check. Next are the reverse proxy rule pointing to http://localhost:31850 and firewall rules allowing HTTPS from the home network or VPN.
A response at http://192.168.1.100:31850 on the home network can help distinguish a container problem from a proxy problem. This HTTP address is only for diagnosis. Sign-in and app connections use https://vault.ben.
The app cannot connect or synchronize
First, https://vault.ben should open in the browser on the same device without a warning. If it does, the next checks are the server URL in the app and a manual sync.
If only automatic updates fail, the cause may be the reverse proxy’s WebSocket settings or restrictions on background activity on the phone. Away from home, the VPN connection must also be active.
Conclusion
Vaultwarden combines a privately operated server with the familiar Bitwarden apps. Local DNS, HTTPS, and a VPN make it possible to use the password manager at home and remotely without exposing it directly to the internet.
Setup is only one part of running the service. Regular updates, timely certificate renewal, and tested backups remain ongoing tasks. Once sign-in, synchronization, and recovery have been checked, existing passwords can be imported and additional devices connected.
Related articles

- 13 min read
Vaultwarden (Bitwarden) mit Docker auf Synology NAS selbst hosten
You can find the English version of this guide here: Self-Hosting Vaultwarden (Bitwarden) on Synology NAS with Docker Ich möchte meine …

- 8 min read
Home Assistant via Docker auf einer Synology NAS installieren
You can find the English version of this guide here: Install Home Assistant on Synology NAS with Docker Home Assistant verbindet …

- 9 min read
Install Home Assistant on Synology NAS with Docker
Die deutsche Version ist hier verfügbar: Home Assistant via Docker auf einer Synology NAS installieren Home Assistant connects smart home …
Let's Work Together
Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.







