Deploy Vaultwarden on Ubuntu 26.04

– min read

Official site: github.com/dani-garcia/vaultwarden


I have been self-hosting passwords for three years. Vaultwarden made it simple – a lightweight, self-contained Bitwarden-compatible server that runs in a single Docker container. No PHP, no database server, no heavy stack. Just a binary, a SQLite file, and a reverse proxy in front. If you run Ubuntu 26.04 on a homelab server or VPS, this is the quickest way to get off a commercial password manager.


Vaultwarden official logo - a gear icon with the Vaultwarden wordmark


Requirements

You need a server running Ubuntu 26.04, Docker installed (I covered Docker setup in Bash Script to Reclaim Docker Disk Space), and a domain name pointed at your server if you want SSL certificates from Let’s Encrypt.

  1. Ubuntu 26.04 server with Docker Engine 29+
  2. Domain name (e.g. vault.example.com) with DNS A record to your server
  3. Ports 80 and 443 open in your firewall
  4. Docker Compose (optional, but I use it below)


Step 1 – Pull the Image

Vaultwarden publishes official images on Docker Hub. Pull the latest:

docker pull vaultwarden/server:latest
d927b0341946: Pull complete
88b906c6a864: Pull complete
Digest: sha256:4fe17f415f90087377d37c755e0ea3cf189dcc6794e49cdd2a9adbb4937d9e1f
Status: Downloaded newer image for vaultwarden/server:latest
docker.io/vaultwarden/server:latest


Step 2 – Start the Container

Create a directory for persistent data, then start the container. The -v mount keeps your database, attachments, and configs safe across container restarts.

mkdir -p /vw-data

docker run -d --name vaultwarden \
  --restart unless-stopped \
  -e SIGNUPS_ALLOWED=true \
  -e WEBSOCKET_ENABLED=true \
  -v /vw-data:/data \
  -p 127.0.0.1:8080:80 \
  vaultwarden/server:latest
b83769ac12a3865c5f9cea41ffb9fead99daedc33de6f7ebad19f6313a0f2197

Give it a few seconds, then check the logs:

docker logs vaultwarden
/--------------------------------------------------------------------\
|                        Starting Vaultwarden                        |
|                           Version 1.37.5                           |
|--------------------------------------------------------------------|
| This is an *unofficial* Bitwarden implementation, DO NOT use the   |
| official channels to report bugs/features, regardless of client.   |
| Send usage/configuration questions or feature requests to:         |
|   https://github.com/dani-garcia/vaultwarden/discussions or        |
|   https://vaultwarden.discourse.group/                             |
| Report suspected bugs/issues in the software itself at:            |
|   https://github.com/dani-garcia/vaultwarden/issues/new            |
\--------------------------------------------------------------------/

[2026-11-27 03:08:57.821][vaultwarden::auth][INFO] Private key 'data/rsa_key.pem' created correctly
[2026-11-27 03:08:57.855][start][INFO] Rocket has launched from http://0.0.0.0:80

Notice the line Rocket has launched from http://0.0.0.0:80. The container listens on port 80 internally – I mapped it to 127.0.0.1:8080 so only the reverse proxy (on the same machine) can reach it. No direct exposure to the internet.


Vaultwarden deployment architecture showing client devices to Caddy reverse proxy to Docker container with SQLite database


Step 3 – Reverse Proxy with Caddy

Vaultwarden serves the web vault and the API over HTTP. You want HTTPS in front. I use Caddy – it issues Let’s Encrypt certificates automatically and proxies requests to the Vaultwarden backend. If you haven’t set up Caddy yet, I wrote Install Caddy Reverse Proxy on Ubuntu 26.04 that walks through the install.

Here is the Caddyfile entry for Vaultwarden:

vault.example.com {
  reverse_proxy 127.0.0.1:8080
  header Strict-Transport-Security "max-age=31536000"
}

Reload Caddy after adding the entry:

caddy reload

Make sure your domain’s DNS resolves to the server before Caddy tries to fetch the certificate. Caddy handles the entire ACME process – no certbot commands needed.


Step 4 – First Login

Open https://vault.example.com in a browser. You should see the Vaultwarden login screen. Click “Create Account” and register your first user. Once done, disable signups by setting SIGNUPS_ALLOWED=false in the Docker environment and restart.

docker stop vaultwarden
docker rm vaultwarden

docker run -d --name vaultwarden \
  --restart unless-stopped \
  -e SIGNUPS_ALLOWED=false \
  -e WEBSOCKET_ENABLED=true \
  -e DOMAIN=https://vault.example.com \
  -v /vw-data:/data \
  -p 127.0.0.1:8080:80 \
  vaultwarden/server:latest

Set DOMAIN to your actual URL. Vaultwarden uses it for the WebSocket address and email links. Without it, the browser extension may warn about an untrusted origin.


Step 5 – Back Up the Data

The SQLite database lives at /vw-data/db.sqlite3. Back it up. I rsync the entire /vw-data directory to a separate disk daily, and schedule the sync with a systemd timer (I compared cron vs systemd timers and picked timers for this).

#!/bin/bash
# Daily Vaultwarden backup
BACKUP_DST="/mnt/backups/vaultwarden"
TIMESTAMP=$(date +%Y%m%d-%H%M%S)

# Stop the container so SQLite is consistent
docker stop vaultwarden

mkdir -p "$BACKUP_DST/$TIMESTAMP"
rsync -a --delete /vw-data/ "$BACKUP_DST/$TIMESTAMP/"

# Keep latest copy for quick restore
rsync -a --delete /vw-data/ "$BACKUP_DST/latest/"

docker start vaultwarden

# Keep 30 days of backups
find "$BACKUP_DST" -maxdepth 1 -type d -name "2*" | sort | head -n -30 | xargs -r rm -rf

You can also export the vault contents as JSON from the admin panel or via the API for an additional layer of portable backups.


Vaultwarden has been running on my homelab for about a week now. It syncs across four devices (phone, tablet, work laptop, desktop) without a hitch. The SQLite backend handles multiple simultaneous clients fine – this is a server built for the Bitwarden API, and it shows. Start with signups enabled, create your accounts, then lock it down.

Mohamad ZulfahmyCybersecurity · OffSec · Entrepreneur
About me ↗
ON THIS PAGE
On this page