Skip to content

Docs: updating a RigForge-only appliance in 2.0.5 #4142

Open

Description

@pithead-developer

What's the problem

2.0.5 adds remote OS update for RigForge-only appliances (per-rig update only, served by the RigForge control API, p2pool-starter-stack/rigforge#684). The docs do not describe it, and they still tell rig owners that network updates are only "planned (#1837)". Rig owners need one clear path to follow, including owners who run a rig with no Pithead at all.

Three pages are affected:

The text below is the content to write. It is only accurate once the RigForge release carrying the update API ships. If that release is not ready when the rest of 2.0.5 is, 2.0.5 ships for Pithead boxes only, rig owners stay on 2.0.3, and this issue's rig text is held back.

1. One manual hop, then remote. Rig owners stay on 2.0.3 and skip 2.0.4 (#4136). A rig on 2.0.3 has no update endpoint, so it needs one manual USB hop straight to 2.0.5. After that, updates are remote.

  • Disk-installed rig: boot the 2.0.5 stick and choose Keep everything. The rig keeps its role, rig.json and token, and stays adopted.
  • Stick rig: re-flash the stick with 2.0.5. Re-flashing replaces the whole stick, so the rig gets a new token and must be adopted again.

2. Updating from the Pithead dashboard. The Workers page shows Update OS for an adopted appliance rig whose OS is older than the coordinator's. The dashboard asks the rig to update itself. One rig at a time; the rig reboots and is offline for a few minutes, which is expected. There is no Update all in 2.0.5.

3. Updating a rig that has no Pithead. The dashboard button is only one client of the rig's API. A rig with no Pithead is updated by a call from any computer on the LAN, using the rig's token. The rig has no UI for this, no timer and no automatic check. Document method, path, token header and an example with placeholders. The paths and body below come from the p2pool-starter-stack/rigforge#684 spec; the implementer must confirm them against the shipped API before the docs merge. The control port and Bearer header match the current control server.

# check only: reads the release channel, installs nothing
curl -X POST -H "Authorization: Bearer <RIG_TOKEN>" http://<RIG_ADDRESS>:8082/update-check

# update to the latest release
curl -X POST -H "Authorization: Bearer <RIG_TOKEN>" http://<RIG_ADDRESS>:8082/update

# update to a named release
curl -X POST -H "Authorization: Bearer <RIG_TOKEN>" -H "Content-Type: application/json" \
  -d '{"tag":"<vX.Y.Z>"}' http://<RIG_ADDRESS>:8082/update

# progress and verdict, also after the reboot
curl -H "Authorization: Bearer <RIG_TOKEN>" http://<RIG_ADDRESS>:8082/update/status

<RIG_TOKEN> is the rig's control token (the master ACCESS_TOKEN). A derived read token is always refused. A named consumer token is refused unless the owner granted it the update scope. The caller must be inside the rig's api_allow_from range.

4. The version ceiling.

  • Called by a Pithead, the coordinator's own version is the ceiling: a rig never runs ahead of its coordinator.
  • Called directly, the default is the latest release.
  • Equal versions and downgrades are refused in both cases.

5. Refusals and status. Document the response codes: 202 when an update starts (the connection then drops at reboot), 401 for a missing, wrong or derived read token, 403 for a named token without the update scope, 409 when an update is already running, 429 when rate limited. Document the status verdicts: updated, rolled back (the new slot did not bring the miner up, so the rig returned to the old slot), and refused, with the refusal reasons (equal, downgrade, over the ceiling, no space, bad signature). Status must never show tokens, paths or hostnames.

6. What the rig contacts, and how. The rig downloads its own signed bundle from the release host, only over its own on-demand Tor client. Tor starts for the request and stops after it. The coordinator never serves bundle files. With no call, the rig makes no update-related request and runs no timer. Steady-state traffic is its pool, and its coordinator when paired. Say plainly that the rig's outbound traffic is Tor only, with one exception: stratum to an external pool the owner configured, which may be clearnet. A separate egress audit (pending sibling) will cover time sync, DNS and anything else; this issue does not design it.

This issue partly covers #4020, which stays in v2.1.0 for the rest: rig identity, replace-stick, Update all, Remove rig, /release, rig logs and install-to-disk removal.

What it impacts

Rig owners who update an appliance rig, and anyone running a rig without Pithead. Without the docs the update API is undiscoverable, and owners may re-flash a rig that could have been updated remotely, or lose the token and adoption by picking the wrong path at the USB hop.

How I found it

Reading docs/appliance.md "Updating a rig" on develop: it says network delivery is "planned (#1837)". docs/dev/rig-os-update.md on develop-v2.1.0 says the coordinator's rig-control actions (#4016) call the rig's API with the coordinator's version as ceiling, and does not cover a direct call from a LAN computer. In 2.0.5 the coordinator client is the dashboard Update OS button, not #4016. The RigForge docs/pithead-integration.md has no update route. Owner rulings of 2026-11-15 and 2026-11-16 fix the scope.

How important is it

High for 2.0.5. The update feature is not usable by rig owners, or by owners with no Pithead, without it. It must merge with, or before, the code it describes.

Acceptance criteria

  • docs/appliance.md "Updating a rig" describes the single USB hop from 2.0.3 to 2.0.5: Keep everything for disk installs (stays adopted), re-flash plus re-adopt with a new token for stick rigs. It states that rig owners skip 2.0.4.
  • The same section describes the dashboard Update OS button and says it updates one rig at a time, with no Update all.
  • The same section documents the Pithead-free path: method, path, token header, an example with placeholders for address and token, and who may call it (control token only; read token refused).
  • The docs state the ceiling rule (coordinator version when called by a Pithead, latest when called directly) and that equal versions and downgrades are refused.
  • The docs list the response codes 202, 401, 403, 409 and 429, the status verdicts (updated, rolled back, refused) and the refusal reasons, and match the shipped API.
  • The docs say the rig contacts only the release host, only over its own on-demand Tor client, with no timers and no automatic checks, and that the coordinator never serves bundle files. They state the Tor-only egress rule and its one stratum-to-external-pool exception, and name the egress audit as pending.
  • docs/dev/rig-os-update.md matches: it covers a direct call, the dashboard as one client, and the 2.0.5 scope (update only).
  • RigForge docs/pithead-integration.md and the API docs carry a cross-repo note (p2pool-starter-stack/pithead#N form) and document the update routes and the token scope.
  • Examples contain placeholders only: no real host names beyond the product's documented default, no IP addresses and no tokens.
  • The old "planned (Appliance rigs have no remote OS-update path: the A/B install is proven on a rig, but nothing delivers a bundle to a shell-less rig (worker upgrade is RigForge's git path, no rig-side release check, run-from-USB slot layout unmeasured) #1837)" wording is gone from docs/appliance.md.

Possible solutions

  • Write the pithead pages in this issue's PR and the RigForge pages in a linked RigForge PR, and merge both with or after the code PRs so the docs match the shipped routes.
  • Put the full API reference in RigForge's docs and link to it from docs/appliance.md, so the contract has one home.
  • Hold the rig text, and the 2.0.5 rig claims, if the RigForge release is not ready; keep a short note that rig owners stay on 2.0.3.

Activity

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

    @pithead-developer
    ContributorAuthor

    Blocked on #4139.
    Blocked on p2pool-starter-stack/rigforge#684.

    The docs need the contract page that comes with the #4139 backport, and their text is only accurate once the RigForge update API (rigforge#684) ships.

  5. removed
    operator-action
    on Nov 16, 2026
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

    applianceblockeddocumentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions