> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reliantlabs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose which machine runs each workflow step

> Send a whole workflow, or one step of it, to a machine you choose with daemon:, by name, by kind or by label, and check where each step actually ran.

By the end of this guide a workflow runs where you tell it: the whole thing on one machine, and any step on a different one. Use it to run a slow test suite on an always-on server while you work on your laptop, or to send one step to a machine with a GPU.

A workflow, or any node in it, takes a `daemon:` field. When a run has to choose, the most specific instruction wins: the node's `daemon:`, then the workflow's, then the machine the chat or automation runs on, then your default machine ([choosing a machine in workflows](https://docs.reliantlabs.io/machines/choosing.md)).

## Before you begin

* A workflow in your project's `.reliant/workflows/` ([create a workflow](https://docs.reliantlabs.io/guides/create-a-workflow.md)).
* The machines you want to use, connected to your account ([connect your computer](https://docs.reliantlabs.io/guides/machines/connect-computer-as-machine.md), [cloud machines](https://docs.reliantlabs.io/machines/cloud.md)).

**1. Find each machine's name and kind**

Open **Settings → Machines**. A `daemon:` can name a machine by its name, its hostname or its id. Each machine is also one of two kinds:

* `local`: a daemon you run yourself, on a laptop, a workstation or a server you own.
* `cloud`: a Reliant cloud machine.

The kind follows who runs the daemon, not where the computer is: a rented server running `reliant daemon start` is `local`.

**2. Send the whole workflow to one machine**

A top-level `daemon:` applies to every node. Here every step runs on the server named `build-box`:

```yaml .reliant/workflows/nightly-suite.yaml theme={null}
name: nightly-suite
description: Run the slow test suite on the build server, then the benchmark on a GPU machine
entry: [suite]
daemon: build-box

nodes:
  - id: suite
    type: run
    command: make test-all
    timeout: 1h
```

`local`, `cloud` and `any` are kinds. Any other string is a machine's name, hostname or id.

**3. Send one step somewhere else**

A node's own `daemon:` overrides the workflow's. Add a benchmark step that runs on a connected cloud machine labelled `gpu=true`, and a message for when the suite fails:

```yaml .reliant/workflows/nightly-suite.yaml theme={null}
  - id: bench
    type: run
    daemon:
      type: cloud
      labels:
        gpu: "true"
    command: make bench
    timeout: 30m

  - id: suite_failed
    type: save_message
    outcome: failure
    args:
      role: assistant
      content: "The suite exited {{nodes.suite.exit_code}}; the benchmark did not run."

edges:
  - from: suite
    cases:
      - to: bench
        condition: nodes.suite.exit_code == 0
    default: suite_failed
```

A selector can hold `id`, `name`, `type` and `labels`, and every field you give must match. On a `run` node, `daemon:` decides where the command runs; on an agent node, where that agent's tools run. The value can also be a CEL expression such as `"{{ inputs.where }}"`.

> [!NOTE]
>
> Labelling a machine (`reliant daemon start --label`, `reliant machine label`) needs reliant v1.23.0 or later; check with `reliant --version`. Labels are checked only against connected machines. When none of them matches, the step can fall back to a machine that matches the selector's other fields, so give a `type` or `name` you would accept.

**4. Validate the workflow**

```bash terminal theme={null}
reliant workflow validate .reliant/workflows/nightly-suite.yaml
```

```text terminal theme={null}
  ✓ nightly-suite.yaml (nightly-suite)
...
✅ All workflows valid
```

Validation checks the selector's shape. A misspelled field fails with `unknown daemon selector field: "label"`. It can't check that `build-box` exists, so a wrong name only shows when the run reaches the step.

**5. Check where each step ran**

Run a workflow whose steps record their hostname. Replace `build-box` with your machine's name; the node uses the selector form to show that every field must match:

```yaml .reliant/workflows/where-it-runs.yaml theme={null}
name: where-it-runs
description: Record which machine each step runs on
entry: [default_step]
daemon: build-box

nodes:
  - id: default_step
    type: run
    command: echo "default_step ran on $(hostname)" | tee -a ran-on.txt
    timeout: 1m

  - id: pinned_step
    type: run
    daemon:
      name: build-box
      type: local
    command: echo "pinned_step ran on $(hostname)" | tee -a ran-on.txt
    timeout: 1m

edges:
  - from: default_step
    default: pinned_step
```

`--daemon` sets the run's own machine, the level below the workflow's `daemon:`:

```bash terminal theme={null}
reliant workflow run where-it-runs --project-path "$PWD" --daemon build-box --follow
cat ran-on.txt
```

```text terminal theme={null}
{"event":"node_completed",...,"node_id":"default_step",...,"exit_code":0}
{"event":"node_completed",...,"node_id":"pinned_step",...,"exit_code":0}
{"event":"workflow_completed",...,"workflow_name":"where-it-runs",...}
default_step ran on build-box
pinned_step ran on build-box
```

The same run with `type: cloud` failed the step, because that machine is `local` (see Troubleshooting).

## What this does not do

* **It doesn't move your files.** Each machine has its own copy of the project. A step on another machine runs in that machine's checkout, so it sees what was pushed and pulled there, not uncommitted edits from the chat's machine. A machine without the project fails the step with `<project> isn't checked out on <machine>`.
* **It doesn't follow a branched chat's workspace.** That workspace exists only on the machine that created it. A node that names another machine doesn't see it.
* **It can't run without a machine.** A workflow with a `daemon:` anywhere can't be a [no-machine run](https://docs.reliantlabs.io/automations/no-machine-runs.md).
* **It doesn't check a node's machine up front.** A run waits for its workflow-level machine when it starts, and wakes it if it is a suspended cloud machine. A node's own machine gets no such check: a `run` step whose machine is offline waits up to 30 minutes for it to connect, then fails.

## Troubleshooting

> [accordion] the machine this request asked for is not connected
>
> The step's selector matched none of your connected machines. The step fails with `this run's machine no longer exists; the command never ran`, even though nothing was removed. Check the spelling of the name, and that `type` matches the machine's kind: a server you run the daemon on is `local`.

> [accordion] unknown daemon selector field
>
> A selector holds only `id`, `name`, `type` and `labels`. Fix the field name and validate again.

> [accordion] no machine has synced this project's workflows yet
>
> `--project-path` created the project a moment ago, and its machine hasn't sent the project's workflows to Reliant yet. Wait a minute and run the command again.

> [accordion] the machine for this request is suspended and will wake when you next message it
>
> The step's machine is a suspended cloud machine. Send a message in the chat, or click **Resume** in **Settings → Machines**.

## Next steps

> [card] [Choosing a machine in workflows](https://docs.reliantlabs.io/machines/choosing.md)
>
> The resolution order, automations, and machine status.

> [card] [Fix an offline machine](https://docs.reliantlabs.io/guides/machines/troubleshoot-offline-machine.md)
>
> When the machine a step needs isn't connected.

> [card] [Run the daemon on your own server](https://docs.reliantlabs.io/guides/machines/run-agents-on-your-own-server.md)
>
> An always-on machine to pin long jobs to.

> [card] [How a tool call reaches your machine](https://docs.reliantlabs.io/deep-dives/how-tool-calls-reach-your-machine.md)
>
> What happens between the run and the machine.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.