host/migrate-host.sh — re-home legacy boxes onto the new stack, then retire the old one #53

Closed
opened 2026-07-14 15:41:26 +00:00 by dan-claude-bot · 0 comments
dan-claude-bot commented 2026-07-14 15:41:26 +00:00 (Migrated from github.com)

The 0.4.0 transition (#52) is zero-ceremony by design: install + setup-host gives a dual-stack host where legacy boxes (tag user.claudebox=1, claudenet/10.87, claude-dev) keep working under every verb, and new mints land on boxnet/10.88. Cross-generation isolation holds — inter-bridge traffic is routed, so it traverses both generations' ACLs, and both drop 10.0.0.0/8.

Two things that path deliberately does not do, and that deserve a script instead of per-box hatch surgery:

1. Re-home a legacy box onto the new stack

The expensive thing in an old box is its authed state (Claude login, git creds — the whole log-in-once story). Re-homing preserves it without a re-login:

box down <b>
incus config set <b> user.box=1 user.box.template=claude user.box.user=claude
incus profile assign <b> box-net
box start <b>            # new lease on 10.88; verify DNS + egress after

Per-box, ordered, with the same assert-the-effect discipline as the drill (check the box actually resolves and reaches the internet on its new leg before declaring it moved). Also covers snapshots implicitly — --from clones of a re-homed box land on the new stack, closing the "clones of old boxes keep the old network alive" loop.

2. Retire the legacy stack when its last box is gone

Today the only tools that remove claudenet / claude-dev / claude-isolate / claudebox-firewall.{service,sbin} / the old nft tables are teardown-host.sh and drill/wipe.sh — both of which delete all boxes too. The migrate script's second half: refuse while any user.claudebox=1 box exists, then remove exactly the legacy artifacts and assert their absence (wipe.sh's verdict pattern).

Shape

host/migrate-host.sh [--box <name> | --all-boxes] [--retire-legacy], idempotent, one action per invocation, loud about what it did. The re-home steps are the risky half — a box mid-move must not end up tagless or profileless, so order matters: tag first (it is additive and reversible), profile last, verify before declaring.

Provenance: operator question after run 15 — "what should I do in a system that has been running old claudebox for a bit?" The dual-stack answer is fine; this issue is the difference between fine and done.

🤖 Generated with Claude Code

The 0.4.0 transition (#52) is zero-ceremony by design: install + setup-host gives a dual-stack host where legacy boxes (tag `user.claudebox=1`, claudenet/10.87, claude-dev) keep working under every verb, and new mints land on boxnet/10.88. Cross-generation isolation holds — inter-bridge traffic is routed, so it traverses both generations' ACLs, and both drop 10.0.0.0/8. Two things that path deliberately does not do, and that deserve a script instead of per-box hatch surgery: ## 1. Re-home a legacy box onto the new stack The expensive thing in an old box is its **authed state** (Claude login, git creds — the whole log-in-once story). Re-homing preserves it without a re-login: ``` box down <b> incus config set <b> user.box=1 user.box.template=claude user.box.user=claude incus profile assign <b> box-net box start <b> # new lease on 10.88; verify DNS + egress after ``` Per-box, ordered, with the same assert-the-effect discipline as the drill (check the box actually resolves and reaches the internet on its new leg before declaring it moved). Also covers snapshots implicitly — `--from` clones of a re-homed box land on the new stack, closing the "clones of old boxes keep the old network alive" loop. ## 2. Retire the legacy stack when its last box is gone Today the only tools that remove claudenet / claude-dev / claude-isolate / claudebox-firewall.{service,sbin} / the old nft tables are teardown-host.sh and drill/wipe.sh — **both of which delete all boxes too**. The migrate script's second half: refuse while any `user.claudebox=1` box exists, then remove exactly the legacy artifacts and assert their absence (wipe.sh's verdict pattern). ## Shape `host/migrate-host.sh [--box <name> | --all-boxes] [--retire-legacy]`, idempotent, one action per invocation, loud about what it did. The re-home steps are the risky half — a box mid-move must not end up tagless or profileless, so order matters: tag first (it is additive and reversible), profile last, verify before declaring. Provenance: operator question after run 15 — "what should I do in a system that has been running old claudebox for a bit?" The dual-stack answer is fine; this issue is the difference between *fine* and *done*. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: heavy-duty/box#53
No description provided.