Host settings

spotlight host reads its configuration when it starts. A change takes effect when the host restarts.

Where settings come from

The host reads a file of KEY=VALUE lines. Lines starting with # are comments, and quotes around a value are removed. A variable set in the host's own environment overrides the same variable in the file.

ConditionFile
SPOTLIGHT_HOST_CONFIG is setthat path
running as root/etc/spotlight/host.env
otherwise~/.spotlight/host.env

The install script writes this file with mode 0600.

Connection

VariableDefaultDescription
SPOTLIGHT_URLrequiredThe Spotlight address: https://app.usespotlight.ai, or a self-hosted deployment's address. A trailing / is removed.
SPOTLIGHT_TOKENnoneA pull pool's token.
SPOTLIGHT_TRUSTnoneThe id of a runner trust.
SPOTLIGHT_OIDC_TOKEN_FILEnonePath to the workload's OIDC token. Required with SPOTLIGHT_TRUST. Read again on every request.
SPOTLIGHT_HOST_NAMEnoneThe name shown on the Runners page. Without it, the machine's hostname.

Exactly one of SPOTLIGHT_TOKEN, or SPOTLIGHT_TRUST with SPOTLIGHT_OIDC_TOKEN_FILE, must be set.

Sandboxes

VariableDefaultDescription
SPOTLIGHT_CAPACITY1Sandboxes the host runs at once. At least 1.
SPOTLIGHT_ANSWER_WAIT5mA Go duration. How long a sandbox whose run asked a person stays up for the answer, still using its place in SPOTLIGHT_CAPACITY, before the run is parked. 0 parks at once. Counts toward SPOTLIGHT_RUN_TIMEOUT.
SPOTLIGHT_RUNNER_IMAGEghcr.io/usespotlightai/spotlight-runner:<release>, or :latest for a binary built without a releaseComma-separated images the host serves. Each entry is an exact image reference, or a prefix ending in * such as ghcr.io/acme/*. The first exact entry is the default image, used by every line that names none. If no entry is exact, the built-in default is added.
SPOTLIGHT_REGISTRY_CONFIG$DOCKER_CONFIG/config.json, else ~/.docker/config.jsonA Docker config file whose auths the host pulls with. Read on every pull. See registry credentials.
SPOTLIGHT_RUN_TIMEOUT6hA Go duration. A sandbox running longer is stopped and destroyed, and its run reported timed-out.
SPOTLIGHT_SANDBOX_ENVsandbox.env beside the config fileA file of variables every sandbox gets. A missing default file is ignored; a missing named file is an error.
SPOTLIGHT_SANDBOX_PASSnoneComma-separated names of the host's own variables to pass into every sandbox.
SPOTLIGHT_SANDBOX_URLSPOTLIGHT_URLThe Spotlight address as sandboxes and egress reach it.
SPOTLIGHT_SANDBOX_NETWORKnoneA container network egress joins, beside the sandbox's own network.
SPOTLIGHT_SANDBOX_HOSTSnoneComma-separated host:ip entries added to egress's hosts file.
DOCKER_HOSTnoneThe container engine, as unix:// or tcp://. Without it, the host looks for a socket, as below.

With DOCKER_HOST unset, the host tries these sockets in order: /var/run/docker.sock, ~/.docker/run/docker.sock, ~/.orbstack/run/docker.sock, ~/.colima/default/docker.sock, ~/.colima/docker.sock, /run/podman/podman.sock, $XDG_RUNTIME_DIR/podman/podman.sock.

The sandbox environment, from SPOTLIGHT_SANDBOX_ENV and SPOTLIGHT_SANDBOX_PASS, may not set SPOTLIGHT_URL, SPOTLIGHT_TOKEN, SPOTLIGHT_TRUST, SPOTLIGHT_OIDC_TOKEN_FILE, SPOTLIGHT_HANDED or SPOTLIGHT_ANSWER_WAIT, and may not carry the pool token in any variable. The same holds for the egress environment.

Registry credentials

The file named by SPOTLIGHT_REGISTRY_CONFIG is JSON. The host reads only its auths object; credsStore and credHelpers are ignored.

{
  "auths": {
    "ghcr.io": { "username": "<user>", "password": "<token>" }
  }
}

Each key of auths names a registry. The registry of an image is the first part of its name when that part holds a . or a :, or is localhost; any other image is on Docker Hub.

RegistryKeys looked up, in order
Docker Hubhttps://index.docker.io/v1/, index.docker.io, docker.io, registry-1.docker.io
any other<registry>, https://<registry>, http://<registry>
Entry fieldDescription
authBase64 of <username>:<password>. When set, used in place of username and password.
usernameThe user to pull as.
passwordThe password or access token.
identitytokenA registry identity token, sent with the pull.

A missing file, or no entry for the registry, pulls anonymously. A file that cannot be read or parsed, or an auth that is not base64, fails the pull. The image is then refused with Image can't be pulled. Error: read registry credentials <path>: <error> or Image can't be pulled. Error: registry credentials for <registry>: auth is not base64, also when the host has a copy of it, unless the image is named by digest or the copy has no registry digest.

Harness keys

These variables, when SPOTLIGHT_SANDBOX_ENV or SPOTLIGHT_SANDBOX_PASS gives them a value, are held by egress. The sandbox gets the stand-in spotlight-egress:<NAME>.

VariableSent toHeader
ANTHROPIC_API_KEYapi.anthropic.comx-api-key
CLAUDE_CODE_OAUTH_TOKENapi.anthropic.comauthorization: Bearer
OPENAI_API_KEYapi.openai.comauthorization: Bearer
CODEX_API_KEYapi.openai.comauthorization: Bearer

Any other variable, including CURSOR_API_KEY, enters the sandbox as it is.

Egress

VariableDefaultDescription
SPOTLIGHT_EGRESS_ALLOWnoneComma-separated hosts sandboxes may reach. An entry is an exact host, or *.example.com for its subdomains. * alone is refused. Without it, any host is admitted; see Admitted hosts.
SPOTLIGHT_EGRESS_READSnoneComma-separated AWS Secrets Manager secret names or ARNs egress may read, or prefixes ending in *.
SPOTLIGHT_EGRESS_IMAGEghcr.io/usespotlightai/spotlight-runner:<release>, or :latest for a binary built without a releaseThe image egress runs from. Entries in SPOTLIGHT_RUNNER_IMAGE do not change it.
SPOTLIGHT_EGRESS_ENVegress.env beside the config fileA file of variables only egress gets.
SPOTLIGHT_EGRESS_PASSnoneComma-separated names of the host's own variables to pass to egress only.
SPOTLIGHT_EGRESS_TRUSTnoneA PEM file of certificate authorities egress trusts upstream. Sandboxes do not trust them.

See Egress for what egress admits and refuses.

Error reporting

VariableDefaultDescription
SENTRY_DSNnoneWhere the host reports its errors. When it is set, the host gives it to each sandbox and egress it starts as SPOTLIGHT_SENTRY_DSN, and egress admits the server's host.
SENTRY_ENVIRONMENTthe Sentry SDK's defaultThe environment on each report. The host gives it to each sandbox and egress as SPOTLIGHT_SENTRY_ENVIRONMENT.

See Error reporting for what a report holds.

State

VariableDefaultDescription
SPOTLIGHT_STATE/var/lib/spotlight-host as root on Linux, else ~/.spotlight/hostThe host's state directory, created with mode 0700.

The state directory holds:

PathContents
<state>/host-idThe host's id, made on first start.
<state>/host.lockA lock held while the host runs. A second host on the same directory refuses to start.
<state>/mirrors/<workspace>/<repo>.gitBare mirrors of the repositories the host has checked out. Mounted read-only into sandboxes. Needs git on the host.

A host id serves one pool or trust at a time. Spotlight refuses a host id that is already serving another pool or trust.

Validation

The host checks every setting before it starts and reports all problems together. Messages include:

MessageCause
SPOTLIGHT_URL is requiredNo address.
SPOTLIGHT_TOKEN and SPOTLIGHT_TRUST are different ways in; give oneA token together with a trust or a token file.
SPOTLIGHT_TOKEN (a pull pool's token) is required, or SPOTLIGHT_TRUST and SPOTLIGHT_OIDC_TOKEN_FILE to claim through a runner trustNeither a token nor a trust.
SPOTLIGHT_OIDC_TOKEN_FILE names the workload token file, and is required with SPOTLIGHT_TRUSTTrust without a token file.
SPOTLIGHT_CAPACITY: "<x>" is not a count of at least 1Bad capacity.
SPOTLIGHT_RUN_TIMEOUT: "<x>" is not a duration such as 6hBad timeout.
SPOTLIGHT_ANSWER_WAIT: "<x>" is not a duration such as 5m, or 0 to park at onceBad answer wait.
SPOTLIGHT_RUNNER_IMAGE: "<x>" is not an image reference such as ghcr.io/acme/runner:mainBad image entry.
SPOTLIGHT_EGRESS_ALLOW: "*" allows everything; leave the list empty for thatSPOTLIGHT_EGRESS_ALLOW=*.
the sandbox environment sets <NAME>, which only the host holdsA sandbox variable names a variable only the host sets.
the sandbox environment carries the pool token in <NAME>A sandbox variable holds the pool token.

The same two problems in the egress environment are prefixed egress: . A host that finds another host already holding its state directory stops with another spotlight host already serves from <state>: <error>.

Exit codes

See The spotlight command for the exit codes of spotlight host.

On this page