Vaultwarden is an open source software for managing passwords securely. In this tutorial, we will go through the steps to install Vaultwarden on OpenBSD.
Before you begin, make sure you have the following:
We need to install some dependencies to run Vaultwarden. Run the following command to install them:
sudo pkg_add rust cargo npm node gmake redis
Clone the Vaultwarden repository from GitHub:
git clone https://github.com/dani-garcia/vaultwarden.git
Move into the repository folder:
cd vaultwarden
Build Vaultwarden from the source code:
cargo build --release --features sqlite
Install the dependencies needed for the web interface and build it:
cd web-vault
npm install
npm run build
We need to create a configuration file for Vaultwarden. Copy the example configuration file and modify it for your use:
cd ..
cp .env.template .env
vi .env
Here are some of the settings you may want to change:
WEB_VAULT_PORT
: The port on which the web interface is served from.WEB_VAULT_URL
: The URL of the web interface.ADMIN_TOKEN
: A secure token used to access the admin panel.To start Vaultwarden, run the following command:
./target/release/bitwarden_rs start
If you want Vaultwarden to start automatically when the server reboots, create a service unit file:
sudo vi /etc/rc.d/vaultwarden
Insert the following content inside the file:
#!/bin/sh
#
# Vaultwarden
#
# rc.conf variables:
# bitwarden_rs_flags (str): flags to pass to bitwarden_rs binary.
#
daemon="/usr/local/bin/bitwarden_rs"
daemon_flags="start"
. /etc/rc.d/rc.subr
rc_stop() {
${daemon} stop
}
rc_cmd $1
Make the file executable:
sudo chmod +x /etc/rc.d/vaultwarden
Start the service:
sudo rcctl start vaultwarden
In this tutorial, we went through the steps to install and configure Vaultwarden on OpenBSD. Vaultwarden is now ready to securely manage your passwords.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!