Host on a server with root
Install Hermitbox on this Linux systemd server with the server preset, which runs as root.
One command as root turns a Linux systemd server into a Hermitbox host with the tiers an ordinary user can’t have: containers, gVisor, virtual machines and a separate user for each process sandbox. Give it a domain and it serves the API over HTTPS with a certificate it renews itself.
curl -fsSL https://hbx.sh | sudo HERMITBOX_DOMAIN=sandboxes.example.com shThis is the server preset.
Before you install
Point a DNS A record for the domain at the server, and allow inbound TCP 443 for HTTPS and certificate validation. The edge needs local TCP ports 80 and 443 for its HTTP and TLS fronts.
Omit HERMITBOX_DOMAIN to install a local server on loopback port 7331, with path aliases. To
print the plan without changing anything, run
sudo hermitbox up --check --domain sandboxes.example.com on an installed CLI.
Verify the install
The installer prints the API URL, the key and a first command, and saves the URL and key for the
account that ran sudo. Run the command it prints:
hermitbox run --image alpine:3.22 -- echo helloIt prints hello. Then list what this host serves:
hermitbox doctorhermitbox doctor shows each tier as on or off, with the reason and what would change it.
What root turns on
| Capability | What the server preset adds |
|---|---|
| Containers from images | Docker and an nftables host firewall policy (host-firewall) |
| gVisor | gVisor’s pinned runsc, registered with Docker on x86_64; off elsewhere, with the reason |
| Virtual machines | The signed VM bundle descriptor and hermitboxd-vm-worker.service, on x86_64 with KVM |
| Separate users | A UID pool for process sandboxes (separate-users), where the credential-drop probe passes |
| Kernel network policy | Per-sandbox cgroup programs for process sandboxes: host-firewall, hostname egress and address rules |
| HTTPS | A certificate for the domain from ACME, renewed by the hermitbox-api-tls unit |
The preset requires every sandbox to have a private network, private PIDs and enforced CPU and memory limits. That shapes the defaults:
- A sandbox that names no image or tier runs on a container from a pinned Debian image with Python.
- Process sandboxes run beside the other tiers with network
none(--isolation process --network none), in network, PID and user namespaces of their own. A process sandbox hasprivate-networkonly with networknone. - The Wasm tier is off on a server: it gives no private network, PIDs or limits.
The main daemon’s unit hardening stays in force. Isolation tiers explains each tier, and host capabilities lists every guarantee.
Server notes
A systemd host gets Docker, nftables, persistent Docker volumes for the database and object store, control and edge units, and its enrolled local node. Debian and Ubuntu install missing packages automatically. Other distributions need Docker and nftables installed first, and the installer names them before it provisions anything.
Without an --allow-image list of your own, the node admits alpine: and node: images, the
release’s built-in template images (ghcr.io/hermitbox/hermitbox-<name>:), the pinned
coding-agent and language-stack images, and the images the VM bundle is proven with. See
virtual machines for the VM tier’s host requirements.
The API is at https://sandboxes.example.com with an automatically renewed certificate.
Exposed ports and template previews share that address and certificate, at
https://sandboxes.example.com/sandboxes/<id>/ports/<port>, so the one A record is all the DNS
they need. Existing domains stay immutable. See operations for DNS, TLS,
server upgrades, more nodes and explicit data removal.
$curl -fsSL https://hbx.sh | shInstall Hermitbox and set it up for me