#
Install Bitwarden on Linux
By
Adrien
#
System Specification
#
Steps to follow
- Configure DNS and open port 80 / 443
- Install Docker & Docker Compose
- Create a Bitwarden user
adduser bitwarden
passwd bitwarden
groupadd docker
usermod -aG docker bitwarden
mkdir /opt/bitwarden
chmod -R 700 /opt/bitwarden
chown -R bitwarden:bitwarden /opt/bitwarden
su - bitwarden
cd /opt/bitwarden
- Install Bitwarden
You must be connected as bitwarden user and in /opt/bitwarden folder
curl -Lso bitwarden.sh https://go.btwrdn.co/bw-sh && chmod 700 bitwarden.sh
./bitwarden.sh install
To get installation ID and installation KEY : https://bitwarden.com/host/
- Configure environment variables
Edit ./bwdata/env/global.override.env
globalSettings__mail__smtp__host=**placeholder** # smtp.gmail.com
globalSettings__mail__smtp__port=**placeholder** # 587
globalSettings__mail__smtp__ssl=**placeholder**
globalSettings__mail__smtp__username=**placeholder**
globalSettings__mail__smtp__password=**placeholder**
...
adminSettings__admins=**placeholder** # email for admin account
How to use Gmail as SMTP mail server
https://bitwarden.com/help/hosting-faqs/#q-how-do-i-use-gmail-as-an-smtp-mail-server
Then
./bitwarden.sh restart
- Update installation files
Edit ./bwdata/config.yml as needed and then rebuild
./bitwarden.sh rebuild
- Start bitwarden
./bitwarden.sh start
- Startup option
Set PVE option : "start at boot" to yes, "order" to 2
#
About data
All Bitwarden data is stored on the host machine in the ./bwdata directory, relative to the location in which you installed Bitwarden. It's recommended that you backup and keep safe the entire ./bwdata directory.
#
Nightly Database Backups
Bitwarden will automatically take nightly backups of the mssql container database. These backups are kept in the ./bwdata/mssql/backups directory for 30 days.
#
Restore a backup