feat(fw): auto-update invidious-companion and harden its env file #90
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!90
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/89"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
invidious-companion's:latestimage had frozen at a ~3-month-old build —--pull=neweronly re-pulls on container (re)creation, which nothing evertriggered — breaking PO-token validation and playback. And its env file
(
PORT/HOST/SERVER_SECRET_KEY) was written once at boot by aRemainAfterExitoneshot, so when/run/invidious-companionwas cleaned thecontainer couldn't restart without manual recreation. This makes the runtime
fix permanent and removes both failure modes.
1. Auto-update the companion image
labels."io.containers.autoupdate" = "registry"on the container.podman-auto-update.timer(
systemd.timers.podman-auto-update.wantedBy = [ "timers.target" ]) — NixOS25.11 has no
virtualisation.podman.autoUpdateoption.podman auto-updateruns daily, pulls a newer
:latest, restarts the unit, and rolls back bydefault.
podman.sdnotify = "healthy"so rollback covers a functionally-brokenimage, not just a launch failure. Verified the image ships its own
HEALTHCHECK (
/thc→:8282/healthz) — no health endpoint invented.--pull=newer.2. Harden env-file generation (regenerate on every start)
RemainAfterExit=trueoninvidious-companion-env-generate; thecompanion's existing
Requires=/After=re-triggers the now-transientoneshot on every (re)start, including auto-update restarts.
/run/invidious-companionwithRuntimeDirectory+RuntimeDirectoryMode=0700+RuntimeDirectoryPreserve=yesand removed the/runtmpfiles rule, so a/runwipe can no longer leave the containerwithout its env file.
3. Invidious update strategy — decision (ADR-0013)
Invidious itself stays the native
services.invidiousmodule, tracked viachannel bumps. Containerising it (
quay.io/invidious/invidious:latest) isrejected — it would mean reimplementing the DB / nginx / TLS / http3-ytproxy /
admin-init wiring the module does today, plus a Postgres data migration.
Recorded in
docs/adr/0013-invidious-stays-native.md.Verification
fwhost dry-build passes (the pre-commit gate). ✅/run-wipe + restart with nomanual env recreation, and the timer pulls a newer digest over time — is
HITL on the web microVM, which agents can't SSH into (#88).
Closes #89