# Add machines and GPUs

Connect more machines so your applications have more places to run. Saylek sends each
request to one machine that serves the model it asks for.

## 1. Connect another machine

1. In [Machines](/machines), choose **Connect a machine** and name it.
2. Choose the machine's platform and run the command shown in a terminal on that machine. On
   Windows, use your WSL2 terminal, not PowerShell.
3. The terminal shows a short code. Check that it matches the code in the browser, then
   choose **Approve**. If it does not match, choose **Deny**.
4. Give the machine a model: connect a runtime it already runs, as in
   [Use the models you already serve](/docs/use-your-existing-runtime), or start one, as in
   [Start without a runtime](/docs/start-without-a-runtime).

From the terminal instead, run this on the new machine. It signs in through your browser:

```bash
curl -fsSL https://saylek.com/install.sh | sh -s -- --connect
```

**You know it worked when** the machine appears in [Machines](/machines) with its models
available, and its page shows **Online**. `saylek machines list` lists it under your machines.

## 2. Choose the GPUs in a machine that has several

On the machine's page, choose **Settings**, then under **Graphics cards** choose **Change**, tick the cards Saylek may
use, and choose **Apply changes**. If the page then asks you to restart, restart Saylek on
the machine, not the computer: run `saylek stop`, then `saylek start`. Until then it keeps
running models on the cards it started with. If the page says placement was fixed when
Saylek started, the change applies to sharing only. On a Mac, the GPU shows as
**Shared automatically**. From the terminal, `saylek gpu wizard` makes the same choice.

## How requests spread across machines

- **One machine runs each request.** Saylek picks among the online machines you can use that
  serve the model the request names, by how busy and how fast each one is.
- **Spreading needs the same model.** Two machines share the load for a model only when both
  serve it under the same model id. Check with the models list for your key.
- **Machines do not combine their memory.** A model has to fit on one machine. Adding a machine adds
  places to run; it does not make one GPU bigger.

## Stop or remove a machine

| To | In the web | From the terminal |
|---|---|---|
| Stop requests from the people you share with | Turn off **Share from this machine** on the machine's page | `saylek host stop`, and `saylek host start`, on the machine |
| Stop every Saylek request to it, your own keys included | Terminal only | `saylek host pause --machine <id>`, and `saylek host resume --machine <id>` |
| Stop Saylek on the machine, your own work included | Terminal only | `saylek stop` |
| Remove it from your account, for good | **Remove machine…** in the machine's settings | `saylek machines remove --machine <id> --confirm FORGET` |

A removed machine comes back only by setting it up again, with a new identity.

## If something goes wrong

| What you see | What to do |
|---|---|
| The browser keeps waiting for the machine | Choose **Check again**, or **Start a new setup** and run the new command |
| The codes do not match | Choose **Deny**, then start a new setup |
| The machine shows **Offline** | On the machine, run `saylek status`; start Saylek as [Quickstart](/docs/quickstart) step 2 describes |
| A second machine gets no requests | It may not serve the same model id. Compare `saylek models` on both machines |

## Reference

- [Make more of one GPU](/docs/make-more-of-one-gpu): models, memory and shared work on one machine.
- [Sharing your models](/docs/share-your-models): sharing, pausing and stopping.
- [CLI reference](/docs/cli-reference): every command.
