# (SOLVED) OPNsense - Nginx reverse proxy -\> Vaultwarden docker synology

**URL:** <https://vaultwarden.discourse.group/t/solved-opnsense-nginx-reverse-proxy-vaultwarden-docker-synology/1397>\
**Category:** Third Party Help\
**Created:** [January 15, 2022, 8:36am UTC](https://vaultwarden.discourse.group/t/solved-opnsense-nginx-reverse-proxy-vaultwarden-docker-synology/1397 "2022-01-15T08:36:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pxs](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@pxs](https://vaultwarden.discourse.group/u/pxs)\
**Post date:** [January 15, 2022, 8:36am UTC](https://vaultwarden.discourse.group/t/solved-opnsense-nginx-reverse-proxy-vaultwarden-docker-synology/1397/1 "2022-01-15T08:36:30Z")

</div>

I have Vaultwarden running on docker on synology nas.  
I have a opnsense firewall with reverseproxy (nginx).  
I have the website and service running. It all works great with lets encrypt cert.

What I can’t figure out is how to get the livesync / WebSocket to work and how to arrange the correct way to set this up in opnsense nginx GUI.

Somebody here that knows how to do this?

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [January 15, 2022, 8:58am UTC](https://vaultwarden.discourse.group/t/solved-opnsense-nginx-reverse-proxy-vaultwarden-docker-synology/1397/2 "2022-01-15T08:58:29Z")

</div>

Have you seen the wiki already??

> **[Proxy examples · dani-garcia/vaultwarden Wiki](https://github.com/dani-garcia/vaultwarden/wiki/Proxy-examples)**
>
> Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden\_rs - Proxy examples · dani-garcia/vaultwarden Wiki

---

<div class="post-metadata">

**Author:** ![pxs](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@pxs](https://vaultwarden.discourse.group/u/pxs)\
**Post date:** [January 15, 2022, 9:27am UTC](https://vaultwarden.discourse.group/t/solved-opnsense-nginx-reverse-proxy-vaultwarden-docker-synology/1397/3 "2022-01-15T09:27:22Z")

</div>

BlackDex, thank you for your fast reply.  
I have seen the proxy examples and I am looking for help / do not know, how to add this below part in the opnsense - nginx gui:  
}

location /notifications/hub {  
proxy\_pass http://:3012;  
proxy\_set\_header Upgrade $http\_upgrade;  
proxy\_set\_header Connection “upgrade”;  
}

location /notifications/hub/negotiate {  
proxy\_pass http://:80;

is it by url rewrite, adding new https servers and upstream to port 3012? so I am lost there

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [January 15, 2022, 9:43am UTC](https://vaultwarden.discourse.group/t/solved-opnsense-nginx-reverse-proxy-vaultwarden-docker-synology/1397/4 "2022-01-15T09:43:14Z")

</div>

Maybe it would be better if you can show what you have right now.

---

<div class="post-metadata">

**Author:** ![pxs](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@pxs](https://vaultwarden.discourse.group/u/pxs)\
**Post date:** [January 15, 2022, 10:12am UTC](https://vaultwarden.discourse.group/t/solved-opnsense-nginx-reverse-proxy-vaultwarden-docker-synology/1397/5 "2022-01-15T10:12:02Z")

</div>

I can do that, but it is all screen/gui based and different than a config file.  
I can upload pictures of it?

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [January 15, 2022, 10:47am UTC](https://vaultwarden.discourse.group/t/solved-opnsense-nginx-reverse-proxy-vaultwarden-docker-synology/1397/6 "2022-01-15T10:47:14Z")

</div>

I would be uncertain on how to help if you don’t understand the proxy-examples and how to implement that into the synology/nginx.

Those examples are 1:1 working examples so they should just work out-of-the-box besides changing the `server_name` and `proxy_pass` to match your specific setup.

---

<div class="post-metadata">

**Author:** ![pxs](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@pxs](https://vaultwarden.discourse.group/u/pxs)\
**Post date:** [January 15, 2022, 12:19pm UTC](https://vaultwarden.discourse.group/t/solved-opnsense-nginx-reverse-proxy-vaultwarden-docker-synology/1397/7 "2022-01-15T12:19:55Z")

</div>

BackDex,

thank you for your help and guidance. With the examples and the help from opnsense community I was able to make this work!  
So I leave this here for other users running self hosted Vaultwarden and opnsense reverse proxy:

One HTTP Server

Two Upstream servers: one for tcp80, second - for tcp3012

Two Upstreams: one pointing to tcp80 Upstream server, second - pointing to tcp3012 Upstream server

Three Locations: “/” and “/notifications/hub/negotiate” - pointing to tcp80 Upstream, “/notifications/hub” - pointing to tcp3012 Upstream with " WebSocket Support" enabled.

In HTTP Server settings choose all three locations (root ("/"), hub ("/notifications/hub") and hub\_nego(""/notifications/hub/negotiate""))

and I had to change the docker listening localhost to 0.0.0.0 to make it work.

really love the real time updates to all devices!
