# Host requirements

> The checklist a machine must pass before you run the install command.

Source: https://legion.ambient.xyz/docs/providing/host-requirements

Check every item before you add a host. The install script refuses a machine that doesn't meet them, and says why.

## The machine

- Ubuntu with systemd, on x86-64 or ARM64.
- The NVIDIA driver: `nvidia-smi` works.
- [Docker Engine](https://docs.docker.com/engine/install/ubuntu/), rootful.
- The [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).
- All GPUs on the machine are the same model.
- You can run a command with `sudo`.

The installer refuses rootless Docker, Docker with SELinux enabled, and runc versions below 1.2.8, 1.3.3 or 1.4.0-rc.3 in their release lines.

## Isolation

Docker must run with user namespaces (`userns-remap`), so root inside a rental is an unprivileged user ID on your machine. Legion requires it on every host, from Nov 25, 2026 at 15:00 UTC. You don't set it up yourself:

- **The installer** turns it on. With no other containers on the machine, it does so with no prompt. If Docker already runs containers or has volumes that are not Legion's, an interactive install asks once (the default is yes) before it restarts Docker; a non-interactive install leaves Docker alone and says why.
- **The agent** turns it on by itself once the host has no rentals and no other containers. It checks at every start, holds new rentals on the host for the few minutes the switch takes, and tries again after 6 hours if a switch fails.

The command `sudo legion-agent enable-userns` stays as the fallback. See [User-namespace isolation](https://legion.ambient.xyz/docs/providing/user-namespaces).

## Disk

Each rental gets its own disk limit, so Legion needs:

- An XFS filesystem with project quotas for Docker and the agent. The install command sets this up for you with `legion-agent setup-disk`: an empty disk if the machine has exactly one, otherwise an image file.
- Docker with the `overlay2` storage driver, and the containerd image store turned off. `setup-disk` sets both.
- No Docker containers, images or volumes on the machine: `setup-disk` refuses to move them. Testing the NVIDIA Container Toolkit with `docker run` leaves an image behind. Remove it with `docker image prune -a`.
- At least 128 GiB of usable disk per GPU.

## Network

The machine needs outbound HTTPS to:

- `get.legion.ambient.xyz`
- `api.legion.ambient.xyz`
- `agents.legion.ambient.xyz`
- `overlay.legion.ambient.xyz`
- `otlp.legion.ambient.xyz`

It also needs the public internet, to download the images renters run.

You don't open any inbound ports. Renters reach rentals through Legion's network, never through a port on your machine.

## Host firewall

If the machine runs a firewall that drops incoming traffic by default, allow traffic from the rental interfaces (`lg-*`) to the agent's ports. With ufw:

```sh
sudo ufw allow in on lg-+ to any port 15353,15443,15080
```

Adapt this for another firewall. Without it, rentals on the host lose DNS and web access.

## Monitoring

The agent can serve Prometheus metrics for your own dashboards and alerts. It is off the network by default. See [Monitoring with Prometheus](https://legion.ambient.xyz/docs/providing/monitoring).

## Next step

[Install the agent](https://legion.ambient.xyz/docs/providing/install-the-agent), or follow [Add your first host](https://legion.ambient.xyz/docs/get-started/add-a-host).
