container, as on
a Linux host.
A Mac can also host a runner that builds in sandboxes that OuterLayer
provides, with no Docker and no VM. Run
outerlayer runner init --sandbox. See
Build in a managed sandbox.
Both routes above work on Apple silicon and on Intel Macs. A runner installed
directly on the Mac does not use Docker Desktop: there, runner init offers
only the Lima VM.
Docker Desktop
Follow Run the runner in a container. Before you start, read its Docker Desktop section. It gives the memory, CPUs and disk the default limits need, the settings that start the runner after a reboot, and Docker’s license terms.Set up a Lima VM
outerlayer runner init --vm makes a small Linux VM with Docker Engine,
which Lima runs. It installs the
runner in the VM as a service. You do not open a shell in the VM.
Before you start
You need:- Node.js 22.15 or later, and the CLI on the Mac:
npm install -g @outerlayer/cli. - Lima. Install it with
brew install lima. - A login. Run
outerlayer loginon the Mac. It tells setup which factories you can use. - A way to create a runner key. Setup prints the link to the factory’s API keys page and asks you to paste a key with the Runner preset. See Give the runner its key. If you cannot create the key, see If you cannot create the key. Setup moves a key from that config file into the VM.
- A Claude token, from
claude setup-token. - Room for the builds. With the default limits the VM gets 5 CPUs, 11 GiB of memory and 110 GiB of disk. See Size the VM.
- A network. The first run downloads an Ubuntu image, Node.js and the CLI.
Run setup
-
Read the token into a variable. Nothing shows as you paste.
-
Run setup, with the token on standard input:
- Paste the runner key when setup asks, then press Enter.
-
Check the runner from the Mac:
<org>/<factory> is the factory’s name in its dashboard address,
app.outerlayer.ai/orgs/<org>/factories/<factory>. Leave --factory out
if your login can use only one factory.
Without --vm, runner init asks on a terminal whether to make the VM. In
a script, it refuses and names --vm and the runner image.
To use an agent other than Claude Code, leave --agent out. See
Using another agent. The runner’s
config file in the VM is ~/.outerlayer/config.json.
If a step in the VM fails, the Mac’s config file is unchanged. Delete the
half-built VM with limactl delete --force outerlayer-runner, then run setup
again.
What setup makes
- A Lima VM named
outerlayer-runner. No directory of the Mac is mounted in it, so a build cannot read your home directory. The VM holds the CLI, the runner key, the host key and the Claude credential. - A systemd service in the VM,
outerlayer-runner. It is the same service as on Linux. See Run the runner as a service. - A launch agent on the Mac,
ai.outerlayer.runner-vm. Its file is~/Library/LaunchAgents/ai.outerlayer.runner-vm.plist. It starts the VM when you log in, and the VM starts the service. Before you log in, the runner does not run. - A
runnerVmkey in the config file you named with--config. It names the VM. The file holds no runner key.
If the Mac had a runner before
- A runner key that was in the config file moves into the VM. The file loses
apiKeyandrunner. If you used that key for capture on the Mac, runouterlayer loginthere again. - A runner key bound to the Mac’s old host key is refused. A member must choose Clear host key on the key in Settings → API keys.
- Setup refuses a
runnerblock that names hooks, such asbuiltin:container. Remove the block and run setup again. - Setup refuses when the config file has a
runnerVmkey, or the VMouterlayer-runnerexists. The refusal says how to start or delete that VM.
Size the VM
Setup sizes the VM fromrunner.concurrency and the build limits
(runner.build.cpus, runner.build.memory and runner.build.disk). It
never gives the VM more CPUs or memory than the Mac has.
Setup makes no VM when the builds do not fit the Mac’s memory. Lower
runner.concurrency or runner.build.memory. See
Memory limits and
Disk fit.
To change the size later:
- Edit
~/.lima/outerlayer-runner/lima.yaml. - Run
limactl stop outerlayer-runner. - Run
limactl start outerlayer-runner.
Operate the runner
Run runner commands throughlimactl shell outerlayer-runner. In the VM,
leave out --config:
Change the runner’s config
-
Open a shell in the VM:
limactl shell outerlayer-runner. -
Edit
~/.outerlayer/config.json. The runner reads most changes on its next poll. -
For a change to
runner.envorclaude.env, runsudo systemctl restart outerlayer-runner. -
For a change that the service’s unit depends on, run this on the Mac:
Re-run the service lists those changes. The command also rewrites the launch agent.
Update the runner
The runner in the VM updates itself to the version your factory names. Installing a new CLI on the Mac does not update it. To update it by hand, see A runner in a Lima VM on a Mac.Remove the runner
-
Remove the service and the launch agent. Use the
--configthat you gave torunner init: -
Delete the VM. The runner key and the host key exist only in the VM, so
this removes both.
-
Remove the
runnerVmkey from the config file. - Delete the runner key in Settings → API keys.
A second factory on the same Mac
One Mac runs one VM, andouterlayer runner init --vm refuses to make a
second. The one VM can run a runner for a second factory. Each runner needs
its own runner key, its own config file in a directory of its own, and its
own service.
- Raise the VM’s CPUs, memory and disk, as Size the VM shows. Setup sized the VM for one runner’s builds.
-
Set up the second runner inside the VM:
-
Check the second runner from the Mac: