GuidesFiles, photos and homePasswords with Vaultwarden

Run Vaultwarden, a password manager, with rootless Docker

Vaultwarden on Debian 13, a Bitwarden-compatible password manager for you or your team, in rootless Docker under a user of its own, with HTTPS, updates and backups.

Tested on Docker steps follow the tested rootless Docker base guide on Debian 13 with Docker Engine 29.10.1, Compose 5.8.1 and rootlesskit 3.3.0; the app version and app-specific behaviour are from the tested Podman guide on a Melonslab server. Not re-tested end to end under Docker. Updated November 28, 2026

Recommended server for this guide

SSD RAID 1 · ECC DDR4 · 10 Gbit

VC-P Alloy · 2 vCPU · 8 GB Memory · 60 GB Storage

Month to month, no lock-in 7-day money-back guarantee

€8.99/mo

Deploy now

Quick install on a fresh VM

This command sets up a rootless container engine and a directory for this service. Podman is the default; add --engine docker to the command to use Docker instead.

curl -fsSL https://www.melonslab.com/install/rootless.sh | bash -s -- --app vaultwarden-docker --manifest vaultwarden --sha256 0682bbcc04d7bd6f643fe3cacebbb8152004b8e0bb7a66966c076ac89b98305d
View the script

SHA-256: 97785be3e3e91393181a4a7caeab5f4b52803bf52e960dd488945cb38c6473a2

Run this guide on Melonslab

We ran every step below on our own server. For this workload we recommend VC-P Alloy at €8.99/mo. Order it, pick Debian 13, and follow the guide.

  1. 1. Order the server. Use the button below to order the recommended plan. Choose Debian 13 when the installer asks for an operating system.
  2. 2. Add IPv4 if needed. Add it on the order form when the guide publishes a service on the internet. It is a paid add-on, not included in the plan.
  3. 3. Connect over SSH. Log in as root with the address and credentials from your order, then run the commands below.
  4. 4. Follow the verified steps. Every command in this guide was run on a Melonslab server before it was published.
Deploy now
On this page

What you will set up

Vaultwarden is a small password manager server that works with the Bitwarden apps: the browser extensions, the phone and desktop apps, and the command-line client. The apps encrypt your passwords before they leave your device, so the server only ever stores encrypted data.

Here it runs as one Compose service, under a user of its own called vaultwarden, with Caddy from the rootless Docker guide in front for HTTPS. The Docker setup follows that tested base; the app results below come from the tested Podman guide on a Melonslab server and were not re-measured under Docker.

The app-specific results below were recorded in the Podman test on a Melonslab VC-P Alloy (2 vCPU, 8 GB) with Debian 13. An account was created, and the official Bitwarden command-line client 2026.9.1 logged in, stored a login and read it back after a sync. Failed logins were recorded with the visitor's real IP address and sign-ups were closed. With sign-ups closed, two people were invited to an organisation, one without email and one with, created their accounts, were confirmed and read a shared login. A backup was restored, and a reboot was checked. At idle, Vaultwarden used under 10 MB of memory, so the smallest of our Standard plans has room to spare.

Before you start

You need:

  • a server set up as in the rootless Docker guide, with Caddy running;
  • a name for it, such as vault.example.com, with an A record and an AAAA record pointing at your server.

The examples use vault.example.com for the name and 203.0.113.10 for your server's IPv4 address. Replace them with your own throughout.

1. Create the user

As root:

useradd -m -s /bin/bash -U vaultwarden
loginctl enable-linger vaultwarden

Do not add the user to the docker group. The daemon is rootless and belongs to this user.

2. Describe the Compose service

As vaultwarden, create the app directory and Compose file:

umask 077
mkdir -p /home/vaultwarden/vaultwarden/data
touch /home/vaultwarden/vaultwarden/secrets.env
cat > /home/vaultwarden/vaultwarden/compose.yaml <<'YAML'
services:
  vaultwarden:
    image: docker.io/vaultwarden/server:latest
    ports:
      # Only Caddy, on this server, can reach Vaultwarden: the port is not open to the internet.
      - "127.0.0.1:8083:80"
    environment:
      DOMAIN: https://vault.example.com
      SIGNUPS_ALLOWED: "true"
      IP_HEADER: X-Forwarded-For
      IP_HEADER_TRUSTED_PROXIES: 203.0.113.10
    env_file:
      - ./secrets.env
    volumes:
      - ./data:/data
    restart: always
