Vaultwarden (Bitwarden)
Vaultwarden is an alternative server implementation for the Bitwarden password manager. It is compatible with all official Bitwarden clients (browser, desktop, mobile), but uses significantly fewer resources.
Installation
Add the following template to your docker-compose.yml and then run ei23 dc.
Template
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: unless-stopped
ports:
- 8812:80
volumes:
- ./volumes/vaultwarden:/data
environment:
- SIGNUPS_ALLOWED=true
- WEBSOCKET_ENABLED=true
- ADMIN_TOKEN=YOUR_ADMIN_TOKEN
Admin Token
Replace YOUR_ADMIN_TOKEN with a secure token. This is required for the admin interface. Generate one with: openssl rand -base64 48
First Start
- After startup, you can access Vaultwarden at
http://[IP]:8812 - Create your first account (if
SIGNUPS_ALLOWED=true) - Set up the browser extension or mobile app
- Important: After setup, set
SIGNUPS_ALLOWED=false!
Set Up Clients
Browser Extension
- Install the Bitwarden Browser Extension
- Click on the settings icon (gear)
- Change the Server URL to
http://[IP]:8812 - Log in with your account
Mobile App
- Install the Bitwarden app
- Tap the settings icon at the top
- Change the Server URL to
http://[IP]:8812orhttps://vaultwarden.yourdomain.com - Log in with your account
Desktop App
- Install the Bitwarden Desktop App
- Go to Settings → Self-hosted
- Enter the server URL
Admin Interface
You can access the admin interface at http://[IP]:8812/admin with the ADMIN_TOKEN.
Here you can: - Manage users - Create organizations - Disable registration - Configure SMTP settings
Configure SMTP (Email)
For password reset and 2FA emails:
environment:
- SMTP_HOST=smtp.gmail.com
- SMTP_FROM=vault@yourdomain.com
- SMTP_PORT=587
- SMTP_SECURITY=starttls
- SMTP_USERNAME=your@email.com
- SMTP_PASSWORD=YOUR_APP_PASSWORD
Gmail
For Gmail, you need to create an app password. Regular password authentication does not work.
Security Recommendations
- Disable registration after setup
- Enable 2FA for all accounts
- Use HTTPS with Traefik or Nginx Proxy Manager
- Create regular backups
- Keep admin token secure
HTTPS with Reverse Proxy
Recommended
For use outside the home network, HTTPS is absolutely required!
Example with Traefik:
labels:
- traefik.enable=true
- traefik.http.routers.vaultwarden.rule=Host(`vault.yourdomain.com`)
- traefik.http.routers.vaultwarden.entrypoints=web-secured
- traefik.http.routers.vaultwarden.tls=true
- traefik.http.routers.vaultwarden.tls.certresolver=letsEncrypt
Notes
- Data is stored in
./volumes/vaultwarden/ - Vaultwarden is compatible with ALL official Bitwarden clients
- Regular backups of the
/datafolder are essential! - The websocket connection enables real-time sync between devices