Qvantor logo QvantorInfrastructure, explained plainly
Guides

Vaultwarden Setup to Self Host Your Own Password Manager

You want a password manager you control, but the official Bitwarden server wants several containers and a few gigabytes of RAM you would rather spend elsewhere.

A small home server on a wooden shelf next to a laptop showing a password vault login page

You want a password manager you control, but the official Bitwarden server wants several containers and a few gigabytes of RAM you would rather spend elsewhere. A Vaultwarden setup solves that: it is a lightweight, Bitwarden compatible server written in Rust that runs happily in one container on a small VPS or a home box, and it works with the regular Bitwarden apps and browser extensions you already know.

This guide walks through a Vaultwarden setup from an empty Linux server to a working vault behind HTTPS, with backups and the handful of settings that actually matter for security. Budget about 45 minutes the first time.

What you need before the Vaultwarden setup

Vaultwarden is undemanding. A single user or a family of five will see it idle at around 30 to 60 MB of RAM. The real requirements are elsewhere:

  • A server you trust. A 1 vCPU, 1 GB VPS at roughly 4 to 6 dollars a month is plenty, or a spare mini PC at home.
  • A domain or subdomain such as vault.yourdomain.tld pointing at that server with an A record.
  • Docker and Docker Compose installed. Any current Debian or Ubuntu release works.
  • A reverse proxy that handles TLS. Caddy is the least effort because it fetches certificates on its own.

HTTPS is not optional here. The Bitwarden web vault uses the browser's Web Crypto API, which refuses to run on plain HTTP for anything other than localhost. If you skip TLS, the web vault simply will not let you create an account.

Step by step: running Vaultwarden with Docker Compose

1. Create the folder and compose file

Make a directory such as /opt/vaultwarden and create a compose.yaml inside it with two services: vaultwarden and caddy. For Vaultwarden, use the image vaultwarden/server:latest, mount ./vw-data to /data, and set these environment variables:

  • DOMAIN set to the full https address of your vault. Attachments and email links break without it.
  • SIGNUPS_ALLOWED set to true for now. You will turn it off in ten minutes.
  • ADMIN_TOKEN set to an Argon2 hash, not a plain string. Generate it with the command vaultwarden hash run inside the container, and paste the result with every dollar sign doubled so Compose does not treat it as a variable.

Do not publish Vaultwarden's port 80 to the internet. Only Caddy should expose ports 80 and 443, and it talks to Vaultwarden over the internal Docker network.

2. Add a minimal Caddyfile

Your Caddyfile needs only three lines: the domain name, an opening brace with reverse_proxy vaultwarden:80 inside, and a closing brace. Caddy requests a Let's Encrypt certificate on first start, so make sure ports 80 and 443 are open in your firewall before you run it.

3. Start it and create your account

Run docker compose up -d, wait about 20 seconds, then open your domain. Create your account with a long passphrase you have never used anywhere else. Five or six random words is a good target. There is no recovery for a forgotten master password, by design.

4. Close signups

Once every family member or teammate has an account, set SIGNUPS_ALLOWED to false and run docker compose up -d again. From then on, invite new people from the admin page at /admin using your token. An open signup page on a public vault is the single most common mistake I see on self hosted instances.

Security settings that are worth ten minutes

The defaults are reasonable, but a few changes reduce your exposure noticeably:

  1. Enable two step login on your account. Use an authenticator app or a hardware key, and print the recovery code. Store it somewhere physical, not inside the vault it protects. If you have ever lost a phone with codes on it, our guide to recovering accounts after losing your 2FA phone shows why that paper copy matters.
  2. Configure SMTP. Without it, Vaultwarden cannot send invites, new device alerts or email based two step codes. Any transactional email provider works with SMTP_HOST, SMTP_PORT 587 and SMTP_SECURITY set to starttls.
  3. Add fail2ban. Vaultwarden logs failed logins with the client IP. A fail2ban jail that bans after 5 failures in 10 minutes blocks most automated guessing.
  4. Restrict or disable the admin page. After setup, you can remove ADMIN_TOKEN entirely, which disables /admin. Add it back only when you need it.

Backups: the part people skip until it hurts

Everything important lives in the vw-data folder: db.sqlite3, the attachments and sends folders, and rsa_key files. Lose the RSA key and every logged in client is signed out. Lose the database and every password is gone.

Do not just copy db.sqlite3 while the container is running. SQLite can be mid write, and you may get a corrupt file. Instead, run sqlite3 against the database with the .backup command to produce a consistent copy, then back up that copy along with the other files. A nightly cron job at 03:00 that does this and keeps 14 days of history covers most mistakes.

Ship those backups off the machine. A tool like Restic sends encrypted, deduplicated snapshots to cheap object storage, and our walkthrough on Restic backups for a self hosted server covers retention and restore tests. Then actually test a restore once: start a throwaway container from yesterday's backup and log in. It takes 15 minutes and tells you more than any checklist.

The common advice I disagree with

You will often read that you should never expose Vaultwarden to the internet and should only reach it through a VPN. For a solo tinkerer that is fine. For a household or a small team, I think it usually backfires.

The reason is simple. A password manager that only syncs when the VPN is up gets out of date. Your partner saves a new bank password on their phone while on mobile data, the sync silently fails, and two weeks later you have conflicting entries and nobody trusts the vault. People then go back to reusing passwords, which is the worse outcome by a wide margin.

Vault contents are encrypted on the client before they ever reach the server, so the server sees ciphertext. With signups closed, two step login enabled, fail2ban in place and the admin page disabled, a public facing vault is a reasonable trade. Keep the image updated weekly, watch the release notes, and add an external check so you know when it goes down. Our Uptime Kuma monitoring guide takes about ten minutes to point at your vault.

Updating and day to day running

Updates are a two command job: docker compose pull, then docker compose up -d. Take a backup first. Vaultwarden releases arrive every few weeks, and security fixes are called out clearly in the notes. If you want automation, schedule the pull for a weekday morning so you are around if something breaks, not at 02:00 on a Saturday.

Frequently asked questions

Is Vaultwarden safe to use instead of Bitwarden?

Vaultwarden uses the same client apps and the same end to end encryption, so your data is encrypted before it reaches the server. The difference is that you are responsible for patching, backups and access control. If you keep it updated and follow the hardening steps above, it is a solid choice for personal and small team use.

How much RAM does Vaultwarden need?

Very little. A typical household instance uses 30 to 60 MB of RAM and almost no CPU. A 1 GB VPS can run Vaultwarden, Caddy and a backup job with room to spare.

Do Bitwarden browser extensions work with Vaultwarden?

Yes. In the extension or mobile app, open the region or server setting before logging in, choose self hosted, and enter your vault's https address. Login, autofill, sync and passkey storage then work as normal.

IV
Ilkka Varis

Ilkka has run mail servers for small companies since the days of hand edited DNS zones.

More posts by Ilkka

More in Guides

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto