Skip to main content

nsbx doctor

Read-only. Reports what it found rather than a verdict alone, and exits 0 when the host can run a sandbox, 1 when it cannot — so it works as a deployment gate.

What it checks, and why each one is here

--deep

Everything above is configuration read back to you. Configuration can be right and the kernel can still ignore it, and a memory limit that is accepted and dropped looks exactly like one that holds — until you read memory.max from inside a running sandbox. --deep creates a real 64 MiB sandbox, reads its cgroup, removes it, and tells you which it was:
Without --deep, this check runs only if the probe image is already cached, so a cold doctor stays fast and says plainly that it did not verify:
A figure equal to the host’s total memory is the tell. Treat it as a failure, not a warning — nothing will error, and every sandbox on that host is unbounded.

nsbx setup

Applies what doctor found. It asks before each command, prints the command, and says whether it needs root:
y runs it, anything else skips it, q stops. The default is no. This installs system packages and changes systemd units on a machine nativesandbox does not own, so it does not do that quietly. It is not one confirmation for the whole batch either: someone happy to enable lingering is not necessarily happy to let a package manager run. Without a terminal and without --yes, setup refuses rather than assuming consent.

What it knows how to fix

Install Podman (apt, dnf, pacman, apk or zypper, detected from /etc/os-release), enable the user socket, turn on lingering, delegate cgroup controllers, add a subuid range, and enable user namespaces.
There is deliberately no postinstall hook. A package that reconfigures your host when you npm install it is a package you cannot audit before it runs — and many CI setups pass --ignore-scripts anyway, so it would be unreliable as well as rude.