Skip to content

Runners

A runner is the StratoNext runner image, running on Docker or Kubernetes in your own infrastructure. It registers to one workspace, polls StratoNext for workflow runs, executes each step inside your network, and reports the result. Think of GitHub’s self-hosted runners. If you would rather install nothing, use a hosted runner.

Five things are true of every runner:

  • It only makes outbound connections. Work is delivered over a long-poll the runner holds open, so it works behind NAT, a corporate proxy or a laptop firewall. StratoNext never connects to it.
  • No person handles its credential. You get a one-time registration token; the runner trades it for its own credential, which never leaves the machine and rotates itself.
  • It can do very little. A runner can take runs of its workspace and report on them. It cannot read workflows, browse tasks, or act as a user.
  • Every run gets a container of its own. The runner starts it, runs every step inside it, and removes it when the run ends, so runs never see each other’s files. See A container per run.
  • A pending approval does not hold it. While a run waits for a person to decide an approval, the runner lets go of the run and takes other work. See How a run executes.
  1. Open the workspace, go to Settings and find Runners.
  2. Click Runner. Give it a name and, optionally, labels. The name is chosen here and is how the runner appears in StratoNext; the machine cannot rename itself.
  3. Copy the command for your platform and run it on the machine. The dialog waits and confirms when the runner has registered.

Docker on Linux (amd64 and arm64):

Terminal window
# The Docker socket's group as containers see it.
SOCK_GID=$(docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
--entrypoint stat ghcr.io/stratonext/runner:15 -c %g /var/run/docker.sock)
docker run -d --restart unless-stopped --name stratonext-runner \
-v /var/run/docker.sock:/var/run/docker.sock --group-add "$SOCK_GID" \
-e STRATONEXT_API_URL=https://api.prod.stratonext.com \
-e STRATONEXT_RUNNER_TOKEN=rrt_… \
-v stratonext-runner:/var/lib/stratonext \
ghcr.io/stratonext/runner:15

Docker Desktop on macOS. Docker Desktop gives containers a socket that only its owner can use, so run the runner as root inside its container instead of adding a group:

Terminal window
docker run -d --restart unless-stopped --name stratonext-runner --user root \
-v /var/run/docker.sock:/var/run/docker.sock \
-e STRATONEXT_API_URL=https://api.prod.stratonext.com \
-e STRATONEXT_RUNNER_TOKEN=rrt_… \
-v stratonext-runner:/var/lib/stratonext \
ghcr.io/stratonext/runner:15

If the runner stops at start with “This runner has no container engine”, it cannot use the Docker socket: check the socket is mounted, and on Docker Desktop use the --user root form.

The container registers on first start and then runs. The named volume keeps its credential across restarts. The runner needs the Docker socket to start the container of each run; without Docker or Kubernetes it does not start.

Kubernetes: run the same image as a Deployment, with the registration token in STRATONEXT_RUNNER_TOKEN. See A container per run for the permissions it needs.

A runner that is refused for good does not retry. This happens when its registration token is expired or already used, or when the runner was disabled or deleted in the console. The runner stays up but idle, makes no further requests, and repeats the reason in its log once an hour. Read the log (docker logs stratonext-runner), then start the runner again with a new runner command.

Status Meaning
Not started Registered, but the runner has never polled. Start its container.
Online Polled within the last 90 seconds.
Offline Was running, but has not polled for more than 90 seconds.
Disabled Switched off by an admin. Its credential is refused until it is enabled again.

Ping a runner from its drawer to check it is running right now. StratoNext cannot connect to the runner, so a ping asks the runner to answer through its own poll and reports how long that took. A runner that does not answer within 10 seconds is not running, or cannot reach StratoNext.

Labels say what a runner can do, and runs-on in a workflow says what a run needs. A run goes only to a runner that has every label the run needs, at every node.

  • A runner gets its platform labels automatically: linux, and x64 or arm64. The architecture matters when a workflow names an image built for only one of them.
  • A runner that holds a JEV key gets judging, which decisions that ask questions need. Remove the key and the label goes on the next poll.
  • Add your own when you create the runner command, or later from the runner’s drawer: a network (prod-vpc), a region, a capability.

Labels are lower case: letters, digits, ., _, - and :, up to 32 characters, and at most 20 per runner.

