4.2 KiB
Vaultwarden — upstream documentation (source of truth)
Use these when changing /opt/vaultwarden on us2. Prefer upstream over blog posts or Obsidian notes.
Primary references
Configuration precedence (official)
From Configuration overview:
- Compile-time defaults (
src/config.rs) - Vaultwarden
ENV_FILE/.envread by the process (if used) - Process environment variables (e.g. Docker Compose
env_file+environment) — override (2) data/config.jsonfrom/admin— highest precedence (overrides env)
Official stance: prefer environment variables; config.json is not the recommended long-term method. Once admin saves config.json, those keys stop being changeable via .env until removed/edited in admin or the file.
Settings we care about on us2
| Concern | Upstream guidance | Our notes (post-2026-08-01 migrate) |
|---|---|---|
| Public URL | Set DOMAIN e.g. https://auth.wsvc.info (no trailing slash) |
Set in compose + config.json |
| SMTP | 587+starttls or 465+force_tls |
Effective: 587/starttls to mx2 (465 unreachable from us2); extra_hosts pins A 194.163.160.244 |
| SMTP password | Same mailbox password as mailcow | Must match across .env, config.json, .smtp-credentials. Admin/config.json wins — stale admin password → SMTP 535 while .env still works |
| Database | DATABASE_URL for Postgres |
Live: Postgres via compose DATABASE_URL; sqlite cold under backups/sqlite-cold/ |
| Client IP behind proxy | Traefik → prefer X-Forwarded-For |
ip_header=X-Forwarded-For in config.json |
| Admin | Argon2 ADMIN_TOKEN |
On server only |
| Signups | Invite-only on public URL | signups_allowed=false |
Agent checklist before edits
- Read this page + us2 host facts.
- On the server, compare
.env, composeenvironment, and/data/config.json(including SMTP password fingerprint, not plaintext in chat/logs). - Change the layer that actually wins (often
config.json); if rotating the mailbox password, update all three secret stores. - After recreating the
vaultwardencontainer, restart Traefik ifauth.wsvc.info404s. - Do not commit secrets; do not copy passwords from Obsidian into this repo.
- Verify SMTP with AUTH (not TCP-only) — vaultwarden-health §5.
Operations path
Use ansible/playbooks/health-report.yml --limit vaultwarden for routine
status. After a reviewed effective-configuration change that needs a container
recreate, use the allowlisted compose-reconcile.yml target vaultwarden.
Add service_reconcile_restart_traefik=true only when the documented
post-recreate 404 occurs. Direct Compose commands remain diagnostic tools, not
the routine control path.
Replay migration steps: runbooks/vaultwarden-sqlite-to-postgres.md.