Install a host

A host claims work from one pull pool and starts the sandboxes its runs work in. Before you install one, have ready:

  • Docker, Podman, OrbStack or Colima, running.
  • curl or wget, and sha256sum or shasum, for the install script.
  • git, which the host uses to keep mirrors of the repositories runs check out.
  • An API key or token for each harness your lines use, such as an Anthropic key for Claude Code. See Give hosts your harness keys for the key each harness takes.

Install the host

On your own computer, let spotlight host init set up the host. It needs a login of a workspace owner or admin, because it keeps keys as workspace secrets and makes a pull pool. On a server, in a script, or as root, install the host with a pool token instead.

Install the spotlight binary. On a self-hosted Spotlight, use your deployment's address in place of app.usespotlight.ai.

curl -fsSL https://app.usespotlight.ai/api/install.sh | sh

Then, as yourself and without sudo, run init in a terminal, with no flags:

spotlight host init

To set up the host for one address, give --url alone, as the install script's next step shows: spotlight host init --url <address>.

The dashboard opens at Set up this computer as a host:

  1. If you have no login for the address, the dashboard asks for the address and opens the login page in your browser. Approve the login. With more than one saved login, : offers set up a host for <address> for each of them.
  2. If your login belongs to more than one workspace, pick the workspace.
  3. Pick the harnesses that run on this computer with Space, then press Enter.
  4. For each harness whose key the workspace does not hold yet, pick the key when the harness takes more than one, and paste it. The dashboard does not show what you paste. A key the workspace holds serves every harness that uses it: with ANTHROPIC_API_KEY held or pasted for Claude Code, OpenCode needs no key of its own.
  5. Give the pool a name that no pool in the workspace has, or press Enter to keep the computer's host name. Use lowercase words joined by dashes. If the workspace has a pool with that name, the dashboard asks for another name when it makes the pool.
  6. Give how many sandboxes run at once, or press Enter to keep 5.
  7. Press Enter to set up the host.

The dashboard then:

  1. Saves each key as a workspace secret with the variable's name, such as ANTHROPIC_API_KEY, bound to the model provider's host.
  2. Makes a pull pool with the name you gave, for this host alone.
  3. Builds an image on this computer, FROM Spotlight's runner image of the binary's release, with the harnesses you picked. Its tag is spotlight-harnesses:<release>-<harness ids>. The build takes a few minutes.
  4. Runs spotlight host init with the pool's token on standard input, the image, the number of sandboxes and the name. This saves the settings and installs the service.

If a step fails, the dashboard shows why. Press r to try again from that step: the steps that are done are not done again. Before you confirm, Esc goes back one step.

On Linux, the service runs for your user, with its settings in ~/.spotlight. On a Mac, the host runs as a launchd agent for your user, beside Docker Desktop, OrbStack or Colima. If you install on Linux and the machine should keep serving after you log out, run:

loginctl enable-linger $USER

Install the host with a pool token

You need the pool's token. If you don't have one, create a pull pool first.

Run the install script with the pool's token, as the command on the Runners page does:

curl -fsSL https://app.usespotlight.ai/api/install.sh | sh -s -- --token <pool token>

The script installs the spotlight binary, then runs spotlight host init with the token. It asks how many sandboxes run at once (5 if you press Enter) and which runner image to use. To give the answers in the command, as in a script, add flags:

curl -fsSL https://app.usespotlight.ai/api/install.sh | sh -s -- --token <pool token> --capacity 8 --yes

To keep the token out of the command line, pipe it to init with --token-stdin:

spotlight host init --token-stdin --capacity 8 --yes < pool-token.txt

On Linux, run it as root to install a system service with its settings in /etc/spotlight, or as yourself to install a service for your user, with its settings in ~/.spotlight. On a Mac, run it as yourself: the host runs as a launchd agent for your user, beside Docker Desktop, OrbStack or Colima.

When the service runs, this line shows:

The host serves https://app.usespotlight.ai. It shows on the Runners page when it connects.