runs-on: [linux, prod-vpc] # every node, unless it says otherwise
nodes:
fetch_internal:
uses: stratonext.http.request@v1
runs-on: [linux, eu-west-1] # this node only
with: { url: "http://billing.internal:8080/health" }

A run does not start unless an active runner of the workspace has all of the labels its nodes need, in one runner. The error names the labels, so you know which runner to add or relabel.

On a runner of your own, secret values never pass through StratoNext. (On a hosted runner, which has no machine of yours, you store secrets with StratoNext instead.) A runner holds them as environment variables named STRATONEXT_SECRET_<NAME>, and a workflow names the secret it wants in a header:

with:
url: https://billing.internal/api
secret_headers:
Authorization: { secret: BILLING_TOKEN, prefix: "Bearer " }
Terminal window
docker run … -e STRATONEXT_SECRET_BILLING_TOKEN=… ghcr.io/stratonext/runner:15

The runner fills the header in before sending the request, masks the value in the log it sends back, and fails the step with secret_missing if it does not have the secret. The runner reports only the names of the secrets it holds, which you can see in its drawer.

Decisions that ask questions use your own JEV key: give it to the runner as STRATONEXT_SECRET_JEV_KEY.

Every run executes in a container of its own. The runner starts it for the run’s first step, executes every step inside it (HTTP requests, scripts and decisions), and removes it when the run ends. Steps share the container, not files: each script step starts in an empty scratch directory of its own, removed when the step ends, and steps pass data through their outputs. Nothing carries over to the next run except the workflow’s /cache. Secrets stay with the runner process: each step receives only the ones it names, for as long as it runs.

The image is the one the workflow names under container, or the runner’s own image when it names none: Ubuntu with bash, sh, python3, uv, the AWS CLI, git and curl. That image is already on the runner’s machine, so such runs start without a download.

On Kubernetes, each run becomes a pod in the runner’s namespace, and each workflow’s cache a PersistentVolumeClaim. The runner’s ServiceAccount needs, in that namespace only: pods (get, list, create, delete), pods/exec (create), and secrets and persistentvolumeclaims (get, list, create, patch, delete).

Variable Default Meaning
STRATONEXT_RUNNER_SANDBOX auto auto (Kubernetes inside a cluster, else Docker, else Podman), docker, podman or kubernetes.
STRATONEXT_CACHE_TTL_DAYS 14 A workflow cache unused for this long is removed.
STRATONEXT_CACHE_MAX_GB 50 Above this, the least recently used caches are removed (Docker and Podman).
STRATONEXT_CACHE_PVC_SIZE 10Gi Size of each workflow cache on Kubernetes.
  • When a run starts, it is queued for the workspace’s runners with the labels it needs. The first online runner that has them all takes it and keeps it until it ends, or until it waits for an approval.
  • Waiting for an approval. While every open step of a run waits for a person to decide an approval, the runner lets go of the run and its container and takes other runs. The run shows as Waiting for approval, and in the runner’s drawer as Released for approval. Once the approval is decided (or nobody decides in time), the run is queued again, usually within seconds, and continues on the first available runner with its labels, in a new container. Runners before version 15.2 keep the run and wait instead.
  • The runner performs the steps one at a time, in the order the workflow defines, and reports each one. Waiting for a runner does not count against any step’s timeout.
  • Waiting for a runner in Workspace settings lists the runs nobody has taken yet, with the labels each one needs. A run that waits for more than an hour fails with no_runner_available.
  • If a runner disappears mid-run, the step it was performing fails as runner_lost (retried if the node’s retry policy allows), and the run goes back in the queue for another runner, or the same one once restarted, to continue from where it was.
  • A brief outage on StratoNext’s side does not lose a run: the runner waits and continues.
  • Cancelling a run tells the runner to stop at its current step.

The runner’s drawer lists the runs it took, each linking to the run.

  • Disable a runner to stop it taking work immediately. Its credential and tokens are refused until you enable it again.
  • Delete a runner when the machine is gone. To use the machine again, register it with a new command.
  • Relabel from the drawer; the next poll uses the new labels.
  • The runner rotates its own credential every 30 days. Nothing to do.
  • A workspace can have up to 50 runners.