Runners

Connect a server, desktop or laptop so your tests run on it, and install agents in a cluster, all from the command line.

Tests and agents never run on Wardn's own infrastructure. They run on your machines and clusters, in containers, and the machine dials out to Wardn: nothing listens on it, so it needs no inbound port and works behind a firewall.

A runner is a machine you connect with the wardn CLI. It appears in Testing, Workers (for tests) and takes the runs it may take. Agents run the same way in a cluster: wardn agents enable installs the agent runtime there, and it appears under Agents, Fleet.

You want toUseSee it in
Run tests on a server, desktop or laptopwardn runner startTesting, Workers
Keep that runner running after you log outwardn runner start --serviceTesting, Workers
Run agents in a clusterwardn agents enable --cluster <name>Agents, Fleet
Run a suite and wait for itwardn test run <suite> --on <deployment> --waitTesting, Runs

What you need

  • The wardn CLI on the machine. On Linux, macOS and Windows.
  • A container engine: Docker Engine, Docker Desktop, Colima or Podman. The runner checks for one and tells you what to install if there is none; see the engine below.
  • A person in the organization who may run that work. Connecting a runner needs the testworker:connect permission (whoever may run tests has it). A runner you connect is private to you until someone who manages workers opens it up.

Sign in

wardn login --server https://wardn.example.com

Your browser opens on an approval page that reads "your-laptop wants to act as you". Choose the organization, check the code matches your terminal, and approve. The CLI collects a personal API token named after the machine and keeps it in the system keychain (Keychain on macOS, Credential Manager on Windows, the Secret Service on Linux). A machine with no keychain, such as a server reached over SSH, keeps it in a private file (0600) in ~/.config/wardn and says so.

On a machine with no browser:

wardn login --server https://wardn.example.com --code

It prints an address and a short code such as WDJK-4M2P. Open the address in a browser anywhere, sign in, and approve. The token acts as you in that organization, never as more than you can do, and it appears in Settings, API tokens where you can revoke it. wardn logout forgets it and revokes it.

Every other wardn command now uses that sign-in, so wardn whoami works with no flags.

Start a runner

wardn runner start --name build-box

It checks the engine, registers the machine as a test worker of your organization, and serves runs in the foreground. You see a line per run:

Container engine: Docker 28.1.1 (amd64 containers)
Test agent: /usr/local/bin/wardn (this executable)
Registered as "build-box" (2 slot(s)) in https://wardn.example.com
10:41:02  runner "build-box" serving https://wardn.example.com with Docker 28.1.1, 2 slot(s). Ctrl-C stops claiming and lets current runs finish (up to 5m0s).
10:41:09  run 01a2b3c4  started   registry.example.com/shop/e2e:1.4
10:41:52  run 01a2b3c4  finished  exit 0

Ctrl-C stops it taking new runs and lets the runs it has finish, for up to five minutes (--drain); a second Ctrl-C ends them. The machine then shows offline in Workers.

FlagMeaning
--nameThe runner's name in Wardn. Defaults to the machine's hostname. Running the command again with the same name reuses the runner.
--slotsHow many runs it may run at once. A new runner has 2.
--labels gpu=yes,zone=euLabels the runner carries. A suite selects workers by them, and they show on the worker in Workers.
--engineThe container engine command: docker or podman. Defaults to Docker, then Podman.
--replaceTake over a runner of the same name that another machine registered. This ends the other machine's token.
--test-agent-binaryA Linux build of wardn to put in test containers (see how a test runs).
--network, --callback-urlHow test containers reach Wardn when the machine's own address will not do.
--sandbox auto|offauto keeps each test container to its policy where the engine can. off turns that off on this machine, which then reports reduced isolation (for development).

When Wardn is on the same machine (localhost), containers cannot reach it by that name. On Linux the runner puts test containers on the host's network; on macOS and Windows it uses the engine's host.docker.internal name. Pass --network or --callback-url to choose yourself.

Where it runs: the machine's operating system

