By default the microsandbox agent is PID 1. That’s enough for one-shot processes, but anything that calls intoDocumentation Index
Fetch the complete documentation index at: https://docs.microsandbox.dev/llms.txt
Use this file to discover all available pages before exploring further.
systemctl, loginctl, or expects a session bus will fail.
--init auto hands PID 1 over to systemd. The rest of the guest then behaves like a normal Linux box.
Step 1: Boot
debian-systemd is one of the optional bases we maintain in guest-images for cases like this. --init auto probes a small set of well-known paths and picks the first that exists. See Custom init system for the full list and for pinning to an exact path.
Step 2: Confirm systemd is PID 1
Step 3: Manage units
systemctl works as it does on bare metal. Inspect a unit shipped with the image:
policy-rc.d deferral install but don’t auto-start. systemctl enable --now <unit> starts them in one step.
Notes
- Image choice matters. Distroless / minimal images (
python:3.13-slim,alpine) don’t ship a systemd init binary;--init autowill fail andkernel.logwill list every path it tried. Use a systemd-equipped base or layer one in. - Memory budget. systemd’s idle footprint is ~50 MiB; daemons add more. Bump
--memoryif your service is hungry. - Other inits work.
--initaccepts any absolute path. s6, OpenRC, runit, or a hand-rolled/sbin/initshell script are all fine;autojust covers the systemd-on-Debian/Ubuntu case.