Self-host Vaultwarden

Server that implements the Bitwarden client API, so the Bitwarden apps and browser extensions can use a password vault you host yourself. Run your own Vaultwarden on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.

Updated November 23, 2026

Running your own Vaultwarden usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Vaultwarden behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.

Just ask your agent

Open a Plus workspace (Vaultwarden runs in Docker, which Plus and Pro include), tap Launch to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:

Set up Vaultwarden on this workspace and give me the link. Follow https://envhaven.com/self-host/vaultwarden.md

Then open the link it sends and create your Vaultwarden account straight away, before anyone else finds the address. That is the whole request: the address in it is this page’s Markdown copy, and the agent follows the instructions for it further down, with every setting Vaultwarden’s docs require.

Or keep it private with Tailscale

The preview URL puts Vaultwarden on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Vaultwarden an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace’s Vars pane as TS_AUTHKEY, and ask the agent:

Set up Vaultwarden on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/vaultwarden.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
  • A Tailscale container runs beside Vaultwarden, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
  • Anything other services have to reach, such as a webhook, still needs a public address. Keep self-hosted apps private with Tailscale covers both, and what Tailscale’s free plan includes.
At a glance
What it isHome, money and everyday life
LicenseAGPL-3.0
Runs asDocker (vaultwarden/server)
MemoryAbout 10 MB to run; about 1.5 GB only while building the web vault from source (docs)
Plan that fitsPlus or larger
Web port80
Documentationgithub.com/dani-garcia/vaultwarden/wiki

What your agent takes care of

  • Installing it. Vaultwarden runs from the official image, vaultwarden/server, with its data in folders under ~/apps/vaultwarden.
  • Putting it on an HTTPS address. The workspace’s preview URL serves it, and your own domain can too.
  • Locking it down first. What Vaultwarden’s docs say to set before it faces the internet, below.
  • Telling you what to back up: /data in the container (the data directory; mount a host folder there), db.sqlite3 with its -wal and -shm files (backup required), attachments/ (backup required), sends/ (backup optional), config.json (backup recommended), rsa_key.* (backup recommended) and icon_cache/ (backup optional) (docs).

The settings it needs behind a proxy

  • DOMAIN: The public URL of the instance, with https:// and any port or path; it must match the address you browse to. (docs)
  • DOMAIN (https requirement for attachments): The compose example notes that Vaultwarden must be told the public address is https for attachments to work behind a proxy. (docs)
  • ENABLE_WEBSOCKET (default true): Live-sync notifications for desktop, browser and extension clients; a reverse proxy must pass the WebSocket upgrade headers. (docs)
  • WebSocket port (old WEBSOCKET_ENABLED and WEBSOCKET_PORT 3012 are gone): WebSocket traffic now shares the main HTTP port, so only one port needs proxying. (docs)
  • IP_HEADER (default X-Real-IP; the string none disables it): Request header from which Vaultwarden reads the real client IP when behind a proxy. (docs)
  • IP_HEADER_TRUSTED_PROXIES (default local): Which proxy addresses may set that header; the default accepts any non-global address, so list a proxy that connects from a public address. (docs)
  • ROCKET_ADDRESS and ROCKET_PORT: Listen address and port of the built-in server; the proxy upstream is typically 127.0.0.1:8000 published from the container’s port 80. (docs)

Before it faces the internet

  • Open registration is the default: anyone who can reach the instance can create an account. Set SIGNUPS_ALLOWED=false once your own account exists. (docs)
  • The admin panel stays disabled until ADMIN_TOKEN is set. (docs)
  • The admin token is the password to the admin area, so keep it secret. (docs)
  • Store the admin token as an Argon2 hash; the binary can generate it. (docs)
  • Enable HTTPS before the admin page. (docs)
  • Password hints are shown on the login page when SMTP is not configured, which can help password guessing. (docs)
  • Use a reverse proxy for TLS instead of the built-in Rocket TLS. (docs)

Things to ask next

Everything after the install is one more sentence to the agent. Some that come up:

  • “Import last year’s data from the CSV I dropped into the workspace.”
  • “Set up a second account for the household.”
  • “Move Vaultwarden to app.example.com.” Add the domain on the dashboard’s Domains page with a CNAME to domains.envhaven.app, and the agent changes Vaultwarden’s address settings to match.
  • “Update Vaultwarden to the latest release.” It pulls the new image and recreates the container, data kept.

Instructions for the agent

The agent reads these from the page’s Markdown copy. They also work pasted on their own, if you would rather give them in your own words.

Set up Vaultwarden on this workspace and serve it at my preview URL.
- Use Docker Compose with the official image, vaultwarden/server, starting from the docs' compose file: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- Keep the compose file in ~/apps/vaultwarden and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Vaultwarden's port 80.
- The preview URL terminates HTTPS in front of Vaultwarden: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/vaultwarden.md for the preview URL, as Vaultwarden's docs describe for running behind a proxy; skip any that apply only when Vaultwarden serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/vaultwarden.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Vaultwarden up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.

What to know

  • In Docker, Vaultwarden’s containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
  • The web vault needs HTTPS (a secure browser context), so an HTTP-only address does not work; terminate TLS at the tunnel or proxy. (docs)
  • Cloudflare proxying is an accepted way to get HTTPS. (docs)
  • API request bodies are capped at 10 MB by default (ROCKET_LIMITS); an HTTP tunnel’s own body cap applies on top. (docs)
  • Mobile push needs an installation ID and key from Bitwarden’s hosted service; without them mobile apps sync manually. (docs)
  • WebSocket notifications do not cover mobile clients, which use the native push services instead. (docs)
  • Email is off until an SMTP host (or sendmail) and sender are set. (docs)
  • Features that need mail include account recovery. (docs)
  • A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.

Without a workspace

The manual route, on a server you run:

  1. Rent a Linux VPS, secure SSH, and create a user for the app.
  2. Install Docker and write a compose file from the official image.
  3. Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
  4. Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
  5. Keep the firewall closed except for the proxy, and schedule backups and updates.

Vaultwarden’s own documentation covers each step for its install methods.

Sources

Facts about Vaultwarden come from its own documentation, checked on 2026-11-23: