Upgrades¶
What this is¶
How to move a running compose install to a newer git tag or main, pull the published image, and let Alembic migrate the database.
Why a checklist¶
Upgrades change code and schema. A self-backup + unchanged master key is the difference between a smooth pull and an unrecoverable encrypted store.
Prefer tags
Prefer tagged production releases (v1.4.0 / later 1.4.x). Treat untagged main as moving. See Home · RELEASE_v1.4.0.md.
# Config DR first
# Settings → PiHerder backup → run now
# Also snapshot Postgres volume if you can
git fetch --tags
git checkout v1.4.0 # or later 1.4.x
docker compose pull
docker compose up -d
# Alembic runs on web startup
# optional pin: PIHERDER_IMAGE=bjorngluck/piherder:1.4.0 docker compose up -d
Checklist¶
- Self-backup successful (admin — Settings → PiHerder backup)
-
PIHERDER_MASTER_KEYunchanged and backed up offline - Read RELEASE notes for the version you jump to
-
docker compose pshealthy (imagebjorngluck/piherder:…) - Smoke: login, Users recovery (if multi-user), one server, maps/ports, optional template
- Hard-refresh browser once after UI/CSS deploys (query-busted stylesheets)
1.1 → 1.2¶
Jump from v1.1.x to v1.2.0. Full notes: RELEASE_v1.2.0.md.
- Take a 1.1 self-backup (config pack) and keep it offline with
PIHERDER_MASTER_KEY. - Read the release notes. Pre-1.2 “full” archives are not a Postgres dump.
- Confirm
.envhas a long randomSECRET_KEY. The 1.2 web process will not boot on the compose default (change-me-in-prod) unless you setPIHERDER_ALLOW_INSECURE=true(lab only). git fetch --tags && git checkout v1.2.0(or pull the1.2.0image).docker compose pull && docker compose up -d— Alembic runs on web start (includes039_ssh_hostkey_pin).- Immediately run Settings → PiHerder backup → Full DR once and copy the archive off-box. Set the schedule to Full.
- Test connection once per host — first success pins the SSH host key. Later key changes are refused until you reset the pin under SSH access (rebuilds). Existing
ssh_usernamevalues are not rewritten (new hosts default topi). - Hard-refresh the browser (compiled Tailwind CSS; no Play CDN).
- New / changed env (Compose has defaults):
PIHERDER_SSH_CONSOLE— web SSH, default offPIHERDER_CSP— default on; nounsafe-eval(compiled CSS)PIHERDER_TRUSTED_PROXY_CIDRS— Compose trusts RFC1918 + loopback so Caddy can pass visitor IPsPIHERDER_ALLOW_INSECURE— leave false on a real fleet- Web port is
127.0.0.1:8000only (not published on the LAN) - Set
PIHERDER_PUBLIC_URLif you use email password reset or SSO (reset links and OIDC redirects are built from it only). - Smoke: login, one host, one job, optional console (if you enabled it).
SSO / passkeys / demo mode are new optional surfaces — they do not turn on by themselves.
1.2 → 1.3¶
Jump from v1.2.x to v1.3.0. Full notes: RELEASE_v1.3.0.md.
Settings policy is JSON in appsetting. Alembic 040_ssh_identities (fleet + optional privileged SSH keys per host). Alembic 041_console_transcripts (opt-in encrypted command audit; default off).
- Self-backup first (Full DR). Keep
PIHERDER_MASTER_KEY. git fetch --tags && git checkout v1.3.0(or pullbjorngluck/piherder:1.3.0).docker compose pull && docker compose up -d— Alembic runs on web start.- Compose change: bundled compose no longer injects defaulted
PIHERDER_SSH_CONSOLE_*knobs (idle, max, bind, …). Only the master enablePIHERDER_SSH_CONSOLEstays in compose. Timeouts live in Settings → Console. 2FA / grant live in Settings → Security. - If you previously relied on those vars in
.envand compose interpolation, they will not reach the container until you add that one line to composeenvironment(env then locks the knob). Otherwise Settings apply. - Smoke: Settings → Security (password / 2FA) · Settings → Console (including who may open privileged) · one host SSH access (fleet identity still there; optional privileged card) · optional live shell if the flag is on.
- Alembic
040_ssh_identitiescopies each host’s existing username + key into a fleet identity.Server.ssh_usernameis unchanged. Jobs keep using fleet. - Alembic
041_console_transcriptsis empty until you turn on Settings → Console → Command audit. Default remains off. - Host Files is off until you set
PIHERDER_HOST_FILES=trueand restart web. Transfer cap is Settings → Files (default 512 MiB, ceiling 32 GiB) unless you lockPIHERDER_HOST_FILES_MAX_BYTES. Host Files. - Reports is on at
/reports(no flag) — Reports. - Immediately run Settings → PiHerder backup → Full DR once and copy the archive off-box. Hard-refresh the browser.
1.3 → 1.4¶
Jump from v1.3.x to v1.4.0. Notes: RELEASE_v1.4.0.md.
Alembic 042_compose_project_meta (per-project host lock). Move a service stays off until PIHERDER_SERVICE_MIGRATE=true and you recreate web.
- Self-backup first (Full DR). Keep
PIHERDER_MASTER_KEY. - After tag:
git fetch --tags && git checkout v1.4.0(or pullbjorngluck/piherder:1.4.0). docker compose pull && docker compose up -d— Alembic runs on web start.- Optional: enable Move, recreate web, walk Move a service on a disposable stack.
- Smoke: lock a hardware-bound project · 1.3 Settings / Reports / Files / console.
- Immediately run Full DR again. Hard-refresh the browser.
Breaking notes¶
Read the release doc for the version you jump to (migrations, new env keys, behaviour changes).