sudoaptupdatesudoaptinstalldocker-cedocker-ce-clicontainerd.iodocker-compose-plugin# Try docker:sudodockercomposeversionsudodockerversionsudodockerrunhello-world# Configure Docker to start on bootsudosystemctlenabledocker.servicesudosystemctlenablecontainerd.service
Use the shell script for installation with the bitwarden user in the /opt/bitwarden directory
su-bitwardencd/opt/bitwardencurl -Lso /opt/bitwarden/bitwarden.sh "https://func.bitwarden.com/api/dl/?app=self-host&platform=linux" && chmod 700 /opt/bitwarden/bitwarden.sh
./bitwarden.shinstall# Enter the domain name for your Bitwarden instance (ex. bitwarden.example.com):bitwarden.yourdomain.com# Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n):n### Choose Y to generate trusted Let's Encrypt SSL certificate (ports 80 and 443 have to be open for certbot)# Enter the database name for your Bitwarden instance (ex. vault):vault# Enter your installation id (get at https://bitwarden.com/host):# Enter your installation key:# Do you have a SSL certificate to use? (y/n):n# Do you want to generate a self-signed SSL certificate? (y/n):y# ^^^ This option is only recommended for testing.
You should not share your installation id or installation key across multiple Bitwarden installations. They should be treated as secrets.
# If you need to make additional configuration changes, you can modify the settings in `./bwdata/config.yml` and then run:
`./bitwarden.shrebuild`or`./bitwarden.shupdate`nano./bwdata/env/global.override.env# adminSettings__admins=yourmail@gmail.com# nano ./bwdata/config.yml# Next steps, run:./bitwarden.shstart# Bitwarden is up and running!# ===================================================# visit https://bitwarden.yourdomain.com# to update, run./bitwarden.shupdateself./bitwarden.shupdate
chmod+xupdatebw.shcrontab-e# Add lines to update and start Bitwarden at boot:@reboot/opt/bitwarden/bwdata/scripts/updatebw.sh>/dev/null2>&1@reboot/opt/bitwarden/bitwarden.shstart# or for Example: on every Sunday at 2:00 02**0/opt/bitwarden/bwdata/scripts/updatebw.sh>/dev/null2>&1
Change https port
nano/opt/bitwarden/bwdata/config.yml# Set https_port variable to 11443https_port:11443# Save and exit.# Update./bitwarden.shupdate
Manual Bitwarden Update
su-bitwardencd/opt/bitwardencurl -Lso /opt/bitwarden/bitwarden.sh "https://func.bitwarden.com/api/dl/?app=self-host&platform=linux" && chmod 700 /opt/bitwarden/bitwarden.sh
/opt/bitwarden/bitwarden.shupdateself/opt/bitwarden/bitwarden.shupdate# or run the script created before/opt/bitwarden/bwdata/scripts/updatebw.sh