How to install Vaultwarden with docker compose
On this post we are going to see how to install Vaultwarden on your server.
What is Vaultwarden?
Vaultwaren is a fork in Rust of the Bitwarden password manager, it allow you to access and sync between devices your login and password.
It also manage TOTP like Google Authenticator.
The server is compatible with the offical Bitwarden clients.
Deployment
You need to have docker and docker compose installed on your server, you can see how to do that by following this post:
![](https://2nistech.world/content/images/size/w100/2023/07/Ivory-and-Green-Elegant-Circle-Bold-Initials-Logo.png)
To deploy Vaultwarden, you can use this docker-compose.yaml
file
version: '3'
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
environment:
- SIGNUPS_ALLOWED=true
- DOMAIN=https://vaultwarden.yourdomain.com
- PUSH_ENABLED=true
- PUSH_INSTALLATION_ID=
- PUSH_INSTALLATION_KEY=
- PUSH_RELAY_BASE_URI=https://push.bitwarden.com
volumes:
- /path/local/datas:/data/
ports:
- 80
- 3012
restart: always
To get the PUSH_INSTALLATION_ID and PUSH_INSTALLATION_KEY go to https://bitwarden.com/host/, put an email address and you'll get your ID and KEY.
Access the container with HTTPS
You can't create an account or login to Vaultwarden without using HTTPS.
You can follow this post to configure a reverse proxy using Traefik for Vaultwarden.
![](https://2nistech.world/content/images/size/w100/2023/07/Ivory-and-Green-Elegant-Circle-Bold-Initials-Logo.png)
Once you manage to access your Vaultwarden in HTTPS and create your first account, I recommend you to deactivate the account creation by editing the docker-compose file and modify the line
SIGNUP_ALLOWED=true
to SIGNUP_ALLOWED=false
an do
docker-compose up -d
Finalisation
Activate Two-step login
Once connected, the first thing to do is to activate the Two-step login for your user to enforce the security of your Vaultwarden installation.
![](https://2nistech.world/content/images/2023/07/image-19.png)
Use Bitwarden clients
Now you have a running Vaultwarden server, you can install
- The Bitwarden web extension, to access your vault directly from your browser and auto-fill login password and OTP.
- The mobile app, Bitwarden as an Android and IOS app to access your Vault from your mobile device and can replace the Android or IOS password manager.
- There is also a Desktop client, but I never used it.
sources: