Global install: root branch in install.sh for multi-user hosts #71

Closed
opened 2026-07-17 16:43:02 +00:00 by dan-claude-bot · 0 comments
dan-claude-bot commented 2026-07-17 16:43:02 +00:00 (Migrated from github.com)

Context

box installs strictly per-user today: install.sh puts the tree in $HOME/.local/share/box and the symlink in $HOME/.local/bin — there is no root branch. On multi-user hosts (the dev-server will have three operators, per the identity model in heavy-duty/rig#24 / heavy-duty/rig#25) every new operator must re-run the installer. box should install globally once, like rig already does.

What changes

  1. install.sh: mirror rig's install.sh root branch — when id -u is 0, default DEST to a system location (/opt/box or /usr/local/share/box — pick one in the plan) and BINDIR to /usr/local/bin; keep the per-user defaults otherwise. BOX_HOME/BOX_BIN overrides keep working.
  2. bin/box: verify the install-root resolution (symlink-relative) works from the system location for non-root callers — the tree must be world-readable, no writes into the tree at runtime.
  3. Docs (README + docs/box-design.md if it mentions install paths): global install is the fleet path (one install, users granted access via group membership); per-user stays the solo-host path.
  4. This unblocks the "rig installs box" option for host-class bootstrap roles (heavy-duty/rig#25 open question) — a root-run global install is exactly what rig can do. No rig changes in this issue.

Interplay

  • setup-host remains per-user in one respect (it adds $USER to an Incus group and requires re-login) — with rig#24 owning group membership on fleet hosts, setup-host's group step becomes the solo-host self-serve path. Document both owners so they don't drift.
  • Upgrade story: re-running the installer as root replaces the system tree atomically (same rm -rf $DEST && mv shape as today).

Non-goals

  • No packaging (deb/apk). No changes to per-user install behavior. No multi-user instance isolation (that is the companion projects issue, linked below).

Acceptance

  • As root: curl … install.sh | bash lands the tree in the system location, box on PATH for all users, tree owned by root and world-readable.
  • As a non-root user on the same host: box templates, box list, box new work against the global install (given group access).
  • Per-user install behavior byte-identical to today.

Companion projects issue: https://github.com/heavy-duty/box/issues/72

## Context box installs strictly per-user today: `install.sh` puts the tree in `$HOME/.local/share/box` and the symlink in `$HOME/.local/bin` — there is no root branch. On multi-user hosts (the dev-server will have three operators, per the identity model in heavy-duty/rig#24 / heavy-duty/rig#25) every new operator must re-run the installer. box should install globally once, like rig already does. ## What changes 1. `install.sh`: mirror rig's `install.sh` root branch — when `id -u` is 0, default `DEST` to a system location (`/opt/box` or `/usr/local/share/box` — pick one in the plan) and `BINDIR` to `/usr/local/bin`; keep the per-user defaults otherwise. `BOX_HOME`/`BOX_BIN` overrides keep working. 2. `bin/box`: verify the install-root resolution (symlink-relative) works from the system location for non-root callers — the tree must be world-readable, no writes into the tree at runtime. 3. Docs (README + `docs/box-design.md` if it mentions install paths): global install is the fleet path (one install, users granted access via group membership); per-user stays the solo-host path. 4. This unblocks the "rig installs box" option for host-class bootstrap roles (heavy-duty/rig#25 open question) — a root-run global install is exactly what rig can do. No rig changes in this issue. ## Interplay - `setup-host` remains per-user in one respect (it adds `$USER` to an Incus group and requires re-login) — with rig#24 owning group membership on fleet hosts, setup-host's group step becomes the solo-host self-serve path. Document both owners so they don't drift. - Upgrade story: re-running the installer as root replaces the system tree atomically (same `rm -rf $DEST && mv` shape as today). ## Non-goals - No packaging (deb/apk). No changes to per-user install behavior. No multi-user instance isolation (that is the companion projects issue, linked below). ## Acceptance - As root: `curl … install.sh | bash` lands the tree in the system location, `box` on PATH for all users, tree owned by root and world-readable. - As a non-root user on the same host: `box templates`, `box list`, `box new` work against the global install (given group access). - Per-user install behavior byte-identical to today. --- Companion projects issue: https://github.com/heavy-duty/box/issues/72
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#71
No description provided.