# Machines

Where agents run: the workspace's runtime hosts, or a member's own machine for Claude Code and Codex. What the agent does is in [Agents](https://spyria.dev/docs/agents).

## Runtime hosts and runtimes

- A **runtime** is a sandboxed container, one per AI chat: Pi, Node.js, git, ripgrep and PDF tools, running as a non-root user with 2 GiB of memory, 2 CPUs and 512 processes. Its files survive sleep (after an hour idle) and restarts; it is removed 7 days after it stops.
- A **runtime host** is any machine with Docker running Spyria's host program. It dials out to Spyria, so it needs no open port, and Spyria holds no key to the machine.

| | Workspace runtime host | A member's machine |
|---|---|---|
| Added by | an admin, in **Workspace settings > Runtimes** | the member, in **Profile > My machine** |
| Runs | Pi, for any member's AI chats | Claude Code and Codex, for its owner only |
| Model calls | the prompter's key, through Spyria's gateway | the owner's subscription, from the machine |

## Versions and updates

- **Update needed**: the host is below the minimum version Spyria accepts, raised for breaking changes and security fixes. Spyria refuses it until it is updated.
- **Update available**: still accepted, but older than Spyria.

Either badge shows the update command, which keeps the host's pairing and sign-ins. Runtimes move to the new image at their next start, with their files.

## Removing a host

**Remove** disconnects a host or a member's machine for good and revokes its token; its runtimes stop. Tick **Also delete its runtimes and the files in them** to delete them from the machine too; an offline host does it when it next starts ([Operations](https://spyria.dev/docs/install/operations#removing-a-runtime-host)).

## Isolation and egress

- Each runtime has its own Docker network; runtimes cannot reach each other where Docker isolates networks (Docker Engine on Linux, not every desktop Docker).
- A runtime never holds a member's key or GitHub token. Its only GitHub credential is a short-lived read-only clone token the agent never sees.
- Outbound traffic is not filtered. On a cloud VM you set up yourself, block the metadata endpoint (`169.254.169.254`) and private ranges in the provider's firewall; the cloud modules block them on the host.

## Many runtimes on one host

Each running runtime takes a Docker network, so Docker's default address pools cap a host at about 25 runtimes at once. Smaller pools raise it to thousands ([Operations](https://spyria.dev/docs/install/operations#many-runtimes-on-one-host)). Spyria also places at most one runtime per GiB of memory above the first 2 GiB.

## Behind an outbound proxy

Set `HTTPS_PROXY` (or `HTTP_PROXY`) and `NO_PROXY` before running the host command. Only the host's connection to Spyria uses the proxy; runtimes get no proxy settings ([Operations](https://spyria.dev/docs/install/operations#behind-an-outbound-proxy)).

## A member's own machine

Claude Code and Codex run on your own subscription, on your computer, and the sign-in never leaves it. **Never set it up on a machine others use**: the agent runs as you and can read your sign-ins.

1. In **Profile > My machine**, click **Set up** on the Claude Code or Codex row and run the command.
2. Sign in once with the `login` command Spyria shows, then open the URL it prints.
3. In a new AI chat, set **Runs on** to **Local · Claude Code** or **Local · Codex**.

Only the owner prompts; others read. Models come from your plan and are not metered or budgeted, while the workspace's tools still go through Spyria with your access. Tokens in the agent's output are replaced with `[redacted]` before they leave the machine. When the machine is offline, prompts wait.

## Turning members' machines off

**Workspace settings > Runtimes > Member local runtimes** has the switch **Members can run sessions on their own machine**, on by default. When off, members cannot add a machine or start such a session, and existing machine sessions refuse prompts.