GREEN PACKAGE SKILL · ONCE · VAULTWARDEN · LITESTREAM
vaultwarden
Deploy Vaultwarden on a Basecamp ONCE server with Green and continuous Litestream replication to Cloudflare R2.
- Vaultwarden 1.35.4
- Litestream 0.5.16
- Automatic restore
- Closed signup
#Introduction
This Package Skill provisions one Basecamp ONCE server and deploys a pinned Vaultwarden image. It reuses ONCE for compute, DNS, SMTP, HTTPS, host convergence, and optional GitHub deployment credentials while adding Vaultwarden-specific validation and application configuration. The official public image requires no repository access.
build renders local files and create --dry-run walks the workflow without contacting providers. Review both before approving a real operation.#Quick start
npx skills add getcolors/vaultwarden
cp .agents/skills/package-vaultwarden-green/green ./green
./green build
./green create --dry-run
# after approval:
./green create#Runtime architecture
HTTPS request ─ ONCE proxy ─ Vaultwarden ─ /storage/db.sqlite3
│
└─ Litestream ─ Cloudflare R2
entrypoint ─ restore if absent ─ Hivemind ─ services + weekly restore checkThe public image ghcr.io/getcolors/vaultwarden:1.0.0 pins Vaultwarden 1.35.4, Litestream 0.5.16, and Hivemind 1.1.0. Startup restores SQLite before Vaultwarden when the local database is absent. The ONCE /up proxy exposes the health contract expected by the platform.
#Desired state
| Area | Important choices |
|---|---|
| Providers | Compute, DNS, SMTP, and local, S3, or R2 state backend |
| Application | Hostname, pinned image, initial owner email, and optional operator-owned repository |
| Access | Public signup disabled and steady-state admin endpoint disabled |
| Replication | R2 bucket, endpoint, prefix, retention, and snapshot interval |
| Verification | Systemd calendar for an isolated replica restore check |
| Safety | Unique profile and compute-prevent-destroy: true |
See the configuration reference for all keys, constraints, and credential mappings.
#Deployment lifecycle
The first create provisions the ONCE server, publishes DNS, configures SMTP and HTTPS, deploys the application, and sends an invitation to the configured owner. A temporary admin endpoint is available only over loopback during bootstrap and is removed before the deployment reaches steady state.
#Backup and recovery
Litestream continuously replicates /storage/db.sqlite3 to Cloudflare R2. A fresh container restores the newest replica automatically when its local database is absent. Every Sunday at 03:00 UTC by default, the image restores into a separate temporary file and runs SQLite integrity checking without replacing live data.
litestream restore -config /etc/vaultwarden/litestream.yml \
-o /tmp/vaultwarden-restore.db /storage/db.sqlite3
sqlite3 /tmp/vaultwarden-restore.db 'pragma integrity_check;'#Command reference
| Command | Effect |
|---|---|
./green build | Validate desired state and render all stages |
./green create --dry-run | Walk the deployment graph without side effects |
./green create | Provision, converge, deploy, and verify |
./green delete | Guarded destruction of deployment infrastructure |
#Credentials and safety
- Store credentials only in gitignored
.envrc.privateasCOLORS_PAR_*variables. - Never export
COLORS_PAR_PROFILE; the profile selects remote state. - Never edit or commit generated
.colors/output. - Keep
compute-prevent-destroy: truein committed desired state. - Omit
vaultwarden-repofor the official public image; never publish server access into a repository you do not control. - A real create or delete requires explicit authorization.
#Troubleshooting
The service does not start after replacing the container
Check R2 credentials and endpoint reachability, then inspect Litestream restore output before changing the local database.
The initial invitation does not arrive
Confirm the owner email and SMTP provider settings. Public signup remains intentionally unavailable.
The admin endpoint is unavailable
That is expected after convergence. It exists only on loopback during first-invitation bootstrap and is absent in steady state.