Install Docker Engine (https://docs.docker.com/engine/install/) and let your user use it:

sudo usermod -aG docker $USER      # then log in again

Or install Podman and pass --engine podman. The runner copies itself into each test container as the test agent, so on Linux there is nothing more to fetch.

The container engine

If no engine is found the runner stops before it registers anything and tells you what to install for your system. If one is installed but not running, it says to start it (Docker Desktop, colima start, systemctl start docker) instead.

How a test runs

Each claimed run is one container, made from the suite's image. The runner puts a Linux build of wardn in it as the test agent, which runs the suite's command, collects the results and reports them straight to Wardn with the run's own token. The container is removed when the run ends. The runner pulls images with the credentials the run carries, in a throwaway directory, never your own Docker login.

The test sandbox

A test container is kept to a tests policy: it may reach the deployment under test, the hosts its suite lists under Settings, Sandbox, Other hosts, Wardn and the artifact bucket, and nothing else. It cannot reach the internet, the cloud's metadata address, the Kubernetes API, a host nobody listed, or the engine's socket. It runs as a user with no rights, with all capabilities dropped, no-new-privileges, a read-only root, a temporary directory that vanishes with the container, no mounts from your machine beyond its own workspace, and the suite's CPU and memory limits (2 CPUs and 4 GB when it sets none).

On a container engine the runner makes the shape the machine agents use: an internal network with no route out, and a small egress proxy container on it, built from the suite's own image with the test agent in it. The proxy answers to the names the policy lists, forwards only to those places and refuses a name that resolves to a link-local address. Test containers need no proxy settings. An address in a policy is reached by a name the runner gives it, such as ip-10-1-2-3.sandbox.wardn, and WARDN_TARGET_URL is rewritten to it. Everything the run made, containers, network and volumes, is removed when it ends.

A worker reports how much of this it can enforce, and Workers shows it: hardened when the engine can make an internal network, reduced with the reason when it cannot (or when it was started with --sandbox off). A suite whose Sandbox setting is Isolated required (the default) is refused on a reduced worker, with the reason; Allow reduced isolation runs it there anyway.

The sandbox reaches a server on the same machine through the engine's host.docker.internal name, so the server must listen on a non-loopback address. For a development server that listens only on 127.0.0.1, start the runner with --sandbox off and let the suite allow reduced isolation.

In a cluster the same policy is a NetworkPolicy the operator makes for the run's pod, owned by its Job, plus a pod that runs as a user with no rights from a read-only root with no service account token. The cluster's network must enforce NetworkPolicy; the operator refuses the run, with the reason, when it cannot make the policy and the suite requires isolation.

Keep it running: a service

wardn runner start --service

This registers the runner, then installs it to start with the machine and keep running when you log out. It never puts a credential on a command line: the service reads its own worker token from a private file, and does not need your login.

SystemWhat is installedLogs
Linux, as rootA systemd service running as a dedicated wardn-runner account, which is added to the docker group if there is one. State is in /var/lib/wardn-runner.journalctl -u wardn-runner -f
Linux, as a personA systemd user service. Run sudo loginctl enable-linger $USER so it survives logging out.journalctl --user -u wardn-runner -f
macOSA launchd agent space.wardn.runner that starts when you log in.wardn runner logs
WindowsA Windows service wardn-runner, started automatically. Run it from an elevated prompt.wardn runner logs
wardn runner status      # is it running, and what does Wardn see of it
wardn runner logs -f     # follow its log
wardn runner stop        # stop the service, or the process in another terminal
wardn runner uninstall   # remove the service; add --remove to delete the runner in Wardn too

The service keeps its own copy of wardn in the runner's directory, so moving or deleting the file you installed from does not stop it. Run wardn runner start --service again after updating the CLI to update it.

Run a suite from the command line

wardn test run smoke --on shop-staging --wait

smoke is the suite's name (or app/suite, or its id) and shop-staging is the deployment's name or id. It queues a run, prints where to follow it, and with --wait follows it until it ends, then exits non-zero unless it passed, so it can gate a script:

Queued smoke on shop-staging: https://wardn.example.com/tests/runs/0195e8a0-...
10:44:01  queued
10:44:04  running on build-box
10:44:51  passed on build-box (14 passed, 0 failed, 0 errored, 0 skipped)

--runner build-box sends the run to that runner, --env NAME=value sets a variable for this run only, and wardn test runs lists the newest runs.

Run agents in a cluster

Agents run in your clusters. Install the agent runtime with the cluster's kubeconfig, the way wardn cluster connect installs the operator:

wardn agents enable --cluster prod-eu --model-key-file ./model-key

It makes the cluster's runtime token in Wardn and installs, in the wardn-agents namespace, a runtime pod that dials out to Wardn and holds your model key, and sandbox pods that run each job with no route out except through the runtime. The token goes into a Secret, never an argument. The model key stays in a Secret in that cluster, and Wardn only ever sees its fingerprint. Give the key as a file (- reads standard input), an environment variable (--model-key-env), or the name of a Secret you already have (--model-secret).

The runtime finds the gateway from the operator that wardn cluster connect installed; pass --gateway-url if there is none. wardn agents enable waits for the runtime to connect and pass its sandbox self-test, and the cluster then shows under Agents, Fleet.

wardn agents status --cluster prod-eu    # the cluster's runtimes and their self-test
wardn agents disable --cluster prod-eu   # revoke them and remove the runtime

The sandbox is only isolated if the cluster's network enforces NetworkPolicy. If it does not (kind's default does not), the self-test fails and no job runs. For a development cluster only, --selftest-advisory reports that failure as a pass.