YAML
chmod 600 /home/vaultwarden/vaultwarden/secrets.env
chown -R vaultwarden:vaultwarden /home/vaultwarden/vaultwarden

DOMAIN is the address you will open it at. Sign-ups are open for now, so you can create your own account in step 4, and closed right after. Vaultwarden slows down password guessing per IP address, so it needs each visitor's real one. Caddy passes it on in the X-Forwarded-For header, but Vaultwarden only trusts that header from private addresses by default; IP_HEADER_TRUSTED_PROXIES names the server's IPv4 address, which is where Caddy's connections arrive from. ./data holds the database, attachments and the key the server signs logins with.

Start it:

uid=$(id -u vaultwarden)
runuser -u vaultwarden -- env HOME=/home/vaultwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/vaultwarden/vaultwarden && docker compose pull && docker compose up -d && docker compose logs -f"

When the log says Rocket has launched, press Ctrl+C.

3. Put Caddy in front

As root, add this block to the end of /home/caddy/Caddyfile:

vault.example.com {
    reverse_proxy 127.0.0.1:8083
}

And restart Caddy, which briefly interrupts every site it serves:

uid=$(id -u caddy)
runuser -u caddy -- env HOME=/home/caddy XDG_RUNTIME_DIR=/run/user/$uid \
  DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus PATH=/usr/bin:/bin \
  bash -lc "export DOCKER_HOST=unix:///run/user/$uid/docker.sock; cd /home/caddy/caddy && docker compose restart caddy"

Caddy gets a certificate for vault.example.com and renews it by itself. The web vault only works over HTTPS.

4. Create your account, then close sign-ups

Open https://vault.example.com and choose to create an account. Pick a long master password you will remember: your data is encrypted with it, so nobody, including Vaultwarden, can reset it for you.

Then close sign-ups:

uid=$(id -u vaultwarden)
runuser -u vaultwarden -- env HOME=/home/vaultwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/vaultwarden/vaultwarden && sed -i 's/SIGNUPS_ALLOWED: "true"/SIGNUPS_ALLOWED: "false"/' compose.yaml && docker compose restart"

Nobody can now create an account on their own. People you invite to an organisation still can, as step 6 shows, so sign-ups can stay closed.

5. Connect your apps

In a Bitwarden app or browser extension, choose a self-hosted server before you log in, and enter https://vault.example.com.

The Bitwarden command-line client 2026.9.1 logged in to Vaultwarden 1.37.4 in our test. Version 2026.9.0 could not log in to Vaultwarden 1.37.3, so if a new client fails, check that Vaultwarden is up to date (step 8).

6. Share with your team

Bitwarden apps share passwords through an organisation. Logged in to https://vault.example.com:

  1. Choose New organisation in the menu on the left. Give it a name and your email address, and choose Submit.
  2. In the organisation's Admin Console, open Members and choose Invite member. Enter the person's email address, and under Collections pick what they get to see, such as Default collection. Choose Save.
  3. Without email (step 7), Vaultwarden sends nothing and accepts the invite itself. Tell the person to open https://vault.example.com, choose Create account with the address you invited, and pick a master password. Only invited addresses get past the closed sign-ups.
  4. Their row under Members now says Needs confirmation. Open the row's menu, choose Confirm, and Confirm again. Vaultwarden shows their fingerprint phrase first: comparing it with them, by phone for example, makes sure you share with the right account.

Until you confirm them, they see none of the organisation's passwords. Afterwards they see the collections you picked, which you can change with Collections in the row's menu.

7. Email

Vaultwarden sends email for invites, emergency access, two-step login by email and new logins. Without email:

  • invites send no link, and Vaultwarden accepts them itself, as in step 6;
  • Email is missing from the methods under Settings > Security > Two-step login;
  • emergency contacts are accepted the same way, but nobody gets an email when one of them asks for access, so the waiting time can run out without you knowing.

To send email, use your email provider's SMTP server. As vaultwarden, put the SMTP password in the private secrets.env file that step 2 already mounts, with your own server, account and sender address:

cat >> /home/vaultwarden/vaultwarden/secrets.env <<'EOF'
SMTP_PASSWORD=the-smtp-password
EOF

