Skip to content

Remote OS update for RigForge-only appliances, started through the rig's own API (2.0.5 slice of #1837) #4143

Open
1 of 5 issues completed

Description

@pithead-developer

What's the problem

A RigForge-only appliance rig has no shell, so the only way to give it a new OS is to re-flash a USB stick by hand. #1837 covers remote update for these rigs and sits in v2.1.0. The owner has pulled one slice forward into v2.0.5: per-rig remote OS update, and nothing else.

The slice is built on the 2026-11-10 design, with these rulings (2026-11-15/16):

  • The endpoint lives on the rig, in the RigForge control API (Token-authenticated API to check for and perform an update, with scope, rate limit and single flight rigforge#684). The rig downloads its own signed bundle over its own on-demand Tor client. The coordinator never serves bundle files.
  • Rigs work independently of Pithead. The Pithead dashboard's per-rig "Update OS" button is one client of the API. A rig with no Pithead is updated by a documented API call from any LAN computer, using the rig's token. There is no new UI on the rig, and no timers or automatic checks.
  • Called by a Pithead, the coordinator's version is the ceiling. Called directly, the default is the latest release. Equal versions and downgrades are refused.
  • Rig egress is Tor only. The single exception is stratum to an external pool the owner configured, which may be clearnet. Updates, time sync and anything else go over Tor.

In scope: update check, update, status, and the per-rig dashboard button. Out of scope, staying in v2.1.0: rig identity (#4014), replace-stick (#4015), Update all and Remove rig (the other half of #4016), /release (p2pool-starter-stack/rigforge#681), rig logs, and install-to-disk removal (#4019).

Nothing for this exists on develop (2.0.x). The Tor client (#4040) and the hardened update channel (#4056) are merged only on develop-v2.1.0, and the rig updater (#4013, PR #4103) is a draft there. Branch strategy: cherry-pick or retarget them onto develop. Do not forward-merge develop-v2.1.0.

What it impacts

  • Owners of RigForge-only appliance rigs, who today must re-flash a stick for every OS update.
  • The 2.0.5 schedule: the RigForge release carrying the update API gates the rig part of it.
  • Rig owners' upgrade path. They stay on 2.0.3 and skip 2.0.4 (2.0.4 release notes: tell RigForge-only appliance owners to stay on 2.0.3 #4136). One manual USB hop to 2.0.5 gives a rig the endpoint, and after that updates are remote. A disk-installed rig uses Keep everything and stays adopted. A stick rig re-flashes, which means a new token and re-adopting it.
  • The coordinator's own OS update path, because the backport changes its helpers and needs a re-proof.

How I found it

Owner request on 2026-11-15/16, checked against develop and develop-v2.1.0 with git and gh. Findings: develop has no pithead-tor and no 47a channel helper. RigForge's control server on develop has only /apply and /upgrade and no update route. The dashboard upgrade path on develop rejects appliance rigs. p2pool-starter-stack/rigforge#684 has no PR and is blocked on #4013. The feed field (p2pool-starter-stack/rigforge#680) is in draft PR p2pool-starter-stack/rigforge#694 and is blocked by tier4-e2e connect failures on the CI side.

How important is it

Medium to high. It is the only remote way to patch shell-less rigs, and rigs on 2.0.3 cannot be patched remotely until one stick hop to 2.0.5 is done. It must not delay 2.0.4.

Acceptance criteria

This tracker closes when every item below is done. Link each child issue here when it is filed.

Ship-without-rigs fallback: if the RigForge release carrying the update API is not ready when the rest of 2.0.5 is, 2.0.5 ships for Pithead boxes only. The rig image is not changed, and rig owners stay on 2.0.3 until a later release delivers the endpoint.

Possible solutions

Recommended design: RigForge's control API gains POST /update-check, POST /update and GET /update/status on the existing token-gated port. On an appliance rig the unprivileged receiver only stages a request, and a root service runs pithead rig-update, which downloads the bundle over the on-demand Tor client, verifies it against the baked keyring, refuses equal, downgrade, over-ceiling and pending, installs to the spare slot and reboots. The boot gate commits the new slot only if the miner service is active, otherwise A/B falls back. The Pithead dashboard calls the same endpoint server-to-server, with its own version as the ceiling.

Rejected: a Pithead-owned second listener on the rig (duplicate auth, new firewall rule), and coordinator-served bundles (superseded by the owner on 2026-11-10).

Open points to settle in the child issues: the DIY (non-appliance) git /upgrade path fetches over clearnet unless a Tor proxy is set. Proposal: refuse the new /update on DIY rigs unless tor_socks5 is set, and leave the git path outside this slice, flagged for the egress audit. Also open: the signing and rootfs headroom re-measure for the rebuilt image. Not built yet: the Tor egress watchdog the owner asked for on 2026-11-10, so the KVM proof falls back to a packet capture.

Sub-issues

Sub-issues

1 of 5 Issues completed
Loading 5 sub-issues

Activity

  1. added this to the v2.0.5 milestone on Nov 16, 2026
  2. added
    enhancement
    appliance
    tracker
    operator-action
    on Nov 16, 2026
  3. pithead-developer commented on Nov 16, 2026

    @pithead-developer
    ContributorAuthor

    The Tor-only egress work for 2.0.5 is tracked in #4144. Its rig Tor client issue #4151 builds on the helper that #4139 backports: persistent state, running as debian-tor, a control socket, shared by updates and time. The rig update path here depends on it.

  4. removed
    operator-action
    on Nov 16, 2026
  5. pithead-developer commented on Nov 17, 2026

    @pithead-developer
    ContributorAuthor

    RigForge's update API (p2pool-starter-stack/rigforge#684) moved from v1.19.0 to v1.20.0 on 2026-11-17 so RigForge 1.19.0 can be released now. Where this issue expects RigForge v1.19.0 to contain rigforge#684, read v1.20.0. rigforge#680 is closed and ships in 1.19.0.

  6. pithead-architect commented on Nov 27, 2026

    @pithead-architect

    Owner decision (2026-11-27): this is a priority. The owner wants USB stick rigs that update remotely, so EPYC rigs can run from a stick and free their M.2 drives.

    Where it stands:

    One-hop limit: rigs on 2.0.3 or 2.0.4 have no update endpoint. Each stick rig is flashed once to 2.0.5 (new token, re-adopt). Updates are remote from then on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    applianceenhancementtracker

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions