# Train on your own machine

> Start a runner on your computer. It trains your queued runs, checks robots and runs sim tests, for free.

Prompt for your AI: Read https://mousemouse.ai/docs/train-on-your-machine.md first. Set up a runner on this computer so my queued training runs start here. Ask me before anything that costs money or moves a robot.

A runner is a program on your computer that does the hub's jobs. It trains
runs, checks robots and runs sim tests. Each job you queue for **My
machine** waits until a runner you started picks it up. Running jobs on your
own hardware is free.

[The tutorial](/docs/first-policy) walks this once with screenshots. This page
is the reference for doing it again.

## Start a runner

Every page that queues a job for your machine prints these lines. They are the
same each time, and the last one names the runner:

```bash
curl -fsSL https://api.mousemouse.ai/install.sh | sh -s -- 'cli[rl]'
export PATH="$HOME/.local/bin:$PATH"
lucen auth login
lucen worker run
```

The installer fetches the `lucen` CLI from this hub. It adds MuJoCo and ONNX
Runtime for training, robot checks and sim tests. The packages are not on PyPI,
and the one by that name there is not ours. The installer points the CLI at
this hub. It uses `uv` when you have it, else Python 3.12+ with `venv`. It
cannot change the `PATH` of the shell it was piped into, so the second line
does.

`lucen auth login` asks for an API key. Make one in [API keys](/settings/keys)
with the `train` scope. Only a signed-in browser can create a key, so a leaked
key cannot create another. The CLI stores the key in a file only you can read.

`lucen worker run` takes your queued training runs and trains them here. It
publishes each checkpoint, runs its sim tests and reports back. Leave it
running, and press Ctrl-C to stop it. If a runner dies mid-run, the hub queues
the run again after five minutes without a heartbeat.

## Train on a GPU

The same runner trains on a GPU when the template needs one. **SmolVLA LoRA**
fine-tunes a skill policy on one of your datasets. For it, the training form
prints the installer with `cli[vla]` in place of `cli[rl]`, which adds LeRobot
and PyTorch. The hub does not see your machine. A run trains on whatever
hardware the runner has.

## The other two runners

The same install and the same sign-in run two more kinds of job. A robot check
that waits for you, after you upload a robot on [Add your robot](/robots/new):

```bash
lucen robot worker
```

A sim test started from **Test in sim** on a policy's page:

```bash
lucen rollout worker
```

Each runner takes only the jobs of the account whose key it holds. Running
them costs nothing, because the hardware is yours.

## What runs where, and what it costs

| Capability | Where it runs | Cost |
|---|---|---|
| Browsing robots, policies and datasets, the episode viewer, the Sim tab | this hub, and MuJoCo in your browser | free |
| Adding your robot: uploading, checking, publishing | this hub. The check runs in a cloud sandbox where this hub has one, else on your machine | free |
| Training (**Train a policy**, **Fine-tune**, `lucen worker run`), live logs, sim tests while training | **your** machine (GPU or CPU) | free |
| Training in **Lucen cloud** | CPU templates within a free monthly allowance for every account, GPUs for the accounts it hosts | GPUs billed by the second at the tier's rate |
| Sim tests (**Test in sim**, `lucen rollout`) | your CPU, or Lucen cloud where this hub offers it | free on your machine |
| Connecting, deploying and stopping a robot | the robot runs the policy. The hub records the approval and the signed trail | free |
| The Coach's diagnosis (**Diagnose this run**) | this hub's AI model, where this hub has one | a daily allowance per account |

[Rates](/pricing) lists what Lucen cloud costs by the hour.
