How to Self-Host a Password Manager on a VPS (Vaultwarden)
Part of Self-hosting, our guide to this topic
The self-hosted password manager for most people is Vaultwarden on a small 1 GB VPS: a free, lightweight, Bitwarden-compatible server that works with the official Bitwarden browser extension and mobile apps, so you get the same apps without the subscription. Use official Bitwarden self-host if you want the vendor’s own server (its standard edition is built for businesses), and KeePassXC with file sync if you want no server at all. Skip self-hosting entirely if you won’t keep up with updates and backups — in that case a hosted manager is the safer default.
On this page
This guide has no affiliate links in the steps.
The honest trade-off up front: a self-hosted password manager puts your vault on hardware you control, but you become the uptime and backup department. That is the same deal as self hosting n8n, and the setup below — Docker Compose behind a reverse proxy — is the same pattern. If you have never run a server, work through the new VPS setup checklist first, because the vault will hold the keys to everything else.

Which self-hosted password manager should you run?
The short version, in the order most people should consider them:
- Vaultwarden — an unofficial reimplementation of the Bitwarden server, written in Rust. Its wiki describes it as a fit for self-hosting “where running the official resource-heavy service is undesirable”. It runs in one Docker container, works with the official Bitwarden apps, and unlocks most of Bitwarden’s premium features for free. This is the default for one person or a family.
- Bitwarden (official self-host) — the real Bitwarden server. The standard deployment ships with an MSSQL Express database and asks for at least 2 GB of RAM (4 GB recommended). There is also Bitwarden lite (formerly “Unified”, out of beta since December 2025), a single container that needs at least 200 MB of RAM and is meant for personal use and home labs. Choose official Bitwarden when you want the vendor’s own, supported server, or your business needs its licensed features (SSO, enterprise policies).
- Passbolt — a team-first manager built on OpenPGP. It needs its browser extension to work, and has iOS and Android apps plus a Windows desktop app. Choose it when sharing passwords inside a team is the whole point.
- KeePassXC — no server at all. It is a desktop app that keeps your vault in an offline, encrypted
.kdbxfile, which you move between machines with Syncthing, Nextcloud or any file sync. Choose it if you want no server, at the cost of rougher sync and sharing.
Vaultwarden is built as the light stand-in for Bitwarden’s own server. Source: github.com/dani-garcia/vaultwarden, captured Nov 20, 2026.
| Tool | Server needed | RAM in the project’s docs | Apps & browser extension | Team sharing | Cost |
|---|---|---|---|---|---|
| Vaultwarden | Yes (Docker) | No figure given; built as the light option | Official Bitwarden apps + web vault | Yes (organizations) | Free; you pay the VPS |
| Bitwarden standard | Yes (Docker + MSSQL) | 2 GB minimum, 4 GB recommended | Official Bitwarden apps | Yes, plus licensed features | Free core; paid licence for some features |
| Bitwarden lite | Yes (one container) | At least 200 MB | Official Bitwarden apps | Same server, one container | Free core; personal and home-lab use |
| Passbolt | Yes (Docker) | No figure given | Browser extension (required), iOS, Android, Windows app | Yes (built for teams) | Community free; paid tiers |
| KeePassXC + sync | No | None (desktop app) | Desktop apps + browser extension | Not built in (share via file sync) | Free |
The RAM column quotes each project’s own documentation, read on 2026-11-19; we did not measure memory use ourselves. Vaultwarden and Passbolt publish no number, so the 1 GB plans below are our sizing for one person or a family, not an official minimum.
Bitwarden lite asks for at least 200 MB of RAM, a tenth of the standard server’s 2 GB minimum. Source: bitwarden.com/help, captured Nov 19, 2026.
When not to self-host. Self-hosting is a second job: updates, a reverse proxy, HTTPS certificates, backups and restores are all on you. If you won’t do that, keep a hosted manager — a self-hosted mail server is the same kind of commitment, and most people who try it for the savings quit over the maintenance. The single-point-of-failure worry is real too; the section on what happens when the server goes down answers it honestly.
What a 1 GB VPS for Vaultwarden costs
Vaultwarden is light enough to run around the clock on the smallest plans. Three small plans from our data, all read daily, with the billing term spelled out:
- RackNerd KVM VPS Special 1 GB — 1 vCPU, 1 GB, 20 GB at $1.83/month, billed yearly. The yearly specials renew at the same price, so the low figure is not a first-year trick. Catch: you pay 12 months up front, there are no refunds by default, and the specials are sold in four US locations only.
- netcup VPS pico G11.5s — 1 vCPU, 1 GB, 30 GB at $2.00/month before VAT, billed on a 12-month minimum term (a public IPv4 is already included in that price). Catch: every netcup plan has a minimum term, and it asks for ID verification or a prepayment after your first order.
- InterServer 1 slice — 1 vCPU, 2 GB, 40 GB at $3.00/month, billed monthly with no term, so you can leave whenever you like. Catch: no refunds by default.
The “A VPS for this guide” table at the end of this page lists the cheapest 1 GB plan at each provider whose prices we read ourselves. To compare more, compare every plan by real monthly cost.
Self-host Vaultwarden on Ubuntu 24.04: 7 steps
The commands below follow the Vaultwarden wiki’s Docker Compose and Caddy example. Replace YOUR_DOMAIN and the other orange words with your own values. Caddy sits in front and handles HTTPS on its own, which the Bitwarden web vault needs: the wiki explains that it uses web crypto APIs most browsers only allow over HTTPS.
The web vault needs HTTPS, which is why Caddy sits in front. Source: github.com/dani-garcia/vaultwarden/wiki, captured Nov 20, 2026.
Point a subdomain at your server
At your DNS provider, add an A record named vw that points to YOUR_SERVER_IP. Vaultwarden runs on its own subdomain, such as vw.example.com. Do this first — Caddy can only get a certificate once the name resolves to your server.
servergetent hosts vw.YOUR_DOMAIN
Check: Your server’s IP next to the name. If nothing prints, wait a few minutes and try again.
Install Docker
Use Docker’s own repository so you get a current version plus the Compose plugin. Our Docker on Ubuntu guide walks through the whole install; the short version is the two checks below.
serversudo docker run hello-world
sudo docker compose version
Create the project folder and the admin token
The admin token is the password for Vaultwarden’s admin panel at /. Generate a long random one:
serversudo mkdir -p /opt/vaultwarden/caddy_config
cd /opt/vaultwarden
openssl rand -base64 48
Copy that string somewhere safe now — you will type it to log in to /. Don’t store it as plain text on the server, though: the wiki recommends hashing it, and Vaultwarden has a built-in command for that. Run it, paste the string twice when asked, and copy the $argon2id$… text it prints:
serversudo docker run --rm -it vaultwarden/server /vaultwarden hash
Then write the hash into an env file:
serversudo nano /opt/vaultwarden/.env
.env — nanoADMIN_TOKEN='YOUR_ARGON2_HASH'
Store the admin token hashed, not as plain text. Source: github.com/dani-garcia/vaultwarden/wiki, captured Nov 19, 2026.
Keep the single quotes: the hash is full of $ signs, and the quotes stop Docker Compose from reading them as variables. Lock the file down so other users on the box can’t read it: sudo chmod 600 /.
Write the Docker Compose file and the Caddyfile
serversudo nano /opt/vaultwarden/compose.yaml
serverservices:
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- caddy_data:/data
- ./caddy_config/Caddyfile:/etc/caddy/Caddyfile:ro
vaultwarden:
image: vaultwarden/server:latest
restart: unless-stopped
environment:
DOMAIN: "https://vw.YOUR_DOMAIN"
SIGNUPS_ALLOWED: "true"
ADMIN_TOKEN: ${ADMIN_TOKEN}
volumes:
- ./vw-data:/data
ports:
- "127.0.0.1:8080:80"
volumes:
caddy_data:
What matters here:
DOMAINis your full HTTPS address. The wiki says Vaultwarden needs it behind a reverse proxy, among other things so attachments work.SIGNUPS_ALLOWED: "true"starts with registration open so you can create your account in step 6, then you flip it tofalse. Signups are open by default in Vaultwarden, so this line is there to remind you to close them.127.0.0.1:8080binds Vaultwarden to the server only. Docker-published ports bypass ufw, so a plain8080:80would be open to the internet; Caddy reaches Vaultwarden over Docker’s internal network either way.
You may see WEBSOCKET_ENABLED in older guides. The wiki says it has been ignored since Vaultwarden 1.29.0: live sync now runs on the main port and is on by default, so leave it out.
WEBSOCKET_ENABLED does nothing on a current Vaultwarden. Source: github.com/dani-garcia/vaultwarden/wiki, captured Nov 19, 2026.
Now the Caddyfile:
serversudo nano /opt/vaultwarden/caddy_config/Caddyfile
Caddyfile — nanovw.YOUR_DOMAIN {
reverse_proxy vaultwarden:80
}
vaultwarden:80 is the service name from the compose file. Caddy requests a Let’s Encrypt certificate on its own, as long as DNS points here and ports 80 and 443 are open.
Open the firewall and start the stack
serversudo ufw allow 80
sudo ufw allow 443
cd /opt/vaultwarden
sudo docker compose up -d
sudo docker compose logs -f caddy
Press Ctrl+C to leave the logs once Caddy reports the certificate as obtained. The first start downloads both images and can take a few minutes. New to the firewall? UFW is the guide.
If it fails: Caddy logs a challenge error. DNS doesn’t point here yet, or port 80 is blocked in your provider’s network firewall. Fix that, then run sudo docker compose restart caddy.
Create your account, then lock signups
Open https:/. With signups open, whoever reaches the page first can create an account — so do this right after the container starts. Pick a long master password; it encrypts the whole vault. Bitwarden’s help pages say it has “no way to access, retrieve, or reset your master password”, and your own server can’t either, so keep a copy somewhere safe.
Lose the master password and nobody, including your own server, can recover it. Source: bitwarden.com/help, captured Nov 20, 2026.
Once you’re in, close the door: edit compose.yaml, set SIGNUPS_ALLOWED: "false", then:
servercd /opt/vaultwarden
sudo docker compose up -d
Check the admin panel
Open https:/ and type the admin token from step 3 — the original random string, not the hash. The panel shows diagnostics, lists users, and can invite new users even while signups stay locked, so you can add family members later.
Key takeaways
- For a self-hosted password manager, run Vaultwarden on a 1 GB VPS for one person or a family; use official Bitwarden for its supported server or licensed business features, KeePassXC if you want no server at all.
- The stack is Docker Compose plus a reverse proxy: the Bitwarden web vault needs HTTPS, and Caddy supplies it automatically.
- Hash the admin token, create your account first, then set
SIGNUPS_ALLOWEDtofalseso no stranger registers. - Back up the whole
vw-datafolder off the server, and test a restore — not just the backup. - The apps’ offline copy is read-only and only works while you stay signed in; keep the VPS and backup credentials outside the vault, so a dead server is a restore job instead of a lockout.
A VPS for this guide
Everything above runs on any VPS with 1 GB of RAM. The cheapest 1 GB+ plan at each provider whose prices we read every day, IPv4 included:
| Plan · provider | vCPU · RAM · disk | You pay | Visit |
|---|---|---|---|
KVM VPS Special 1 GB RackNerd · Los Angeles +19 | 1 vCPU·1 GB·20 GB | $1.83/mo | |
VPS pico G11.5s netcup · Nuremberg | 1 vCPU·1 GB·30 GB | $2.00/mo | |
SSD VPS 1 CloudCone · USA | 2 vCPU·1 GB·30 GB | $2.33/mo | |
1 slice InterServer · New York +2 | 1 vCPU·2 GB·40 GB | $3.00/mo | |
NVMe 2 GB HostHatch · Amsterdam +15 | 1 vCPU·2 GB·10 GB | $4.00/mo |
Prices read Dec 4, 2026. gets that provider's deals on Telegram. Compare every 1 GB plan →
Back up the vault, then test the restore
The vault lives in the vw-data folder. The wiki’s backup page lists what is inside: db.sqlite3 is the database (with -wal and -shm files next to it while it runs), attachments/ holds file attachments, sends/ holds Send files, config.json keeps any settings saved in the admin panel, and the rsa_key* files sign login sessions. Stop the container before copying so the SQLite file isn’t half-written, then archive the whole folder:
Everything in this folder is the vault, so back up the whole folder. Source: github.com/dani-garcia/vaultwarden/wiki, captured Nov 20, 2026.
cd /opt/vaultwarden
sudo docker compose stop vaultwarden
sudo docker run --rm -v /opt/vaultwarden/vw-data:/data:ro -v /opt/vaultwarden/backups:/backup ubuntu tar czf /backup/vw-data-$(date +%F).tar.gz -C /data .
sudo docker compose start vaultwarden
Then pull the file off the server, from your own computer:
scp 'yourname@YOUR_SERVER_IP:/opt/vaultwarden/backups/*.tar.gz' .
Keep a copy of .env with it, and your master password somewhere separate. The archive holds your admin settings and the session-signing key, so the wiki suggests encrypting it before it goes to cloud storage. Then test the restore, not just the backup: on a fresh server, stop Vaultwarden, extract the archive into vw-data, start it and confirm you can log in. A backup you have never restored is a hope, not a backup.
What happens when the server goes down
The single point of failure is the honest objection to this whole idea, so here is what actually happens. Bitwarden’s help pages say any unlocked Bitwarden app can be used offline in read-only mode, including “when not connected to your self-hosted server”: you can open and copy passwords, but you can’t add or edit items until the server is back.
An unlocked app keeps working read-only when your server is unreachable. Source: bitwarden.com/help, captured Nov 19, 2026.
That only covers apps that are still signed in. An app you have logged out of has to reach the server to log back in, and users report the browser extension refusing to open when the server was unreachable:
I just had a situation where the server was unreachable, but the Bitwarden extension in Firefox refused to unlock saying server is unreachable or error logging in.
So treat the offline copy as a cushion, not a backup. Leave your apps locked rather than logged out, keep the file backups from the section above, and keep the VPS and backup credentials outside the vault. Do that, and a dead VPS is a restore job, not a lockout.
Common Vaultwarden self-hosting problems
The web vault won’t load, or says it needs HTTPS.The web vault refuses plain HTTP. Check that Caddy got its certificate and that DNS points at the server.
A stranger registered on my server.You left SIGNUPS_ALLOWED on true after creating your account. Set it to false and run sudo docker compose up -d.
The admin panel warns about a plain text ADMIN_TOKEN.The hash didn’t reach Vaultwarden intact, usually because the single quotes in .env are missing. If you have already saved settings in the admin panel, those in config.json win over the env file.
Changes don’t show up on other devices right away.Browser and desktop apps get live updates over websockets, which Caddy passes through by default. The mobile apps use push notifications instead, which the wiki says need separate push credentials from Bitwarden; without them, run a manual sync from the app’s settings.
Everyone got logged out after a restore.The rsa_key* files weren’t restored, so old sessions are invalid. Log in again; next time restore the whole vw-data folder, including db.sqlite3-wal together with db.sqlite3.
Questions
Is self-hosted Vaultwarden free?
Yes — the software is free, and most of Bitwarden’s premium features are unlocked. You still pay for the VPS, which starts around $1.83/month in our data.
How much RAM does Vaultwarden need?
The project publishes no figure; it describes itself as the light alternative to the resource-heavy official server, and a 1 GB VPS is our sizing for one person or a family. For comparison, Bitwarden’s own docs ask for at least 2 GB for the standard server and at least 200 MB for Bitwarden lite.
Is self-hosting a password manager safe?
Only as safe as your discipline: a current server, automatic updates, HTTPS, and off-server backups that you have tested. If any of those laps, you are safer on a hosted manager.
Can I self-host Bitwarden for free?
The core server is free, in both the standard and lite editions, but some licensed features (SSO, enterprise policies) cost money. Vaultwarden is the free path to most of the premium features, which is why home users pick it.
What happens if my Vaultwarden server goes down?
Apps that are still unlocked or locked keep working offline in read-only mode, but you can’t edit or sync until the server returns, and a logged-out app can’t sign back in. Keep file backups, and keep your VPS and backup credentials outside the vault so a dead server is fixable.
Should I use Vaultwarden or official Bitwarden?
Vaultwarden for one person or a family who want the premium features free; official Bitwarden (lite for home use, standard for a business) when you want the vendor’s supported server or its licensed features.
How we checked: The Vaultwarden steps follow the project’s own wiki pages (Docker Compose, Enabling HTTPS, admin page, backing up your vault, WebSocket notifications), read on 2026-11-19; we did not run the commands on every provider’s image. Bitwarden’s RAM figures, offline mode and master password policy come from bitwarden.com/help, and Passbolt’s apps from passbolt.com, read the same day. Plan prices and the billing terms come from our daily reads of provider pages and our checked provider notes. How we check.