# Host on a server with root

> Let your agent do it: Install Hermitbox on this Linux systemd server with the server preset, which runs as root. Check that the domain's DNS A record points at this server and that inbound TCP 443 is open. Show me `curl -fsSL https://hbx.sh | sudo HERMITBOX_DOMAIN=<domain> sh` with my domain, and run it only after I confirm. Then run `hermitbox run --image alpine:3.22 -- echo hello` and `hermitbox doctor`, and tell me which tiers are on. Never copy the key into a file or this chat. Follow the exact steps in https://docs.hermitbox.dev/v0.2.4/hosting/server.md.

Install Hermitbox on a Linux systemd server as root with the server preset. Root turns on the
tiers an ordinary user can't have: containers, gVisor, virtual machines and a separate user for
each process sandbox.

```sh
curl -fsSL https://hbx.sh | sudo HERMITBOX_DOMAIN=sandboxes.example.com sh
```

## 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. Run
`sudo hermitbox up --check --domain sandboxes.example.com` on an installed CLI to print the plan
without changing anything.

## 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:

```sh
hermitbox run --image alpine:3.22 -- echo hello
```

It prints `hello`. Then list what this host serves:

```sh
hermitbox doctor
```

`hermitbox 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 node serves every tier its host permits, so process and Wasm sandboxes run beside these.
Server sandbox placement needs private network and PID namespaces and enforced CPU and memory
limits. The main daemon's unit hardening stays in force.

[Isolation tiers](https://docs.hermitbox.dev/v0.2.4/concepts/isolation.md) explains each tier, and
[host capabilities](https://docs.hermitbox.dev/v0.2.4/reference/host-capabilities.md) 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
pinned coding-agent and language-stack images, and the images the VM bundle is proven with. See
[virtual machines](https://docs.hermitbox.dev/v0.2.4/guides/virtual-machines.md) for the VM tier's host requirements.

The API is at `https://sandboxes.example.com` with an automatically renewed certificate. Existing
domains stay immutable. See [operations](https://docs.hermitbox.dev/v0.2.4/guides/operate.md) for DNS, TLS, server upgrades, more
nodes and explicit data removal.
