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.
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:
}
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.
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.