Vaultwarden: Self-Hosting a Password Manager on Your NAS
If you want a self hosted password manager that works with Bitwarden’s official apps (browser extensions, mobile, desktop) without paying $10/year for premium cloud sync, Vaultwarden is your answer. It’s a lightweight, community-maintained server implementation that runs on virtually any NAS with Docker support — TrueNAS SCALE, Unraid, OMV, or a plain Linux box. This guide covers the setup, the security requirements you cannot skip, and the backup strategy that keeps your vault from becoming a catastrophe.
What Is Vaultwarden and Why Run It on Your NAS?
Vaultwarden is an unofficial, open-source reimplementation of the Bitwarden server API, written in Rust. It’s designed to be lightweight — it uses about 512MB of RAM and a few hundred megabytes of storage for the database — compared to the official Bitwarden server, which requires SQL Server, 2GB+ RAM, and significantly more complexity. Vaultwarden is fully compatible with all official Bitwarden clients (browser extensions, mobile apps, desktop apps) and supports nearly all premium features like TOTP (time-based one-time passwords) and file attachments without requiring a paid subscription.
Vaultwarden is not developed by Bitwarden Inc. It’s an independent project that reverse-engineers the Bitwarden API. The project has been actively maintained since 2020 and is widely trusted in the homelab community, but you should review the source code and community reputation before trusting it with your passwords.
Vaultwarden vs Bitwarden: What’s the Difference for a Self Hosted Password Manager?
The core difference is where the server runs. With Bitwarden’s official cloud service, your encrypted vault lives on Bitwarden’s servers. With Vaultwarden, your vault lives on your NAS. Both use the same client apps and the same zero-knowledge encryption — Bitwarden cannot read your vault data, and Vaultwarden cannot read it either. The encryption happens on your device before anything is sent to the server.
Vaultwarden (Self-Hosted)
- Free, no subscription for premium features
- Full control over your data — no third-party server
- Can run on low-powered NAS hardware (N100, Raspberry Pi 4)
- Supports TOTP, file attachments, and Bitwarden Send
Bitwarden Cloud
- Premium features require $10/year subscription
- Data stored on Bitwarden’s infrastructure
- No maintenance — Bitwarden handles updates and uptime
- Built-in HTTPS, backups, and disaster recovery
For most homelab users, Vaultwarden makes sense if you already maintain a NAS, want to avoid recurring costs, and are comfortable handling your own backups and security. If you don’t want to manage a server, the $10/year Bitwarden premium is still excellent value.
Is Vaultwarden Safe? Security Considerations Before You Deploy
Vaultwarden uses the same encryption standard as Bitwarden: AES-256-CBC with PBKDF2 SHA-256 (or Argon2id for newer clients). Your master password never leaves your device unhashed. The server only stores encrypted blobs — even if someone gains access to your NAS, they cannot read your passwords without your master password.
The biggest security risk with self-hosting is you. If your NAS is exposed to the internet without HTTPS, a reverse proxy, and proper firewall rules, an attacker could intercept your traffic or exploit vulnerabilities. Do not skip the HTTPS setup described below.
Vaultwarden itself is open-source and audited by the community. The project publishes Docker images with signed checksums. However, no self-hosted solution is safer than the person maintaining it — you must update the container regularly, apply NAS security patches, and follow backup best practices.
Prerequisites: What You Need Before Installing Vaultwarden
- A NAS or server running Docker (TrueNAS SCALE, Unraid, OMV, or a Linux host)
- Docker Compose installed (included on most modern NAS OSes)
- A persistent storage volume for the vault database (at least 1GB)
- A reverse proxy (Nginx Proxy Manager, Traefik, or Caddy) for HTTPS
- A domain name or DuckDNS address if accessing outside your LAN
- Port 443 (HTTPS) forwarded to your reverse proxy (if exposing externally)
If you’re new to Docker on your NAS, read our Best Docker Server Build 2026 guide for hardware recommendations that handle containers efficiently without breaking your power budget.
Step-by-Step Vaultwarden Setup Guide with Docker Compose
This guide is NAS-OS agnostic — it uses generic Docker Compose that works on TrueNAS SCALE, Unraid, OMV, or any Linux host. The steps assume you have Docker and Docker Compose installed.
On your NAS, create a folder for persistent storage: mkdir -p /docker/vaultwarden/data. This folder will hold the SQLite database that contains all your encrypted passwords.
Create /docker/vaultwarden/docker-compose.yml with the following content:
version: '3'
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: unless-stopped
volumes:
- ./data:/data
environment:
- SIGNUPS_ALLOWED=false
- DOMAIN=https://vault.yourdomain.com
ports:
- "8080:80"
Set SIGNUPS_ALLOWED=false after creating your account to prevent others from registering. Replace DOMAIN with your actual domain or DuckDNS address.
Run docker compose up -d from the directory. Vaultwarden will start on port 8080 (or whichever host port you chose). Verify it’s running with docker ps.
Configure your reverse proxy (e.g., Nginx Proxy Manager) to forward https://vault.yourdomain.com to http://[NAS-IP]:8080. Enable HTTPS with a Let’s Encrypt certificate. This is non-negotiable — Vaultwarden’s WebSocket connections for browser extensions require HTTPS.
Visit https://vault.yourdomain.com in a browser. Register your master password. After account creation, set SIGNUPS_ALLOWED=false in the Docker Compose file and restart the container.
If you’re running TrueNAS SCALE, you can use the built-in Apps system instead of Docker Compose. Search for “vaultwarden” in the catalog, set the storage path to a dataset (preferably on a mirrored pool for redundancy), and configure the environment variables in the UI. For Unraid, use the Community Applications plugin to install Vaultwarden from the template repository — it handles the reverse proxy setup automatically if you have Nginx Proxy Manager running.
Why HTTPS and a Reverse Proxy Are Non-Negotiable
Vaultwarden communicates with client apps over WebSockets for real-time sync. WebSockets require TLS (HTTPS) to work in most browsers and mobile apps. Without HTTPS, browser extensions will refuse to connect, and mobile apps will throw security errors. Even if you only access Vaultwarden on your local network, modern browsers enforce HTTPS for service workers and WebSocket connections.
If you don’t have a domain, use a free DuckDNS subdomain and a Let’s Encrypt certificate via your reverse proxy. For LAN-only access, you can use a self-signed certificate, but you’ll need to install it on every client device — a hassle that makes a DuckDNS setup simpler for most users.
Backup Strategy for Your Vaultwarden Database
This is the one self-hosted app where backup failure is catastrophic. Lose your Vaultwarden database, and you lose every password, every TOTP seed, every secure note — with no recovery option. Bitwarden’s zero-knowledge encryption means there is no “forgot my password” reset. The vault database is in a single file: /data/db.sqlite3 (inside the container, mapped to your host volume).
- Back up the entire
/docker/vaultwarden/data/directory daily - Use a script that stops the container, copies the database, and restarts it (SQLite can corrupt if backed up while in use)
- Store backups on a separate NAS or cloud location — not the same drives as the Vaultwarden container
- Test a restore at least once: delete the container, copy the backup, and verify you can log in
If you use TrueNAS with ZFS, you can use ZFS Snapshots for instant, crash-consistent backups of the vault dataset. Combine ZFS snapshots with off-site replication for a robust backup strategy.
Vaultwarden also supports an ADMIN_TOKEN environment variable that enables a web-based admin panel. From there, you can export your vault as a JSON file — but this export is unencrypted, so store it securely. Regular database file backups are more reliable than exports.
Setting Up Client Apps: Browser Extensions and Mobile
Once Vaultwarden is running behind HTTPS, client setup is straightforward. All official Bitwarden clients support custom server URLs.
Install the official Bitwarden extension. Click the extension icon → Settings → Self-hosted environment. Enter your Vaultwarden URL (e.g., https://vault.yourdomain.com). Log in with your master password.
Download the Bitwarden app. Tap Settings → Self-hosted. Enter your URL. Log in. Mobile apps require HTTPS — a self-signed certificate will not work without manual trust configuration.
Same process: Settings → Self-hosted, enter URL, log in. The desktop app supports offline access if you’ve synced recently.
If you use Tailscale or WireGuard to access your NAS remotely, you can point client apps to Vaultwarden’s LAN IP (e.g., http://192.168.1.100:8080) without HTTPS — but only if you’re on the VPN. This avoids the need for a public domain and reverse proxy entirely. For most users, a reverse proxy is simpler for multi-device access.
Which Should You Choose: Vaultwarden or Bitwarden Cloud?
Pick Vaultwarden if you already run a NAS with Docker, want premium features for free, and are willing to maintain your own backups and HTTPS setup. It’s ideal for homelab users who value data sovereignty and have the technical comfort to troubleshoot a container occasionally.
Pick Bitwarden Cloud if you want zero maintenance, don’t want to manage a reverse proxy, or need guaranteed uptime. The $10/year premium is a fair trade for not having to think about server updates or database corruption.
Frequently Asked Questions
Is Vaultwarden safe to use instead of Bitwarden’s cloud?
Yes, Vaultwarden uses the same zero-knowledge encryption as Bitwarden — AES-256-CBC with PBKDF2 SHA-256 or Argon2id. Your master password never leaves your device unhashed, so even if the server is compromised, an attacker cannot decrypt your vault without your master password. The main safety difference is operational: with Bitwarden Cloud, the company handles updates, backups, and DDoS protection. With Vaultwarden, you are responsible for keeping the container updated, maintaining HTTPS, and running regular backups. For a homelab user who follows security best practices, Vaultwarden is as safe as the cloud version.
Do I need HTTPS to run Vaultwarden?
Yes, HTTPS is non-negotiable for any practical deployment. Browser extensions require HTTPS for WebSocket connections used to sync passwords in real time. Mobile apps will refuse to connect over plain HTTP. Even on a local network, modern browsers enforce HTTPS for service workers. You can use a reverse proxy like Nginx Proxy Manager or Caddy with a Let’s Encrypt certificate. If you only access Vaultwarden via a VPN (Tailscale or WireGuard), you can use HTTP over the VPN tunnel since the traffic is already encrypted — but this limits access to devices on the VPN.
What happens if I lose my Vaultwarden backup?
Losing your Vaultwarden database means losing every password, TOTP seed, and secure note stored in the vault — with no recovery option. Bitwarden’s zero-knowledge encryption means there is no password reset or data recovery mechanism. This is why you must back up the db.sqlite3 file daily, store backups on a separate device or cloud location, and test a restore at least once. Combine regular database backups with an export of your vault (use the admin panel’s JSON export) stored encrypted elsewhere. Without a backup, data loss is permanent and total.
Can I use the official Bitwarden apps with Vaultwarden?
Yes, all official Bitwarden clients — browser extensions for Chrome, Firefox, Edge, and Safari; mobile apps for iOS and Android; and desktop apps for Windows, macOS, and Linux — support self-hosted servers. In each app, go to Settings and toggle the “Self-hosted” option, then enter your Vaultwarden URL. The apps will connect to your server using the same API endpoints as Bitwarden Cloud. All premium features, including TOTP codes, file attachments, and Bitwarden Send, work with Vaultwarden without requiring a paid subscription.
Last verified: July 10, 2026. Vaultwarden documentation and GitHub repository cross-checked for current configuration options. Bitwarden client compatibility confirmed against official app stores.
🛡 Shop Recommended Hardware
Prices and stock verified regularly by our affiliate partners. As an affiliate, HomeLabCost may earn a commission on qualifying purchases at no extra cost to you.
Browse Hardware Picks →