Activating Bitwarden live sync on Synology

In my last post I showed how to install bitwarden_rs, an unofficial fork of bitwarden server, on a Synology Diskstation using docker. Now that everything works, I’ll show you how to activate live sync functionality on Synology. It’s not really easy, but doable. We need to add location based reverse proxy in Synology Nginx.

Basically we need to do 3 things:

  • enabling WebSockets in Docker
  • add new location in the reverse proxy
    Problem is, that we can’t do this in DSM GUI
  • open the WebSockets port in your router

Activating WebSocket in Docker

First point is the easy one. Stop the docker container and add new environment parameter WEBSOCKET_ENABLED. Set this parameter to true.

activate WEBSOCKET_ENABLED in bitwarden docker container
Activating WEBSOCKET_ENABLED environment

Nginx reverse proxy

Now the hard part. Since in the DSM Application Portal only host based reverse proxy is configurable, we need to manually change the webserver config. Synology uses Nginx as webserver. To get to the nginx config, you should activate SSH on your DSM.

Once SSH is active, let’s connect per SSH to DSM. If you set the reverse proxy in Application Portal, you’ll find the nginx config in /etc/nginx/app.d/server.ReverseProxy.conf. Let’s make a copy of this config. I put it in the docker volume /volume1/docker/bitwardenrs/, since this folder is backed up.

There are 2 things in the config to be customized:

  • path to the SSL certificate
    If you create Let’S Encrypt certificate directly in DSM (Control Panel > Security > Certificate), so path to the certificate would be /usr/syno/etc/certificate/system/default/fullchain.pem.
    You can check it by using openssl to
  • location reverse proxy for the WebSockets
    Add following location to the Nginx config. Please change the port accordingly.

My complete Nginx config is

Then create a link to this config in

To restart the Nginx, run

Port redirect in Router

Don’t forget to redirect port 3012 from your router to Synology.

That’s it. If you login to your Bitwarden and open the developer tools, you’ll see following output in the console.

WebSocket connection in the developer tool console
WebSocket connection in the developer tool console

Leave a Reply

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