You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(panel): add per-bot image updates and panel self-update
- Add strict image pulls (`require_fresh_image`) for panel self-update so GHCR outages cannot arm a swap onto stale cached tags
- Add `local_image_digests` to compare running containers against registry digests without pulling on every status poll
- Add `schedule_image_swap` to arm panel self-update by creating a replacement container and spawning a short-lived Docker CLI helper to finish the swap after the panel process exits
- Resolve docker socket paths through container mounts in the helper bind so custom socket paths (not just `/var/run/docker.sock`) work correctly
- Add Update button for eligible bots that pulls `STITCH_PANEL_BOT_IMAGE` (resolving pinned sha-* tags to `:latest`) and recreates that bot only, preserving config and keys
- Restrict Update to bots on the configured image channel and migrated to per-bot directory layout (flat layout would lose the in-container nonce ledger on recreate)
- Add `switch_corridor` to replace stitch.toml with a new corridor preset while keeping the signer, stopping the bot so tokens can be re-approved
- Add `/api/updates` endpoint that checks registry digests (cached ~15 minutes) for newer bot and panel images, with `?refresh=1` to force recheck
- Expand `SettingsForm` desktop field set to corridor, signer, spreads, taker, endpoints and simplify mobile form
- Add Update panel button in header and per-bot Update / Recreate buttons on bot detail pages
- Expand `install-panel.md` with image update workflow, self-update behavior, and hardening notes on pinning and ACLs
| Dry run | same, with `--dry-run` | Dry run button |
333
333
| Logs | `docker compose logs -f bot1` | live tail with level colouring |
334
-
| Upgrade a bot | edit the image tag, `up -d` | Recreate, on the panel's configured image |
334
+
| Upgrade a bot | edit the image tag, `up -d` | **Update** when a newer digest is available (pulls `STITCH_PANEL_BOT_IMAGE` and recreates that bot). **Recreate** still rebuilds on the configured image for recovery. |
335
+
| Upgrade the panel | `docker compose pull && up -d` | **Update panel** in the header when a newer `textile-stitch-panel` digest is published |
335
336
336
337
**Approve needs the operator wallet to itself.** It runs in a throwaway container
337
338
with its own copy of the key, and it broadcasts. So does a bot's taker or closer
@@ -497,14 +498,35 @@ Check you're browsing the `ts.net` URL rather than an IP, that your device isn't
497
498
tagged, and that your login is spelled exactly as it appears in the Tailscale
498
499
console.
499
500
501
+
## Image updates
502
+
503
+
The panel checks the registry (GHCR) for newer digests of the configured bot
504
+
image and of its own panel image. Results are cached for about 15 minutes; pass
505
+
`?refresh=1`on `/api/updates` (or use the UI after an update) to force a recheck.
506
+
507
+
- **Per-bot Update** pulls `STITCH_PANEL_BOT_IMAGE` and recreates that bot only.
508
+
Config and key stay on disk. Expect a brief gap in quoting. If the bot still
509
+
uses the flat layout, migrate first so the nonce ledger isn't lost on recreate.
510
+
- **Recreate** is the same Docker action without the "you're behind" nudge — use
511
+
it for recovery (missing container, stuck state).
512
+
- **Update panel** pulls a newer `textile-stitch-panel` image (pinned `sha-*`
513
+
tags resolve to `:latest` of the same repo) and schedules a self-recreate via a
514
+
short-lived helper on the Docker socket. The UI disconnects briefly; bots keep
515
+
running. Local-only images (`stitch-panel` with no registry path) can't
516
+
self-update — rebuild or set `PANEL_IMAGE` to the published GHCR image.
517
+
518
+
Offline or private registries that reject anonymous pulls soft-fail: the UI
519
+
simply doesn't show an update, rather than erroring the fleet page.
520
+
500
521
## Hardening, once it works
501
522
502
523
- **Tag the panel node.** Define a tag in your tailnet policy file, then set
503
524
`TS_EXTRA_ARGS=--advertise-tags=tag:stitch-panel`in `.env` and recreate the
504
525
sidecar. Tagged nodes don't expire keys, and ACLs can restrict who reaches the
505
526
panel at the network level as well as at the allowlist.
506
527
- **Pin the bot image.** `STITCH_PANEL_BOT_IMAGE` to a `sha-*` tag, so a restart
507
-
can't change the bot binary under you.
528
+
can't change the bot binary under you. The Update button still offers a move to
529
+
a newer publish when one appears.
508
530
- **Restrict at the ACL level too.** The allowlist is the panel's own check;
509
531
a tailnet ACL means an unlisted device can't even open a connection.
510
532
- **Don't use Funnel.** It strips identity headers and publishes the panel to the
0 commit comments