Run agents on a machine

wardn runner start --agents --name build-box \
  --gateway-url https://gateway.wardn.example --model-key-file ./model-key

--agents mirrors the in-cluster design on your container engine. The runner makes two networks: an internal one with no route out, and one the runtime reaches Wardn and the model through. It starts a runtime container on both and sandbox containers (--sandboxes, one job each) on the internal network only. The only way out of a sandbox is the runtime's reverse proxy, which carries the agent's MCP calls and model calls and refuses anything a job did not declare.

Before it starts anything it checks that the isolation holds: the sandbox network must be internal, and a container on it must fail to reach the internet, the cloud metadata address and the host. If it cannot enforce that, it says why and starts no agents. Sandboxes run as a user with no rights, with all capabilities dropped, no-new-privileges, a read-only root, temporary directories that vanish with the container, no mounts from the host and no engine socket.

The model key is read from --model-key-file (- for standard input) or --model-key-env, kept in a private file beside the runner's state, and written into a volume only the runtime reads. It is never an argument and never sent to Wardn; Wardn sees only its fingerprint. The runtime's token comes from Wardn when you start, the way wardn agents enable gets it.

The machine appears in Agents, Fleet (and in the cluster list as a development cluster named after the runner) as a runtime with its self-test and slots. Pausing an agent stops its running job within seconds. --tests=false makes a runner that only runs agents. Ctrl-C removes the containers, networks and volume it made.

FlagMeaning
--gateway-urlThe address a container on this machine reaches Wardn's gateway at. A gateway that listens only on localhost is not reachable from a container.
--gateway-ca-fileThe CA certificate of a gateway signed by Wardn's own CA.
--allow-private-hostA host with a private address the runtime may dial, when Wardn is on a private network.
--runtime-image, --sandbox-imageThe images. They default to ghcr.io/future-pirate-king/agent-runtime and agent-sandbox at the CLI's version; WARDN_IMAGE_NAMESPACE changes the namespace. The sandbox image is the launcher alone: to run an agent whose runtime is Claude Code, Codex or Hermes, pass the matching agent-claude-code, agent-codex or agent-hermes image from the same namespace as --sandbox-image.

Any agent of your organization may be placed on this machine, not only yours. Restricting a machine to its owner's agents is not available yet.

Troubleshooting

You seeWhat it means
not logged in: run wardn loginThe CLI has no token for this server. Run wardn login --server ....
you may not connect a runner: ... testworker:connectYour role does not let you register a worker. Ask an organization admin.
a worker with that name already existsAnother machine registered that name. Use --name, or --replace to take it over.
no container engine is availableInstall or start Docker or Podman; the message lists the steps for your system.
has no published Linux build yetOn macOS or Windows the release's Linux build is not at get.wardn.space. Pass --test-agent-binary.
Runs stay queuedThe runner is offline, has no free slot, or the suite targets another group. See Testing, Workers.

On this page