Password Managers guide
Vaultwarden Docker Compose Setup: Secure It Before First Login
Deploy Vaultwarden with Docker Compose, HTTPS, persistent data, disabled public signups, verified clients, and recoverable backups.
Published and reviewed by OpenAlt · September 22, 2026

Treat TLS, backups, SMTP, and the admin token as operational controls. This sequence keeps a small deployment usable while limiting avoidable exposure.
Table of Contents
This guide covers the decision, preflight checks, Compose configuration, HTTPS, first-account setup, verification, backups, updates, rollback, and failures.
- Decide first
- Preflight
- Compose file explained
- TLS and reverse proxy
- Create the account, then close signups
- Verify clients and WebSocket behavior
- Backup
- Update and rollback
- Common failures
- Choose the next step
- Frequently Asked Questions
Decide first
Vaultwarden is a lightweight, self-hosted server compatible with Bitwarden clients. It is unofficial and not associated with Bitwarden, so you own storage, HTTPS, backups, updates, and account access. Review the official project README before choosing it.
Use this rule:
- Choose Vaultwarden for a compact homelab or small-team deployment you can operate.
- Choose the official Bitwarden Server when official project identity matters most.
- Browse the password-manager directory when comparing options.
A container running on a local port is not a finished password-manager deployment. The public URL, reverse proxy, persistent storage, signup state, and recovery plan all matter.
Preflight
Before creating an account, confirm that:
- A hostname resolves to the reverse proxy or server publishing Vaultwarden.
- The final HTTPS URL is known and will match
DOMAINexactly. /datais mapped to durable storage.- The proxy can issue and renew certificates.
- The
/datastorage is included in a backup plan. - SMTP credentials and any admin token have private storage.
- Public signup can be closed immediately after the first account is created.
The official Using Docker Compose guidance uses /data, sets DOMAIN, and recommends disabling SIGNUPS_ALLOWED after account creation. Make these initial-run controls part of the deployment plan.
Compose file explained
Define one Vaultwarden service, persist /data, set the public DOMAIN, and control signup state through environment settings.
| Compose concern | Decision | Reason |
|---|---|---|
| Image | Use the image from the official example | Aligns with project guidance |
| Storage | Mount durable storage at /data | Preserves data across replacement |
DOMAIN | Set the exact HTTPS URL | Keeps clients and server consistent |
SIGNUPS_ALLOWED | Enable only during setup | Removes open registration afterward |
| Restart behavior | Restart after routine interruptions | Reduces manual recovery |
| Network | Join the proxy network | Avoids an unnecessary public app port |
Render the configuration first:
docker compose config
Confirm the storage mapping and environment values, then start the service:
docker compose up -d
docker compose ps
A running container proves only that the process started. The proxy, URL, signup, and backup decisions still determine whether the deployment is ready. Use Using Docker Compose as the project baseline.
TLS and reverse proxy
Put Vaultwarden behind an HTTPS reverse proxy before storing real credentials. The proxy must forward normal HTTP traffic and WebSocket traffic, and the public URL must match DOMAIN.
Use this workflow:
- Create the DNS record for the hostname.
- Configure TLS termination and certificate renewal.
- Forward requests to Vaultwarden over the internal network.
- Preserve the host and forwarding information expected by the application.
- Enable WebSocket support.
- Open the public HTTPS URL and inspect the certificate.
Do not use an unencrypted public endpoint as the normal client URL. HTTPS protects credentials in transit and avoids relying on a local-network assumption that may fail for mobile devices, remote users, or shared Wi-Fi. Adapt the relevant configuration from the project’s Proxy examples.
Create the account, then close signups
Create the intended primary account while signups are enabled. Verify it, then close registration:
- Start the Compose project with signup enabled.
- Open the HTTPS
DOMAINin a browser. - Create the first account with a strong, unique master password.
- Sign in and confirm that the web vault loads.
- Set
SIGNUPS_ALLOWEDtofalse. - Restart or recreate the service so the change is applied.
- Confirm that a new registration attempt is rejected.
Closing signup is an access-control step. If another user needs access, use the supported invitation or organization workflow instead of leaving public registration open.
SMTP credentials and the admin token are secrets. Keep them out of screenshots, shared notes, and copied logs. Test SMTP with a controlled account after HTTPS works, because a broken mail path can resemble an authentication problem. Keep administrative access private unless it is intentionally protected; the Proxy examples include relevant security considerations.


Verify clients and WebSocket behavior
Verification is complete when the public vault, authentication, synchronization, and WebSocket connection work through the HTTPS hostname.
- Confirm
docker compose psshows the service running. - Check
docker compose logs --tail=100for repeating errors. - Visit
DOMAINand confirm the certificate and web vault. - Sign in from a browser.
- Connect one Bitwarden-compatible client using the same server URL.
- Create a harmless test item and confirm synchronization.
- Test outside the local network if remote access is required.
- Inspect browser or proxy diagnostics for WebSocket failures.
A page that loads does not prove live synchronization works. If clients connect but changes lag, inspect proxy WebSocket handling before changing Vaultwarden settings. The Proxy examples cover this deployment detail.
Backup
Back up the host storage mounted at /data; it contains the persistent data the container depends on. A practical routine includes:
- A consistent copy of
/data. - Protection for the backup destination and encryption keys.
- A record of when each backup was taken.
- At least one location separate from the running host.
- A restore check before an outage occurs.
Back up before changing the image, Compose configuration, storage layout, or proxy. Keep configuration and secret-handling notes with recovery documentation, but do not mistake them for vault-data backups. Follow Backing up your vault for project guidance.
Update and rollback
Update only when /data is preserved, the latest backup is readable, and rollback is possible.
- Confirm the backup completed.
- Record the current Compose file and image reference.
- Pull or select the intended update.
- Recreate the service.
- Recheck status, logs, HTTPS, login, synchronization, and WebSockets.
- If it fails, restore the prior image reference and configuration, then verify the service and backup state.
Do not delete persistent storage while testing. Replace the container if needed, but keep the intended /data location attached. Record rollback steps clearly enough for another operator to follow.
Common failures
| Symptom | Likely cause | Check |
|---|---|---|
| Web vault works but clients fail | DOMAIN differs from the public URL | Compare the setting with the browser URL |
| Data disappears after replacement | /data is not durable | Inspect docker compose config |
| Synchronization is unreliable | WebSocket forwarding is incomplete | Review proxy settings and logs |
| Certificate warning | TLS or DNS is wrong | Inspect the certificate and DNS path |
| New users can register | Signup change was not applied | Confirm the environment and restart |
| Mail does not arrive | SMTP path or credentials are wrong | Review mail settings and logs |
| Recovery is uncertain | Backup was never restored in testing | Perform a controlled restore check |
Redact secrets before sharing logs. Use the official Proxy examples and backup guidance when the issue involves forwarding, persistence, or recovery.
Choose the next step
The deployment is ready when HTTPS works, /data persists, the first account signs in, public signup is closed, clients synchronize, and a restorable backup exists. Continue with Vaultwarden on OpenAlt, compare the official Bitwarden Server, or browse the password-manager directory.
Frequently Asked Questions
Is Vaultwarden official Bitwarden?
No. It is an unofficial, Bitwarden-compatible server project and is not associated with Bitwarden. See the official project README.
Is HTTPS required?
Treat HTTPS as required for a real user-facing deployment. Match the public URL to DOMAIN, issue the certificate before storing credentials, and enable WebSocket forwarding. See the Proxy examples.
Which folder must be backed up?
Back up the persistent storage mounted at /data. The Compose file helps rebuild the service but cannot replace a vault-data backup. Test restoration before relying on it. See Backing up your vault.
Can a small team use it?
Yes, if an operator owns HTTPS, persistence, signup control, backups, updates, and recovery testing. Close public signup after the first account and manage later access deliberately.
Should the admin interface be public?
Keep administrative access private unless it is intentionally protected through the proxy and access controls. Treat the admin token as a secret and never expose it in shared diagnostics.