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

# Quickstart: train with four nodes on one machine

> Learn how to run a complete four-node Dromeus training run on one computer in five steps, using the bundled AXL network node and the example task.

In this quickstart you train the example regression model with four Dromeus nodes, each beside its own AXL node, on one computer. It takes a few minutes and needs no network setup. By the end, all four nodes have committed 20 training rounds and agree on one run manifest.

## Prerequisites

* Linux (x86\_64 or aarch64) or macOS on Apple silicon. On these platforms Dromeus installs a pinned AXL build, so you don't need Go.
* [Git](https://git-scm.com/downloads) and [uv](https://docs.astral.sh/uv/getting-started/installation/).

## Run it

**1. Install Dromeus**

Clone the repository and create its environment. `bootstrap` creates a Python environment (3.11 or later) in `.venv` with PyTorch, Dromeus and the bundled AXL node.

```bash theme={null}
git clone https://github.com/devesh1011/dromeus.git
cd dromeus
./scripts/bootstrap
```

Run the remaining steps from the `dromeus` directory, in one terminal.

**2. Write the data and the shared draft**

```bash theme={null}
source .venv/bin/activate
python examples/quickstart/make_data.py runs/quickstart
dromeus draft runs/quickstart/draft.yaml --task examples.custom_training:task \
  --run-id quickstart --participants 4 --rounds 20 --local-steps 10
```

Each node gets its own records, `data-0.npz` to `data-3.npz`. The draft is the group's agreement: the model, task, loss, optimizer, number of rounds, and the Dromeus, PyTorch and AXL versions. In a real group, one person writes it and sends the file to everyone else.

**3. Start four AXL nodes**

```bash theme={null}
for i in 0 1 2 3; do
  dromeus-axl -config examples/quickstart/axl-$i.json > runs/quickstart/axl-$i.log 2>&1 &
done
sleep 5
dromeus doctor --config examples/quickstart/node-0.yaml
```

`axl-0.json` listens for peers on `127.0.0.1:9101`. The other three connect out to it, the way nodes behind a NAT would. Each node serves its HTTP bridge on its own port, 9201 to 9204.

`dromeus doctor` checks that node 0 is ready. Every line should read `ok`, except possibly the clock, and the peers line should say `connected to 3 peer(s)`.

**4. Train**

```bash theme={null}
nodes=()
for i in 0 1 2 3; do
  DROMEUS_LOCAL_DATA=runs/quickstart/data-$i.npz \
    dromeus run --config examples/quickstart/node-$i.yaml \
    --task examples.custom_training:setup > runs/quickstart/node-$i.log 2>&1 &
  nodes+=($!)
done
dromeus watch --run-root runs/quickstart/node-0
wait "${nodes[@]}"
tail -n 1 runs/quickstart/node-*.log
```

Node 0 is the initiator. It writes `runs/quickstart/invitation.json`, and the three participants read it from the same path. On separate machines you would copy that file to each participant.

`dromeus watch` follows node 0 round by round: the training loss on its own records, the error on a public holdout, the round time and this round's peer, then the distance between the nodes' models. Your numbers will differ:

```text theme={null}
round    19  loss 0.001531  mae 0.0482  rmse 0.07429  0.1s  peer fb3a99c5
round    19  consensus distance 0.01584
run complete: 20 rounds committed
```

Every node's log ends with `run quickstart complete: 20 rounds committed` and the same manifest hash.

**5. Stop the AXL nodes**

```bash theme={null}
pkill -f 'examples/quickstart/axl-'
```

A run keeps its state in its `run_root`. To run again, delete it with `rm -rf runs/quickstart` and start over from step 2.

## What just happened

1. Each node checked the shared draft against its own task and installed versions before touching the network.
2. Node 0 formed the group and wrote the invitation. The participants joined with it, and all four agreed on a sealed run manifest.
3. In each round, every node took 10 optimizer steps on its own records, then exchanged a NoLoCo update with one scheduled peer through AXL. Nodes 1 to 3 had no direct link to each other: AXL routed their traffic through node 0.

## Next steps

> [card] [How Dromeus works](https://dromeus.mintlify.site/concepts/how-it-works.md)
>
> The group, the draft and what happens in a round.

> [card] [Define a training task](https://dromeus.mintlify.site/guides/define-a-task.md)
>
> Train your own model instead of the example.

> [card] [Run across machines](https://dromeus.mintlify.site/guides/axl-setup.md)
>
> Set up AXL with a stable identity, a public bootstrap peer and nodes behind NAT.

> [card] [Monitor a run](https://dromeus.mintlify.site/guides/monitoring.md)
>
> Follow rounds, loss and model agreement.


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