How Ed25519-signed self-updates with 60s auto-rollback work inside one binary
Self-updating a production CMS shouldn’t leave operators SSHing in at 3 a.m. A walkthrough of signature verification, pre-update migration guards, and readiness rollbacks.
1. Verify trust before writing a single byte
When HydroGo checks its update manifest, it verifies an Ed25519 cryptographic signature embedded in the release manifest against the binary’s pinned public key — then verifies the SHA-256 checksum of the platform binary before touching disk.
No unsigned tarballs, no mutable "latest" script pulls, and strict upgrade path checks via min_upgrade_from.
2. Pre-update backup & child migration check
Before restarting the server process, HydroGo swaps the binary atomically (preserving the prior binary as .prev), takes a pre-update SQLite snapshot when applicable, and executes the new binary’s migrate subcommand while forwarding --config without duplicating secret DSN sources.
If migrations exit non-zero for any reason, HydroGo immediately restores the .prev binary and returns a safe error instead of restarting into a half-migrated state.
{
"channel": "minor",
"window_start_hour": 3,
"window_end_hour": 5
} 3. The 60-second readiness watchdog after restart
Once a pending_update.json marker is written and the server re-execs itself via syscall.Exec, a startup watchdog polls internal readiness checks for 60 seconds.
Two consecutive healthy probes clear the marker and record last_outcome: "applied". If the new version fails to listen or stays unready past the deadline, the watchdog automatically rolls back to .prev and restarts cleanly.
Try HydroGo locally
curl -fsSL https://github.com/hydrohq/hydrogo/releases/latest/download/install.sh | sh && export PATH="$HOME/.local/bin:$PATH" && hydro serveDownloads one static Go binary and boots SQLite WAL, embedded Svelte 5 Studio, REST API, and browser setup wizard.