Last updated 2026-05-07

Connecting to the Runner

The dashboard's server-side API routes always assume the runner is reachable at http://localhost:4800. Both processes are designed to run on the same machine.

Dev mode

# Terminal 1
stax runner start --workspace /path/to/repo
# Terminal 2
stax dashboard
# or:
cd platform/web && pnpm dev

Visit http://localhost:3000. The dashboard confirms a healthy connection via the /api/health badge in the topbar.

SSE

The dashboard subscribes to the runner's /api/events SSE stream from the browser via EventSource. Connections are long-lived; on reconnection the dashboard re-fetches the current run state. The runner CORS-allows any origin, so this works without a proxy.

const events = new EventSource('http://localhost:4800/api/events');
events.addEventListener('step.log', (e) => {
const { runId, jobId, stepNumber, line } = JSON.parse(e.data);
appendToLog(runId, jobId, stepNumber, line);
});

Different host or port

If you've moved the runner to a different host or port (because of port conflicts, or to point the dashboard at a remote machine), set RUNNER_URL in the dashboard's environment before starting it:

RUNNER_URL=http://10.0.0.5:4800 cd platform/web && pnpm dev

Multi-runner setups

To work on multiple repos at once, run the runner on a different port per repo (see Runner configuration → Multi-workspace setups) and run a separate dashboard instance against each.

Endpoints the dashboard consumes

ViewRunner endpoint
Workflow listGET /api/workflows
Workflow trigger formGET /api/workflows/:name + POST /api/runs
Run listGET /api/runs
Run detailGET /api/runs/:id
Live logsGET /api/events (filter step.log)
Full logsGET /api/runs/:id/logs
ArtifactsGET /api/runs/:id/artifacts + :name
Secrets managementGET /api/secrets, PUT, DELETE
HealthGET /health