Below steps allow you to setup Websocket support for your Bitwarden_rs installation running on Synology Diskstation. You can do all steps using the GUI so there is no SSH Access needed.
- Working HTTPS Reverse proxy Setup (Control Panel -> Application Portal -> Reverse Proxy)
- Set Enviourment Variable
WEBSOCKET_ENABLED=true
in your Bitwarden container and expose the container port3012
to a local port, in my case5556
.
- Download enable_ws.sh
- Upload the script "enable_ws.sh" onto your Diskstation. I would recommand putting it in your Bitwarden directory. In my case
/volume1/docker/bitwarden
Control Panel -> Task Scheduler -> Create -> Scheduled Task -> User-defined Script
Make sure to amend the command according to your setup.
/volume1/docker/bitwarden/enable_ws.sh
= Full path to previously uploaded scriptvault.example.com
= Hostname of your Bitwarden_rs as configured in the Reverse Proxy5555
= Exposed ROCKET_PORT by Docker (The same as in your Reverse Proxy setup)5556
= Exposed WEBSOCKET_PORT by Docker
Run Command (My example):
bash /volume1/docker/bitwarden/enable_ws.sh vault.example.com 5555 5556
General Settings
Task -> Enable BW WS
User -> root
Enabled -> Tick
Schedule
Run on the following days -> Daily
Frequency -> Every hour
Task Settings:
(Optional) Enable Notifications
Run Command: <Paste Command Crafted Above>
Save and run the new task by selecting Run
. Login into your Webvault and confirm in your web browsers developer console that the connection to wss://
succeded.
That's all the point to use a reverse proxy.
All your connexion are forwarded to the reverse proxy, and only it redirect to the right machin:port.
In my opinion, your installation is too complex, and doesn't give any security advantages...
If you're not using a 4G internet connexion for your home internet, you should only use the NAS, or the r-pi as a reverse-proxy.
You forward 443, and eventually 80 port to it, and let it managed the rest.
For the static IP, you can set up a dynDNS (I have a DynHost with OVH on my router), in my opininon, static IP isn't the thing you have to worry about.
For the second point "ip is not shared with other machines", I don't understand the logic in that...
And the third, about DMZ ? What, why ? I don't understand too... You have a router with a firewall, right ?