hephaestus/docs/how-to/self-update.md
Erich Blume 443763489b
All checks were successful
Build / validate (pull_request) Successful in 6m10s
C2(hephd-self-update): finalize — single self-update how-to + changelog
Collapse the eight Mikado scaffolding cards (+ goal card) into one
user-facing how-to, docs/how-to/self-update.md: what self-update is and
how to enable it. The per-card breakdown was build-time scaffolding, not
documentation. Keeps the changelog fragment; updates the how-to index.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 15:00:37 -07:00

56 lines
1.8 KiB
Markdown

---
title: hephd self-update
modified: 2026-06-04
tags:
- how-to
---
# hephd self-update
`hephd` can keep itself current: it polls the forge for a newer release and, when
one appears, rebuilds and restarts onto it — unattended. It is **opt-in and off
by default**.
## Enable it
On the managed service:
```bash
heph daemon start --self-update
```
That generates a launchd/systemd service that runs `hephd --self-update` and
gives it a `PATH` that can find `cargo`. `heph daemon restart` preserves the
setting (pass `--self-update` again to turn it on later). To run the daemon
directly instead:
```bash
hephd --self-update # default: poll every 6h
hephd --self-update --self-update-interval-secs 3600
```
## How it works
1. Each interval, `hephd` GETs the forge's `releases/latest` and compares the tag
against its own version (the one `heph --version` reports).
2. On a newer release it runs `cargo install --locked --git <public-https-url>
--tag vX.Y.Z` for `heph`/`hephd`/`heph-tui`/`heph-quickadd`. hephaestus is a
public repo, so this is an anonymous clone — **no credentials**.
3. On a successful install it exits cleanly; the service manager (launchd
`KeepAlive` / systemd `Restart=always`) brings the new binary up.
A failed poll or build is logged and the daemon keeps running on its current
version — self-update never takes the daemon down.
## Requirements & notes
- The **Rust toolchain** (`cargo`) must be installed for the service user; the
update builds from source.
- Off by default — nothing happens unless `--self-update` is passed.
- The first real cross-version upgrade is observable on the first release cut
after enabling it.
## Related
- [[run-the-daemon]] — running `hephd` as an OS service
- [[install-heph]] — installing the binaries