Skip to content

A repository which holds all files to get you going with Bitwarden Rust server on a VPS at Hetzner, using Terraform, cloud-init, docker-compose, Caddy and Let's Encrypt.

Notifications You must be signed in to change notification settings

stefanfluit/bitwarden-hetzner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Pulls GitHub Release codecov.io Code Coverage

Tested: 03/15/2021

Bitwarden Rust on Hetzner Cloud

Using this repository you can automatically run a Rust implementation of the Bitwarden backend using Terraform and Hetzner Cloud. The webserver/proxy is Caddy and the setup generates HTTPS certificate using Let's Encrypt. Update the variables in the config file and you are good to go. Read the Installation instructions before running anything.

Prerequisites

DNS:

In order to succesfully generate a HTTPS cert using Let's Encrypt, this script uses AWS Route53 to update an A record with the Terraform outputted IP from the Hetzner server. If AWS is not setup on your system, the script will install it and ask for an API key itself. I changed the DNS line to a function in bitwarden-hetzner/config/functions.sh so you can easily change it. Just make sure to handle the variable IP properly.

Terraform:

The Terraform binary should be available on your system in order to execute the script succesfully. You can find instructions here below. If you don't, the prereq.sh script will try to install Terraform for you. This is not tested yet and the script must be executed manually. bash bitwarden-hetzner/config/prereq.sh

https://learn.hashicorp.com/tutorials/terraform/install-cli

Hetzner Cloud:

To create an account use the link below. You will need an API key for the environment you want the VM in. The script will ask for it at some point, or hardcode it in the /bitwarden-hetzner/terraform/provider.tf.

Create an account:

https://accounts.hetzner.com/account

Create an API key:

https://docs.hetzner.cloud/#authentication

Installation:

Make sure you have Git installed:

sudo apt-get update && sudo apt-get install git -y

Clone this repo wherever you want it:

git clone https://github.com/stefanfluit/bitwarden-hetzner.git

Run the script:

cd bitwarden-hetzner/deploy_scripts && ./deploy_bitwarden.sh

About

A repository which holds all files to get you going with Bitwarden Rust server on a VPS at Hetzner, using Terraform, cloud-init, docker-compose, Caddy and Let's Encrypt.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published