# Enabling WebSocket on Synology

**URL:** <https://vaultwarden.discourse.group/t/enabling-websocket-on-synology/1997>\
**Category:** Uncategorized\
**Created:** [November 11, 2022, 8:57pm UTC](https://vaultwarden.discourse.group/t/enabling-websocket-on-synology/1997 "2022-11-11T20:57:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ProXy](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@ProXy](https://vaultwarden.discourse.group/u/ProXy)\
**Post date:** [November 11, 2022, 8:57pm UTC](https://vaultwarden.discourse.group/t/enabling-websocket-on-synology/1997/1 "2022-11-11T20:57:38Z")

</div>

Hello,

I installed the vaultwarden container and set up nginx. I can access the web frontend and also /notifications/hub/negotiate - but I cannot access /notifications/hub as this will result in 502 Bad Gateway.

I enabled WebSocket setting WEBSOCKET\_ENABLED to true in the docker environment.

 ![Bildschirm­foto 2022-11-11 um 21.53.35](https://global.discourse-cdn.com/free1/uploads/vaultwarden/original/1X/907acbde2c6aa6adfa88afd13f788e8cf53aac42.png)

I did not change the WebSocket Port 3012, so it is also 3012 outside of docker.

This is the configuration of NGINX:

```auto
server {
        include /etc/nginx/ssl.conf;
        server_name vaultwarden.mydomain.tld;

        location /notifications/hub {
                proxy_pass http://192.168.178.1:3012/;
                proxy_set_header Host $host;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";

                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header Forwarded $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
        }
}

```

Is there a way to check if WebSocket is running in the docker container? I have no clue what is the issue with my setup.

Any help is appreciated!

---

<div class="post-metadata">

**Author:** ![ProXy](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@ProXy](https://vaultwarden.discourse.group/u/ProXy)\
**Post date:** [November 11, 2022, 9:44pm UTC](https://vaultwarden.discourse.group/t/enabling-websocket-on-synology/1997/2 "2022-11-11T21:44:41Z")

</div>

It seems that WebSocket is working, but isn’t returning anything in the browser. The log shows this when I am trying to access the site: [2022-11-11 21:42:48.060][vaultwarden::api::notifications][INFO] Accepting WS connection from 172.17.0.1:60158

Is this the normal behaviour?

---

<div class="post-metadata">

**Author:** ![Partridge2562](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@Partridge2562](https://vaultwarden.discourse.group/u/Partridge2562)\
**Post date:** [January 24, 2024, 4:03am UTC](https://vaultwarden.discourse.group/t/enabling-websocket-on-synology/1997/3 "2024-01-24T04:03:11Z")

</div>

The instructions above are obsolete.

I had to sync manually and [this issue](https://github.com/dani-garcia/vaultwarden/issues/2442) informed me that WebSocket notifications had to be enabled which led me to this very thread.

On synology’s DSM 7.1 you simply click Control Panel-\>Login Portal-\>Advanced-\>Reverse Proxy-\>_vaultwarden_-\>Edit-\>Custom Header-\>Create-\>WebSocket  
Save

The italics “_vaultwarden_” entry above will be whatever name you gave when you configured reverse proxy for your vaultwarden server. That’s it, [no environment variables needed](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-WebSocket-notifications).

Enjoy almost instant automatic syncing.
