How to Self-Host Vaultwarden on a Mini PC with Docker

A password manager holds the keys to everything else you own, so where it lives matters. Bitwarden is a popular open-source password manager, and Vaultwarden is a lightweight, unofficial server that works with the Bitwarden apps and browser extensions. It runs happily in a small Docker container on a mini PC, which makes it a favorite homelab project.

It is also the one project in this series where a mistake can cost you something real: if you lose the data, you lose your passwords. So this guide is deliberately cautious. It covers the install, the two settings you must change after setup, HTTPS, and backups. I have not run these exact steps on a fresh machine for this article, so test with a throwaway account before you move your real passwords over.

Should you self-host a password manager?

Be honest with yourself before you start. Self-hosting means you are responsible for backups, updates, and keeping the server private. The hosted Bitwarden service takes all of that off your hands.

Self-hosting makes sense if you already run a small homelab, you keep tested backups, and you enjoy learning how this works. If you are not sure you will keep up with updates and backups, use a hosted password manager instead and revisit Vaultwarden later. Vaultwarden is popular in the self-hosting world; one tracking site listed it at over 70,000 GitHub stars in November 2026.

What you need first

Step 1: Create the folder and Compose file

sudo mkdir -p /srv/docker/vaultwarden
cd /srv/docker/vaultwarden
sudo nano compose.yaml
services:
  vaultwarden:
    container_name: vaultwarden
    image: vaultwarden/server:latest
    restart: unless-stopped
    environment:
      DOMAIN: "https://vault.home.example.com"
      SIGNUPS_ALLOWED: "true"
    ports:
      - "8222:80"
    volumes:
      - ./data:/data

What each setting does:

  • DOMAIN is the full HTTPS address you will use. Replace it with your own. It must match the address in your browser.
  • SIGNUPS_ALLOWED is temporarily "true" so you can create your account. You will turn it off in Step 3.
  • 8222:80 publishes the app on host port 8222. If Docker reports that the port is taken, see our port is already allocated fix.
  • ./data:/data keeps everything, including your encrypted vault, in a folder you can back up.

One note on the image tag: latest is convenient, but for a password manager you may prefer to pin a specific version number and update on purpose, after a backup.

Start it:

docker compose up -d
docker compose logs -f

Step 2: Put HTTPS in front of it

Do not log in over plain HTTP. Set up the reverse proxy first.

In Nginx Proxy Manager, add a proxy host for your vault name, forward it to your mini PC’s IP on port 8222, and turn on Websockets Support. Then request an SSL certificate for the host. For a home network, the practical route is a domain you own plus the Let’s Encrypt DNS challenge, which does not require opening any ports to the internet. Point the name at your mini PC in Pi-hole, as described in the NPM guide.

A private name such as .home.arpa works for plain HTTP, but browsers will not trust a certificate for it without extra work. That makes a real domain the simpler choice for Vaultwarden.

Open your HTTPS address, for example https://vault.home.example.com. You should see the Bitwarden-style login page with a padlock.

Step 3: Create your account, then close sign-ups

Click Create account, enter your email, and choose a strong master password. This password cannot be recovered by anyone, including you, if you forget it. Write it down and keep it somewhere physically safe.

Now close the door. Edit compose.yaml and change:

SIGNUPS_ALLOWED: "false"

Apply the change:

docker compose up -d

Do not skip this. If sign-ups stay open and the address ever becomes reachable, anyone who finds it can register an account on your server. Guides for this setup consistently describe closing sign-ups right after you create your account as essential, not optional.

The admin panel: leave it off unless you need it

Vaultwarden has an admin page at /admin. It is only enabled if you set an ADMIN_TOKEN. For a one-person homelab, you can simply leave it out, which is the safer default. If you need it later (for example, to invite family members), use a hashed token rather than a plain password. Recent guides say Vaultwarden recommends an Argon2-hashed token. You can generate one with:

docker run --rm -it vaultwarden/server:latest /vaultwarden hash

Paste the result into the ADMIN_TOKEN setting. If the hash contains $ characters inside a Compose file, they may need doubling to $$, so follow the official wiki page on enabling the admin page carefully.

Step 4: Turn on two-step login and install the apps

In the web vault, open Settings > Security > Two-step login and enable an authenticator app. Then install the Bitwarden browser extension and phone app, and before logging in, choose the self-hosted option and enter your server address (the HTTPS one).

Test it with a few throwaway entries first. Make sure you can log in on two devices and that changes sync.

Step 5: Back up, and test the restore

Your data lives in the data folder. The simplest safe backup is to stop the container, copy the folder, and start it again:

cd /srv/docker/vaultwarden
docker compose stop
sudo tar czf ~/vaultwarden-backup-$(date +%Y%m%d).tar.gz data
docker compose start

Copy the archive somewhere off the mini PC, such as another computer or an external drive. A backup on the same disk is not a backup. Some guides also describe a built-in backup command, docker exec vaultwarden /vaultwarden backup, which makes a consistent copy of the database while the app is running. It may depend on your version, so check the official wiki before relying on it.

Then actually practice restoring on a spare machine or a test folder at least once. A backup you have never restored is only a hope. You can also export your vault from the web vault to an encrypted file as a second layer, and store that separately.

Remote access without exposing the server

Do not forward ports on your router to reach the vault from outside. Use a VPN instead. With Tailscale, your phone can reach the server from anywhere, and nothing is exposed to the public internet. Note that the Bitwarden apps still need the HTTPS address to work, so keep the same domain name for both home and remote use.

Troubleshooting

ProblemWhat to check
Web vault will not load or shows a crypto errorYou are probably using plain HTTP. Use the HTTPS address through your reverse proxy.
Apps will not syncConfirm Websockets Support is on in NPM and that DOMAIN matches your real address exactly.
Cannot create an accountCheck that SIGNUPS_ALLOWED is "true" and that you recreated the container with docker compose up -d.
Container will not startRead docker compose logs. A taken port or a typo in the Compose file is most common.
Admin page does not openIt stays off without an ADMIN_TOKEN. That is normal.

Frequently asked questions

Is Vaultwarden the same as Bitwarden?

No. Bitwarden is the official product and service. Vaultwarden is an unofficial, community-built server that is compatible with the Bitwarden apps and uses far fewer resources. It is not supported by Bitwarden, so report its problems to the Vaultwarden project, not to Bitwarden.

Is it safe to host my own passwords?

It can be, if you keep the server private, use HTTPS, close sign-ups, enable two-step login, update regularly, and keep tested off-site backups. If any of those sounds like too much, a hosted password manager is a reasonable choice.

How much power does it need?

Very little. It is a small service and runs comfortably on a low-power mini PC alongside your other containers.

What if my mini PC dies?

With an off-site backup of the data folder, you can start a new container on another machine with the same Compose file and restore the folder. Without it, the vault is gone. This is why Step 5 matters most.

Sources

Leave a Comment