Machines
environments.yaml declares your organization’s machines, and each space’s space.yaml picks the ones it runs on. The CLI and its messages call a machine an environment template.
Declare a machine
The key is the machine’s name. Under it, say which provider runs the machine and how to configure it:
Node build:
description: Node 22 with the GitHub CLI.
provider: e2b
config:
cpuCount: 4
memoryMiB: 4096
packages:
apt: [gh]
npm: [pnpm]
buildCommands:
- corepack enable| Field | Default | What it sets |
|---|---|---|
provider | Required | Where the machine runs |
config | Required | The provider’s settings, such as size, packages and build commands |
sessionsPerEnvironment | 8 | How many chats run on one machine before Ren starts another, from 1 to 100 |
networking | unrestricted | The hosts the machine can reach. See Network access. |
Provider config
Each provider has its own config. To see the providers you can use and the config each one takes, run:
ren environment provider listThe examples on this page use e2b.
Network access
A machine can reach any host unless you limit it. A limited machine needs all three of these fields:
Node build:
provider: e2b
config:
cpuCount: 2
memoryMiB: 2048
packages: {}
buildCommands: []
networking:
type: limited
allowPackageManagers: true
allowMcpServers: true
allowedHosts:
- github.com
- "*.githubusercontent.com"| Field | Allows |
|---|---|
allowPackageManagers | npm, PyPI, the Debian and Ubuntu mirrors and the Go module proxy |
allowMcpServers | The MCP servers of the space’s apps |
allowedHosts | Host names such as api.example.com, or *.example.com for subdomains |
A limited machine can always reach the hosts that the space’s secrets are for.
Assign machines to a space
A space has a brain, which runs the agent, and a hand, which runs its file and shell tools. Most often you want the machine you declared for the hand, so the tools find the packages you installed on it. Make the hand remote and name the machine:
name: Engineering
hand:
placement: remote
environment: Node buildTo run the brain on it too, name the machine and its provider. ren environment provider brains lists the providers that can run brains.
name: Engineering
brain:
provider: e2b
environment: Node buildSpaces → Runtime covers the other runtime keys, and when a change takes effect.
Builds
A provider such as e2b has to build an image for each new machine, and again whenever its config changes. A space can’t move to a machine until its first build is ready, so adding one takes two applies:
- Add the machine to
environments.yamland runren infra apply. Leavespace.yamlunchanged. - Run
ren environment template listuntil the machine’sbuildStatusisready. - Name the machine in
space.yamland runren infra applyagain.
If a build fails, ren environment template get shows its log in buildError. Fix the config and apply again.
Remove a machine
Deleting a machine from environments.yaml archives it, along with its running machines and their files. Move every space off it first. To see which spaces still use it:
ren environment template affected-spaces tpl_01JX4M2T9V8K3N6P5Q7R2S4W1Y