VaultWarden: Difference between revisions
Line 63: | Line 63: | ||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
nano /opt/bitwarden/.env | nano /opt/bitwarden/.env | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 21:23, 24 February 2021
IP: | 192.168.88.15 |
---|---|
MAC: | B6:04:55:14:93:89 |
Domain: | vault.flowerhouse.at |
OS: | Debian Buster |
---|---|
RAM: | 512MB |
Cores: | 1 |
Privileged: | No |
The BitWarden-LXC is reachable under 192.168.88.15
which is located in the ServerVLAN.
The subdomain is vault.flowerhouse.at which is handled by the ReverseProxy.
Building
The original BitWarden-Server is only available with docker, this an alternative software programmed with rust.
Install the required packages for building:
apt install git curl wget htop pkg-config openssl libssl-dev build-essential libmariadb-dev-compat libmariadb-dev
Rust
Download script and follow installer:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Create environment variable:
echo 'export PATH=~/.cargo/bin:$PATH' >> ~/.bashrc
export PATH=~/.cargo/bin:$PATH
After running following command:
which rustc
It should show the path:
/root/.cargo/bin/rustc
Build bitwarden_rs
To build bitwarden_rs, at least 1GB RAM is needed for it to work.
Clone the bitwarden_rs repository and use cargo to build it:
cd /opt
git clone https://github.com/dani-garcia/bitwarden_rs && pushd bitwarden_rs
cargo clean && cargo build --features mysql --release
file target/release/bitwarden_rs
Create folder and move bitwarden_rs:
mkdir /opt/bitwarden
mkdir /opt/bitwarden/data
mv ./target/release/bitwarden_rs /opt/bitwarden/
rm -r ~/bitwarden_rs
Create .env file and paste template configuration:
nano /opt/bitwarden/.env
Deploying
Required packages for deployment:
apt install openssl libmariadb-dev
Install WebVault
It is not needed to build WebVault, you can use one of the prepatched branches
Move to the bitwarden_rs release folder and download WebVault:
wget https://github.com/dani-garcia/bw_web_builds/releases/download/v2.18.1d/bw_web_v2.18.1d.tar.gz
Unpack and delete:
tar -xvf bw_web_v2.18.1d.tar.gz
rm bw_web_v2.18.1d.tar.gz