Add these lines under environment: in /home/vaultwarden/vaultwarden/compose.yaml:

      SMTP_HOST: mail.example.com
      SMTP_PORT: 587
      SMTP_SECURITY: starttls
      SMTP_USERNAME: vault@example.com
      SMTP_FROM: vault@example.com
      SMTP_FROM_NAME: Vaultwarden

Port 587 with starttls is what most providers offer. For port 465, use SMTP_PORT: 465 and SMTP_SECURITY: force_tls. Then restart:

uid=$(id -u vaultwarden)
runuser -u vaultwarden -- env HOME=/home/vaultwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/vaultwarden/vaultwarden && docker compose restart"

With email on, an invite sends a Join link. The person sets their master password from it, and you confirm them as in step 6. We tested this against a test mail server on the server itself, not a real provider.

8. Keep it up to date

Add the weekly docker-update.service and docker-update.timer from the rootless Docker guide, with WorkingDirectory=/home/vaultwarden/vaultwarden, then enable the timer as vaultwarden. The service pulls a new image and recreates the container.

9. Back up and restore

As root, stop the service for a few seconds so the copy is consistent:

uid=$(id -u vaultwarden)
runuser -u vaultwarden -- env HOME=/home/vaultwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/vaultwarden/vaultwarden && docker compose stop"
umask 077
mkdir -p /home/vaultwarden/backup
tar czf /home/vaultwarden/backup/vaultwarden-data.tgz -C /home/vaultwarden/vaultwarden data
uid=$(id -u vaultwarden)
runuser -u vaultwarden -- env HOME=/home/vaultwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/vaultwarden/vaultwarden && docker compose up -d"

The archive holds the database, attachments and the key the server signs logins with. The passwords in it are encrypted with each user's master password, but keep the archive private anyway, and copy /home/vaultwarden/backup to another machine: a backup on the same server does not survive losing the server. The SMTP password from step 7 is not in it.

To restore, copy the archive to /home/vaultwarden/backup. On a new server, do steps 1 to 4 first, without creating an account, and include the secrets.env lines from step 7 if you use email. Then:

uid=$(id -u vaultwarden)
runuser -u vaultwarden -- env HOME=/home/vaultwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/vaultwarden/vaultwarden && docker compose stop"
rm -rf /home/vaultwarden/vaultwarden/data
tar xzf /home/vaultwarden/backup/vaultwarden-data.tgz -C /home/vaultwarden/vaultwarden
uid=$(id -u vaultwarden)
runuser -u vaultwarden -- env HOME=/home/vaultwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/vaultwarden/vaultwarden && docker compose up -d"

Removing data deletes what Vaultwarden holds now, so check that the archive is the one you want first.

Troubleshooting

Every failed login in the log shows your server's own address. IP_HEADER_TRUSTED_PROXIES in step 2 must be the server's IPv4 address, the one Caddy's connections arrive from.

Signing up says "Registration not allowed or user already exists". Sign-ups are closed, which is what step 4 does, and the address has not been invited, or it already has an account. Invite it as in step 6.

A new member sees no shared passwords. Confirm them under Members (step 6), and check that they have the collection.

The app cannot connect. Check that it points at https://vault.example.com, and read the log as the vaultwarden user:

uid=$(id -u vaultwarden)
runuser -u vaultwarden -- env HOME=/home/vaultwarden XDG_RUNTIME_DIR=/run/user/$uid \
  DOCKER_HOST=unix:///run/user/$uid/docker.sock PATH=/usr/bin:/bin \
  bash -lc "cd /home/vaultwarden/vaultwarden && docker compose logs vaultwarden"

Your passwords, in Sweden

With Vaultwarden on a Melonslab server, your encrypted vault is stored in Sweden, under Swedish and EU law, on a server you control.

Run it on your own server

SSD RAID 1 · ECC DDR4 · 10 Gbit

VC-P Alloy

€8.99/mo

vCPU
2
Memory
8 GB
Storage
60 GB
Transfer
10 TB
Performance
SSD · RAID 1
  • Full root access
  • Native /64 IPv6
  • RAID-protected storage
  • Malmö, Sweden
  • Month to month, no lock-in
  • 7-day money-back guarantee

Related comparisons and alternatives

All guides