If you did not choose an image, the host uses Spotlight's runner image, ghcr.io/usespotlightai/spotlight-runner:<release>. Below the last line, init prints that this image holds no harness. The host runs change-stack checks, but no agent run, until it serves an image that holds a harness.

If you install as yourself on Linux and the machine should keep serving after you log out, run the command init prints:

loginctl enable-linger $USER

If you want to run the host under your own supervisor instead of a service, add --no-service to the install command, then start the host with spotlight host serve.

Give the host a harness

Build an image FROM Spotlight's runner image, with the harness your lines use, and make it the host's image with spotlight host config set image=<image>. Install a harness in your runner image gives the steps.

Give the host your harness keys

Keep each key as a workspace secret, or write it to the host's sandbox.env. Give hosts your harness keys gives both ways.

Manage the host in a terminal

Run spotlight without a command to open the dashboard:

spotlight

The dashboard shows the service, the sandboxes in use, the checks, the live log, the login of the command line, and the editors that spotlight ssh setup set up. It refreshes every 5 seconds. Press : and type part of a name to find any action or setting, such as :rest for a restart or :capa to change capacity. The commands also have keys:

KeyActionCommand it runs
sStarts or stops the service.spotlight host start, spotlight host stop
rRestarts when the running sandboxes finish.spotlight host restart
RRestarts at once.spotlight host restart --now
oReloads host.env, sandbox.env and egress.env.spotlight host reload
uReplaces the binary with the release of Spotlight.spotlight update
iOpens Set up this computer as a host, as spotlight host init does with no flags. As root, runs spotlight host init.spotlight host init
aLogs in on the dashboard, or asks and logs out.spotlight logout
eLogs in when necessary, then sets up ssh for VS Code and Cursor.spotlight ssh setup
cOpens the settings.spotlight host config set, spotlight host config unset
lOpens the full log.spotlight host logs -f
ctrl+rChecks the host again.spotlight host status
?Shows every key.
qCloses the dashboard. The host keeps serving.

Before s stops the host or R restarts it, the dashboard asks if sandboxes run. After each action, the dashboard shows the command it ran and what the command printed. In the settings, press Enter to change a setting and x to unset it. The dashboard hides the token and each variable that is not a setting, such as HTTPS_PROXY. To change one, type a new value, or press Enter to keep the current one. The dashboard passes each value to spotlight host config set on stdin, so it is not in the command line. A setting marked ↻ applies at a restart, when the running sandboxes finish. In the settings and the full log, / filters the list. In the full log, pgup, pgdown, g and G move by a page or to the first and last line.

Change the host settings

Change a setting with spotlight host config set, as in:

spotlight host config set capacity=8

The command checks the new value before it saves it. Most settings, such as capacity and image, apply to the running host at once. Running sandboxes keep going. A few, such as token and url, need a restart: the host restarts when its running sandboxes finish. Spotlight drains each of them as soon as no run is in it, so a sandbox waiting for a task's next run stores its working copy and stops. To restart at once and stop them, add --now. spotlight host config keys lists every setting and when it applies.

For a host installed as root, run each spotlight host command with sudo.

To see the settings, run spotlight host config. To remove one so its default applies, run spotlight host config unset <key>.

Check that it is serving

Open Settings from the workspace menu, then Runners. The machine appears in its own row with its name, the pool it came through under Serves, and the harnesses its runner images hold under Harnesses. Its status reads Idle until it claims a run.

If Harnesses reads None in red, the host's images hold no harness. See Check that it is served.

If the machine does not appear within a minute, check the host:

spotlight host status

It shows whether the service runs, how many sandboxes run, and the settings. Its checks say whether Spotlight accepts the token and whether the container runtime answers, each with what to do if not. To read the host's log, run spotlight host logs, or spotlight host logs -f to follow it.

The host exits with code 3 when Spotlight does not accept its token. Check that the token belongs to a pool that still exists and has not been rotated.

Remove the host

spotlight host uninstall

The command stops and removes the service, then asks whether to delete the settings and the host's state too. --purge deletes them without the question.

On this page