# \[vaultwarden::api::notifications\]\[ERROR\] when trying to enable websocket

**URL:** <https://vaultwarden.discourse.group/t/vaultwarden-notifications-error-when-trying-to-enable-websocket/1112>\
**Category:** Help\
**Created:** [August 29, 2021, 7:03pm UTC](https://vaultwarden.discourse.group/t/vaultwarden-notifications-error-when-trying-to-enable-websocket/1112 "2021-08-29T19:03:00Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![MilesTEG1](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/milesteg1/32/288_2.png) [@MilesTEG1](https://vaultwarden.discourse.group/u/MilesTEG1)\
**Post date:** [September 5, 2021, 4:16pm UTC](https://vaultwarden.discourse.group/t/vaultwarden-notifications-error-when-trying-to-enable-websocket/1112/6 "2021-09-05T16:16:12Z")

</div>

> [@trapassati](#):
>
> **Troubleshooting data**
> 
> When I go to (for test) http://my\_local\_ip/3012] or [https://mydomain.com/notifications/hub](https://mydomain.com/notifications/hub), it shows the message on a html page:
> 
> WebSocket Protocol Error: Unable to parse WebSocket key.

Hello,  
When I do what you said in mu quote, I’ve got the same message as you.  
But my websocket is working fine. When I modify a secure note or whatever, the changes are automaticaly synchronised in my browsers extensions.

> [@trapassati](#):
>
> I’ve already read the wiki, and this is my ngnix reverse proxy config.
> 
> All works fine excepet the live sync via web socket
> 
> ```auto
> location / {
> proxy_pass http://my_local_ip:80;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header X-Forwarded-Proto $scheme;
> }
> 
> location /notifications/hub {
> proxy_pass http://my_local_ip:3012;
> proxy_set_header Upgrade $http_upgrade;
> proxy_set_header Connection "upgrade";
> }
>   
> location /notifications/hub/negotiate {
> proxy_pass http://my_local_ip:8080;
> }
> 
> ```

My reversproxy config has some more lines…  
And the `Location /notifications/hub {` and `location /notifications/hub/negotiate {` blocs are after the  
`location / {` bloc…  
My `location / {` bloc looks like :

```auto
    location / {

        proxy_connect_timeout 300;

        proxy_read_timeout 300;

        proxy_send_timeout 300;

        proxy_intercept_errors off;

        proxy_http_version 1.1;

        proxy_set_header Upgrade $http_upgrade;

        proxy_set_header Connection $connection_upgrade;

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header Host $http_host;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_pass http://local_IP:port;

    }

```

PS : I have Vaultwarden installed in Docker on a Synology NAS (with DSM7).  
See this post : [[SOLVED] Websocket setup on Synology - #16 by MilesTEG1](https://vaultwarden.discourse.group/t/solved-websocket-setup-on-synology/116/16)

---

_[View the full topic](https://vaultwarden.discourse.group/t/vaultwarden-notifications-error-when-trying-to-enable-websocket/1112)._
