TachEmail r90
Docs / Operate / Upgrade and roll back

Upgrade and roll back

Move to a newer signed package, return to the previous package, and keep the VM maintained.

Built from commit f569b4a on Nov 14, 2026

This page is generated from the maintained install guide, GUIDE.md, at source commit fa247a8. Keep the signed guide that came with your installed release.

Upgrade and roll back

Download and verify the newer package as in Download and verify, from ~/tach (not from inside the old package directory), into its own tach-package-VERSION directory with the new VERSION. Leave the previous directory in place. Then:

sudo tach upgrade /ABSOLUTE/PATH/TO/NEW/tach-package-VERSION
sudo tach status

Upgrade verifies the image, manifest and host tool with the installed release key, checks that the new image runs the backup cycle on a throwaway database, and completes a verified backup in the current image before stopping anything. A new package with the same image still installs its host-tool fixes. The candidate tool generates the units, runtime settings and Caddy configuration; activation requires the exact image revision and local HTTPS health. The installed trust key, first-administrator keys and data directory never change.

If activation fails, every program/config artifact (including copied TLS files) is restored on the current database, keeping newly acknowledged usage. There is no database rewind or reverse migration. If the previous image cannot read the current schema, Tach stays stopped with data preserved: obtain a fixed compatible package, verify it, then run sudo tach upgrade NEW_PACKAGE --fix-forward. Never delete the database, restore an older backup over it, or edit schema versions. The pre-switch backup is recovery evidence, not an automatic rollback source.

If the process is killed or the VM reboots during activation, run sudo tach status once the host is back. Before reporting health, the maintenance command completes the durable undo journal in /etc/tach/activation.json; schema incompatibility still stops safely and names fix-forward. Keep /opt/tach/generations and /opt/tach/packages: they contain private rollback artifacts, not ledger copies. Do not start another installer or manually restart the service during recovery. Across the legacy-tool boundary described below, invoke the verified new tool directly for recovery: sudo python3 -I NEW_PACKAGE/tach.py status.

To return to the previous complete package:

sudo tach rollback
sudo tach status

Rollback takes a fresh backup and checks the previous image’s backup-cycle support first. It restores that package’s host tool, units and generated settings on the current ledger. A subsequent rollback returns to the package just left. Neither command installs anything automatically. When the previous image needs an older tracked schema, rollback uses the current image’s exact schema-down reverses after backup and stop, and requires a verified target with zero discarded clocks. Lossy or undefined reverses are refused with all current data preserved and fix-forward guidance; no discard flag is supplied. Ambiguous reverse output leaves serving stopped for verification. To deliberately refresh the same signed package and checkpoint the current healthy program/config generation, use sudo tach upgrade PACKAGE --reapply. This explicit action replaces the previous rollback slot with the generation being reapplied; ordinary identical package retries remain no-ops.

One-time migration from an older image-only host tool: follow that installed release’s upgrade instructions, remove the retired backup.directory setting if present, then rerun the new signed package’s install command with the same source configuration (/root/tach-config.toml) and installed trusted key. Do not edit the installed /etc/tach/config.toml for this bootstrap: the installer needs its original values to preserve the old package’s rollback artifacts. This installs the new host tool and remembers the old host artifacts for rollback. If you roll back across this boundary, the old host tool returns too. To upgrade again, invoke the verified new tool directly: sudo python3 -I NEW_PACKAGE/tach.py upgrade NEW_PACKAGE, then sudo tach status. Normal whole-package releases need no installer rerun.

Pending updates (no automatic install)

sudo tach status reports updates.installed, the signed channel’s eligible release, update_pending, generated_at, last_success and check. The administrator Health page and its JSON (readiness.updates in /v1/health) read the same host-verified evidence. A pending notice links the release’s proof record. Download and verify the package from the download page, then run sudo tach upgrade EXTRACTED_BUNDLE_DIRECTORY. The signed latest-qualified pointer selects the latest release that passed the release checks, independently of any tenant deployment. Nothing installs automatically.

The host’s tach-update-check.timer checks hourly (with up to five minutes of jitter); status also requests a bounded check outside the maintenance lock. The server only reads /run/tach-release/status.json, mounted read-only from the host. It makes no update request during a Health, ingest, query or backup. Metadata requests are anonymous, size-bounded and time-bounded HTTPS to tach-site.pages.dev/tools/tach/releases/. The checker fetches latest.json once, hashes its exact bytes, then fetches channels/SHA256_OF_POINTER/latest.json.minisig from the same origin. This immutable signature matches the fetched pointer even during publication. The checker verifies the signature against the installed /etc/tach/release.pub before trusting the document. Only site package, checksum and proof URLs are accepted. There is no GitHub metadata or package fallback. A tampered pointer is unavailable, never available. Network failure never means up to date. The JSON records the last successful check even after failure. Metadata signed more than 14 days ago is marked stale: it remains the last authenticated offered release, not an up-to-date check or signature expiry. A checker that has not succeeded for two hours is also unavailable.

The optional configuration (defaults shown) is:

[updates]
enabled = true
notify_email = ""

Set enabled = false to disable all outbound update checks and update notices, without stopping serving, ingestion or backups. To apply changes, edit your source /root/tach-config.toml, validate it and rerun the same signed package’s install command. No alert recipient is enabled by default.

Set notify_email to one operator alert address to use your existing [smtp] relay. The hook sends one actionable email per newly pending package and one per continuous check-failure episode; a successful check clears failure suppression. It sends only release/check metadata, never usage or credentials. The notification field reports sent, failed or uncertain. Intent is saved before SMTP so a crash after an ambiguous delivery does not send duplicates. After fixing the relay, explicitly run sudo tach check-updates --retry-notification to retry a failed/uncertain notice. sent means the configured relay accepted it, not proof of a recipient’s Inbox placement. The SAME address/relay also carries operational notices below; there is no second notification transport.

Keep /etc/tach/update-check.json with your private host configuration custody: it records the greatest authenticated sequence/digest and notification intent. Program rollback never rewinds it. If it is unreadable, the checker refuses to reset it and reports state_unreadable; preserve it and contact support rather than deleting it. A separate notice-intent file prevents repeated corruption alerts without replacing the release authority. A first observation on a new host cannot detect an older still-authentic pointer beyond the age warning; HTTPS plus persisted sequence protects subsequent checks, not instant revocation.

Already-authenticated GitHub-era latest metadata remains readable only from the private host cache. Its sequence and exact-byte digest still protect against a lower sequence or changed document at the same sequence. Historical cached metadata never exposes or fetches old package URLs. legacy_metadata_only means the private cache cannot offer a site package. Availability remains unavailable until a newer site release is authenticated. An older tach.stable.v1 cache enters the latest namespace once, then retains the same replay protection.

After installing

Reboot the VM during your maintenance window, then repeat the status, HTTPS, sign-in and receipt checks. Your IT team owns Ubuntu, Docker and Caddy security updates, and monitoring of disk space, backup age, certificates and mail.

Enter to openEsc to close