Why Self-Host Bitwarden?
Bitwarden is a powerful, open-source password manager trusted by millions. While you can use their official cloud service, hosting Bitwarden yourself gives you full control over your data and privacy. Plus, setting it up is really quick and easy!
Here’s a simple guide to get Bitwarden running on your own server using Docker Compose.
Docker Compose File
Create a file named docker-compose.yml
with the following content:
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
environment:
WEBSOCKET_ENABLED: 'true'
SIGNUPS_ALLOWED: 'true'
volumes:
- ./vw-data:/data
ports:
- "8080:80"
This configuration uses the lightweight unofficial Bitwarden server (bitwarden_rs / vaultwarden), which is simple to deploy and widely used.
Steps to Deploy
- Create a directory to hold your Bitwarden data:
mkdir ~/bitwarden && cd ~/bitwarden
-
Save the
docker-compose.yml
file in that directory. -
Start the container:
docker compose up -d
- Bitwarden will now be accessible at:
http://your-server-ip:8080
Creating an Account
-
Open your browser and go to the Bitwarden URL above.
-
Click Create Account.
-
Fill in your email and master password. This password will secure all your stored credentials, so make it strong and memorable.
-
Submit to register your personal Bitwarden account.
Important: Once you have created your initial accounts, it’s a good security practice to disable new signups by setting SIGNUPS_ALLOWED=false in your docker-compose.yml file and restarting the container. This prevents unauthorized users from registering on your instance.
Browser Extensions and Apps
To access your vault conveniently, download Bitwarden extensions and apps from:
- Bitwarden Browser Extensions
- Available for Chrome, Firefox, Edge, Safari, and more
- Official mobile apps on iOS and Android stores
Logging Into Your Self-Hosted Vault
When logging in to the Bitwarden extension or app:
- Choose “Log in with a self-hosted server” (or similar wording).
- Enter your server URL, for example:
http://your-server-ip:8080
. - Use the email and master password you registered with.
Optional: Admin Panel
If you set an ADMIN_TOKEN
in the environment, you can access the admin panel at:
http://your-server-ip:8080/admin
Login with the token to manage users, view statistics, and configure settings.
With just a few commands and a small Docker Compose file, you have your own secure Bitwarden instance up and running. Enjoy full control over your password management without relying on third-party cloud services!
If you found this guide helpful, feel free to share it with your friends or colleagues.
Thank you for reading!