Skip to content

Instantly share code, notes, and snippets.

@adamlwgriffiths
Last active August 3, 2021 07:39
Show Gist options
  • Save adamlwgriffiths/11399d31905da38048beddfd0246c6fa to your computer and use it in GitHub Desktop.
Save adamlwgriffiths/11399d31905da38048beddfd0246c6fa to your computer and use it in GitHub Desktop.
Setup Bitwarden_rs on Synology DiskStation NAS

Synology Bitwarden_rs Setup

Bitwarden_rs is an API compatible Rust re-write of the Bitwarden server. It is uses less resources than the standard Bitwarden server and is ideal for the Synology NAS.

Please note, without HTTPS, you will not be able to access Bitwarden using Google Chrome. See here: dani-garcia/vaultwarden#958

Install Docker

Package Centre > Docker > Install

Layout Ports

To avoid having to setup SSL certificates and renew them, we just use the Synology reverse proxy. This complicates the ports.

Ie. External HTTPS reverse proxies to -> External Docker HTTP -> Internal Docker HTTP. We use the same Internal ports and the External reverse proxy ports.

Ports used:

  • HTTPS
  • HTTP
  • WSS (WebSocket)
  • WS

Note: currently websockets are not working.

Create Folders

/docker/bitwarden/bitwarden

Install Server

Apps > Docker > Registry > Search > bitwardenrs/server

  Volume
      docker/bitwarden/bitwarden -> /data
  Port Settings
      <HTTP> -> <HTTPS> TCP
      <WS> -> <WSS> TCP
  Environment:
      ROCKET_PORT = <HTTPS>
      WEBSOCKET_PORT = <WSS>
      ROCKET_WORKERS = 5

Create HTTPS Reverse proxy

Control Panel -> Application Portal -> Reverse Proxy -> Create

Bitwarden HTTPS

    Source
        Protocol HTTPS
        Hostname *
        Port <HTTPS>
        Enable HSTS
        Enable HTTP/2
    Destination
        Protocol HTTP
        Hostname localhost
        Port <HTTP>

Bitwarden WebSocket HTTPS

    Source
        Protocol HTTPS
        Hostname *
        Port <WSS>
        Enable HSTS
        Enable HTTP/2
    Destination
        Protocol HTTP
        Hostname localhost
        Port <WS>

Install Bitwarden browser plugin

  • Settings
    • API URL = https://<ip address>:<HTTPS>

TODO

@adamlwgriffiths
Copy link
Author

Note: bitwarden_rs was renamed to vaultwaden.

To rename a docker image in synology, use these steps:

The image path and tag are storing in settings

  1. In the Docker app, Export the current container settings. it will create a .json file

  2. Edit the JSON, find the image setting and change the tag. save changes.

  3. In the Docker app, Stop and delete the current container.

  4. In the Docker app, Click on 'import" and select the modified settings file.

  5. Launch the new container.

It will be using the tag you selected with all of the settings of the previous container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment