WIUNIX ACADEMY
Self-host Vaultwarden with HTTPS, restricted admin access and consistent backups
Page 5 of 5. Review the earlier steps and prerequisites before continuing.
YOUR SYSTEM. YOUR STEPS.
Where are you working?
Choose your OS and version. The prerequisites, commands and troubleshooting follow your environment.
USE YOUR OWN VALUES
Configure this tutorial
Set the example values for your environment; related explanations and copy panels update together. Never enter passwords, private keys or tokens. Values stay in this tab and are not sent to the server or share links. Check actual DNS, certificates and network policy before running commands.
Different IP addresses, domains or ports? Open the settings below, change the values and select “Apply to tutorial”, then copy the updated commands.
Set values for my environment7 editable values
Restore into an empty isolated destination
Retrieve and decrypt a chosen checkpoint into a new private recovery workspace on an isolated host. Verify its checksum and inspect tar members before extraction: accept only expected relative data/config/secrets/tls members, regular files/directories, no symlink/hardlink/traversal, no overwrite. Keep the original service and its storage untouched. Restore ownership/modes and use the same image digest first.
Do not publish host ports or connect the rehearsal to users, email, push providers or public DNS. Mount a separate empty data destination, with a private configuration/DOMAIN for the fixture. For a stopped full-file checkpoint restore the matching SQLite and WAL together. For a database produced by SQLite online backup restore only that database into a fresh directory without stale WAL/SHM; never mix the two methods. Preserve corresponding attachments/Sends/config/RSA keys.
Start the isolated copy, run SQLite integrity checks, compare attachment/Send file checksums and verify dummy-account login/decryption/sync before a cutover decision. A checksum or /alive alone is insufficient. If reverting an upgrade, restore the complete pre-upgrade checkpoint to a new destination; a previous image may not understand a migrated database. Never run old and new writers against one directory.
On an SELinux recovery host, apply the new destination/container labels using that host policy after extraction. Do not assume the original container’s private label is suitable. Record service-specific fcontext rules and the earlier network boolean in the recovery/teardown plan.
LET’S BUILD
Diagnose without dumping credentials
For502, inspect the loopback health and container state, file modes and the locally protected error log. For403 on /admin, compare the real source address with 203.0.113.10/32 rather than allowing all. For cryptography failures, verify trusted HTTPS and DOMAIN. For login/sync failures, compare exact current client versions and release notes; do not downgrade against migrated data. Inspect logs locally and redact before sharing.
When ordinary file modes look correct, inspect SELinux labels and AVC records privately. Output may identify internal paths. Do not disable SELinux or turn every denial into an unrestricted allow policy.
Dedicated Vaultwarden VM
curl --fail --silent --show-error 'http://127.0.0.1:8159/alive'
sudo docker inspect --format '{{.State.Status}} {{.State.ExitCode}}' 'academy_vaultwarden'
sudo nginx -t
sudo stat -c '%a %u:%g %n' '/srv/academy-vaultwarden/data' '/srv/academy-vaultwarden/secrets/admin.phc'
sudo getenforce
sudo getsebool httpd_can_network_connect
sudo ls -Zd '/srv/academy-vaultwarden' '/srv/academy-vaultwarden/data' '/srv/academy-vaultwarden/secrets/admin.phc' '/srv/academy-vaultwarden/tls'
sudo ausearch -m AVC,USER_AVC -ts recent
Health/state/modes identify the failing boundary without a secret dump.
LET’S BUILD
Stop safely when acceptance fails
If HTTPS, enrollment or recovery is not accepted, stop the newly named service and keep its private data for investigation. Do not delete directories or reuse a real vault. A bad new proxy file can be removed from the include directory only after preserving it and confirming its exact ownership; use the existing Nginx rollback procedure, validate, then reload. Do not change unrelated sites.
Dedicated Vaultwarden VM
sudo docker stop --time 60 'academy_vaultwarden'
sudo docker inspect --format '{{.State.Status}}' 'academy_vaultwarden'
Only academy_vaultwarden is stopped; private state remains recoverable.
What the isolated checks establish
28 isolated checks passed in a task-owned Debian13 container using the official Vaultwarden1.37.4 image, bundled Web-Vault2026.7.0, Nginx1.26.3 and Python3.13. No host port was published. The exact directory and Argon2 Python bodies ran with fixture-only hidden-input/TTY shims. The published proxy retained its directives with private-CA TLS, loopback listeners, a fixture management source and a bounded1MiB body cap override. Real HTTP checks proved trusted/untrusted TLS, Host421, admin source denial including spoofed headers/case variants, valid/invalid admin passphrase, secure cookie, authenticated diagnostics, unauthenticated sync denial, closed registration and413.
A stopped archive was actually restored into a separate empty private destination. The real application SQLite/RSA files and synthetic database marker/attachment/Send files matched exactly; integrity_check passed, the restored service started and the original fixture admin passphrase still authenticated. Original storage stayed unchanged. This establishes storage/PHC restoration, not decryption or synchronization of an API-created user vault.
Docker Engine port publication/read-only root behavior, installation on each OS, real vault login/decryption/sync, SMTP/invitations, MFA/SSO/passkeys, browser/mobile/extension clients, authenticated WebSocket101 notifications, public ACME/renewal, off-host encryption/retrieval, systemd/reboot and HA were not executed. Initial fixture-only CA strictness and API-version/registration assumptions were corrected against actual responses before the final28 checks. No production account, service, credential, firewall or network was changed.
Finish operational acceptance before real vaults
Choose a backup owner and tested encrypted off-host retrieval, certificate-renewal acceptance, controlled invitations and user MFA/recovery. Rehearse patching with exact intended clients and a restored copy. Add bounded monitoring for health, certificate expiry, storage and backup age without collecting vault items. Use the related TLS and access-protection guides for their own explicit scope.
GO TO THE SOURCE
Official references
Each environment states how it was reviewed. A documentation review does not claim a hands-on test of every version.
- Project identity and client API scope
- Security release1.37.5 and compatibility notes
- Configuration, file secrets and precedence
- Admin Argon2, interpolation and sessions
- Closed signups and invitation exception
- Coordinated backup and restore
- Proxy and WebSocket examples
- Reviewed release configuration
- Nginx WebSocket proxy
- Docker loopback publishing caveat
- SQLite backup consistency
- Ubuntu support cycle
- Debian releases
- Docker Engine on RHEL
- Docker bind mounts and SELinux labels
- Docker daemon security options
- RHEL Nginx and reverse proxy
- EPEL Argon2 packages and branches
- AlmaLinux extra repositories
- Rocky supported releases
- AlmaLinux release status
- RHEL release dates
- Arch Nginx package
- Arch Argon2 package
- Manjaro system updates
- Nginx include context
- Python SHA256 streaming
KEEP LEARNING