Install Bitwarden on Ubuntu server 22.04
Must be installed on fresh server (no previous nginx installation)
$sudo apt update -y && sudo apt upgrade -y
$sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
$curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$sudo apt update
$sudo apt install docker-ce docker-ce-cli containerd.io docker-compose
#create user for bitwarden
$sudo mkdir /opt/bitwarden
$sudo adduser bitwarden
$sudo chmod -R 700 /opt/bitwarden
$sudo chown -R bitwarden:bitwarden /opt/bitwarden
$sudo usermod -aG docker bitwarden
$su bitwarden
$cd
$curl -Lso bitwarden.sh https://go.btwrdn.co/bw-sh && chmod 700 bitwarden.sh
$./bitwarden.sh install
enter domain name
enter database name [valut]
enter installation id and installation key
get it from https://bitwarden.com/host
$nano ~/bwdata/env/global.override.env
modify
globalSettings__mail__smtp__host=smtp.gmail.com
globalSettings__mail__smtp__port=587
globalSettings__mail__smtp__ssl=true
globalSettings__mail__smtp__username=[gmail email address]
globalSettings__mail__smtp__password=[gmail email password]
...
adminSettings__admins= [admin email]
$./bitwarden.sh start
$./bitwarden.sh updatedb
access URL/admin to set up admin account
access URL to create regular account
To update
$./bitwarden.sh stop
$./bitwarden.sh updateself
$./bitwarden.sh update
$./bitwarden.sh start
To renew SSL certificate
$./bitwarden.sh renewcert