Station
Last updated on November 20, 2026
A station is the CLI running unattended on a physical test bench. Each station has its own credentials, pulls Deployments from a linked Git repo, executes Procedures, and streams every Run back to the dashboard.
Register a station
To register a station, you create it in the dashboard and then install on the test machine. The install command embeds a one-hour setup token, and the CLI exchanges it for long-lived credentials on first boot.
Open Stations > New Station, name it, and copy the install command.
Run the command on the test machine.
curl -fsSL https://www.tofupilot.app/install | sh -s -- --token <SETUP_TOKEN>$p = "$env:TEMP\tp-install.ps1"; irm https://www.tofupilot.app/install.ps1 -OutFile $p; powershell -ExecutionPolicy Bypass -File $p --token <SETUP_TOKEN>; ri $p -EA 0Link procedures to the station from the dashboard.
The setup token expires one hour after issue, so when it expires, generate a new one from the station's row in the dashboard.
Metadata
Metadata follows PATCH semantics, so omitted keys are preserved and null deletes a key.
- Up to 50 keys per station.
- Keys: 1-40 chars,
^[a-zA-Z0-9_.:+-]+$. - Values:
string(max 50000 chars),number, orboolean. The type is auto-detected.
The station detail page exposes the metadata editor, and every change is recorded in the station activity.
Environment variables
Values that differ per bench, such as an instrument address, are station environment variables, set in the station page's Environment Variables section or with tofupilot env --station. A Config feeds a procedure's config: key, a Secret its secrets: key. Station metadata describes the station; environment variables are read by the procedures it runs. See How to Configure Station Variables with TofuPilot.
API
Stations are exposed at /api/v2/stations with create, list, get, update, and remove. See the REST API reference for the full surface.
from tofupilot.v2 import TofuPilot
client = TofuPilot()
station = client.stations.create(name="Test Bench #1")| Field | Required | Description |
|---|---|---|
name | Yes | 1-60 characters. |
procedure_id | No | Link the station to a procedure at creation. |
metadata | No | Key/value pairs, up to 50 keys. See Metadata. |
| Endpoint | Response |
|---|---|
create | { id } |
get | id, name, api_key, procedures (each with id, name, runs_count, deployment), organization_slug, team, metadata |
list | data[] of { id, name, procedures (id, name), procedures_count, team, metadata (with include_metadata=true) }, plus meta.has_more and meta.next_cursor |
Linked procedures
A station can be linked to one or many procedures, and deployment rollout only reaches stations with the procedure linked.
When you unlink a procedure, new deployments stop, but runs in flight finish against the version they started with.
Deployment updates
A station checks its deployments when it starts, when its link to the dashboard comes back, and every 15 minutes, on top of the update the dashboard sends after each build. A deployment that arrives during a test is installed once the test ends, and a test started during an install waits for it to finish.
A network failure during a check is retried within minutes. An install that cannot reach its package index is retried within minutes up to three times in a row. After that, and for any other install failure, the deployment is tried again after 15 minutes, then less often, up to every 6 hours, until it is pushed again. To retry at once, click Pull now in the procedure's menu on the station's page.
A run started with tofupilot run --deployment by another program keeps its folder: a new deployment of that procedure is installed at the first check after that run ends, within about 15 minutes.
Logs
The station writes its log where the operating system keeps it:
| System | Where |
|---|---|
| Windows | %LOCALAPPDATA%\TofuPilot\Logs\station.log, with the previous 10 MB in station.log.1 |
| macOS | ~/Library/Logs/TofuPilot/stderr.log |
| Linux | journalctl --user -u tofupilot, or journalctl -u tofupilot for a root service |
Operator UI and uptime
You can open the Operator UI for a station from the Stations tab, and the dashboard shows real-time connectivity, the active deployment, and 90-day uptime history.
Stopping a run
A stop always runs the procedure's teardown phases before the process exits, so an execution-scoped power_off still reaches the bench. The supported stop paths are Ctrl-C or Ctrl-Break in the station's console, SIGTERM on Linux and macOS, tofupilot service stop, and Stop or Exit in the operator UI. For a signal (Ctrl-C, Ctrl-Break, SIGTERM) the first one interrupts the running phases and runs the teardown, a second one within three seconds is ignored, a later second one abandons the teardown still running, and a third exits the process. tofupilot service stop and the operator UI stop run the teardown too. For the TofuPilot framework and OpenHTF, a run stopped by a signal, by tofupilot service stop or by Stop in the operator UI exits with code 130 and is uploaded with outcome ABORTED, and the second signal still releases the plugs and uploads what completed. Exit in the operator UI gives the teardown three seconds, then abandons it the same way and exits shortly after, so the upload of that last run is not guaranteed. An OpenHTF run stopped or killed by the other paths is left without an upload only when its process does not exit within seven seconds of the forced abort, which a plug tearDown that blocks can cause. A TofuPilot framework run the procedure stops itself (phase.stop(), or a then rule ending in stop) is uploaded as ABORTED too, with exit code 3, so a script driving the CLI can tell the two apart.
Closing the console window on Windows is not a supported stop. Windows gives the process about five seconds after the close before it terminates it, and a logoff or shutdown is not delivered to an interactive console program at all. The CLI uses those seconds for a hurried teardown, but nothing guarantees the power-off lands. Fixture safety on the bench has to come from the instrument itself: arm the power supply's output watchdog (OUTP:PROT:WDOG ON with a delay in OUTP:PROT:WDOG:DEL on Keysight supplies) in the setup phase so the outputs trip when the station stops talking to it, whatever ended the process.
Held instrument connections
Plugs declared with scope: station connect once and stay connected across every run on the station — back-to-back units skip the reconnection cost for slow links (VISA sessions, TCP, serial). The instance is health-checked before each run and respawned if the plug definition or deployment changed. See plug scope.
Offline behavior
Stations queue runs locally when offline, and uploads resume when the network returns. See Offline upload for the full lifecycle.
How is this guide?
Kubernetes
Learn how to install TofuPilot on your Kubernetes cluster with the Helm chart, from ingress and TLS to network policies, upgrades and backups.
Remote UI
Watch and drive a running TofuPilot station from the dashboard in real time, fill operator prompts together with the bench, and see who else is on the station.