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

# Run one fleet across machines

> Point two or more machines at one shared store, so one backlog board and one agent chat cover every machine.

> After this page, you can run one fno fleet across two or more machines. The same backlog board covers every machine. A node builds on exactly one machine. Agent mail crosses machines.

Two machines that share a store act as one fleet. Each machine dials out to one libSQL server, the primary. libSQL is the SQLite-compatible database engine the store runs on. No machine accepts a connection from another, so the machines need no shared file system. The primary holds the dispatch claims, and the claims decide which machine builds which node.

A few words this page uses:

* **Machine**: one computer that runs fno and has its own `~/.fno` directory.
* **Store**: the database the fleet shares. It lives on the primary.
* **Primary**: the one machine that runs the store for everyone else.
* **Claim**: the lock that says "this node builds here". Claims decide dispatch.
* **Node**: one item of work on the backlog board.
* **Daemon**: a small fno background process on each machine. It syncs the store. The store also rewrites old data in the background to keep the file small. That rewrite is compaction.
* **Mux**: fno's terminal multiplexer, the screen where you watch your workers.

This page is about your own machines on one private network. It is not about sharing an epic with a second person over GitHub, and not about opening another machine's terminal in your mux. Those live in [Share an epic](/docs/guides/share-an-epic.md) and [Use one mux across your machines](/docs/guides/mux-remote-sessions.md).

## Before you start

* fno 0.4.1 or later on every machine. The shared store ships in 0.4.1. Check with `fno --version`, which prints one line like `fno 0.4.6`.
* Docker on the machine that will run the primary. No other machine needs it.
* Two or more machines that reach each other over a private network, such as Tailscale. The primary needs a stable Tailscale name, which `tailscale status` prints. Your tailnet name is the part after the host in a machine's full name, such as `tailnet.ts.net` in `desk-o5f.tailnet.ts.net`.
* Agent mail, for machines that message each other. It needs only `store.remote_url`, not the shared backlog. See [Message agents](/docs/guides/message-agents.md).

## How the fleet shares one store

The keys live in the global config, `~/.fno/config.toml`, one file per machine. They never enter git, and a project config cannot set them.

| Key | What it does |
| - | - |
| `store.remote_url` | The primary's URL. Unset means each machine works alone. |
| `store.share_backlog` | `true` moves the backlog board to the primary too. Needs `remote_url`. Off by default. |
| `store.remote_token` | Optional bearer token, sent with every request. |
| `store.remote_addrs` | Optional list of the primary's IPs, tried in order when the host name does not resolve. |

## Set up the primary

Pick one machine to hold the primary. Get its Tailscale IPv4 address:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
tailscale ip -4
```

This prints one address, such as `100.101.102.103`. Copy it. The store must never reach a LAN or the public internet, so the container binds to that one address.

> **Warning:** Run the primary on a private network such as Tailscale, and never on a LAN or a public address. Anything that reaches the store can write every row on it.

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
docker run -d --name fno-sqld \
  -p 100.101.102.103:18080:8080 \
  -e SQLD_NODE=primary \
  -v "$HOME/fno-sqld:/var/lib/sqld" \
  ghcr.io/tursodatabase/libsql-server:latest
```

Replace `100.101.102.103` with your address from `tailscale ip -4`. On a Mac with Docker Desktop, remove the `-v` line before you run this. This guide does not test whether Docker Desktop's Mac folder mount passes the store's rewrite. Without the `-v` line the data stays on the Linux virtual machine's own disk. On a Linux host, keep the line: ext4 passes it. The command prints one long container id. Check that it runs:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
docker ps --filter name=fno-sqld
```

You see one row named `fno-sqld` with the status `Up`. The container starts empty. The first claim creates the tables.

The store rewrites an internal file in the background, and that rewrite needs a file system that supports the `RENAME_EXCHANGE` flag. A mounted Mac folder can fail that rewrite later, not at startup. Without the `-v` line the data survives container restarts. It does not survive `docker rm -f fno-sqld`.

### Serve it over https

Plain `http://` carries the token and every row in clear. Fine inside a tailnet you control. For a real fleet, serve the primary over `https://`. Your tailnet needs MagicDNS and HTTPS certificates enabled, both switches in the Tailscale admin console. If the plain container from the last section still runs, remove it first with `docker rm -f fno-sqld`. The data does not carry over, so you seed again in a later step.

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
docker run -d --name fno-sqld \
  -p 127.0.0.1:18080:8080 \
  -e SQLD_NODE=primary

tailscale serve --bg --https=443 http://127.0.0.1:18080
```

This block drops the `-v` line: the data stays inside the container's own Linux storage. Check the serve rule:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
tailscale serve status
```

The list shows the new rule, pointing `https` at `http://127.0.0.1:18080`. The serve command gives the primary a certificate for its `ts.net` name. Its URL becomes `https://<primary-host>.<tailnet>.ts.net`, with no port.

## Join each machine

A machine that is running workers right now must finish or stop them first. Its claims sit in the local store, and they never reach the primary. Check what it holds:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents claim list
```

A new install prints none. A list with rows means workers still run: stop each one with `fno agents stop <worker-name>`, or wait for it to finish, until the list prints none. Then run this on each machine, including the one that runs the primary:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno config set store.remote_url http://primary-host:18080
```

Replace `primary-host` with the primary's Tailscale host name, the name `tailscale status` prints for it. The command prints the value it wrote:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
set store.remote_url = http://primary-host:18080 (global: /Users/you/.fno/config.toml)
```

With the `https://` setup from the last section, use that URL instead:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno config set store.remote_url https://primary-host.tailnet.ts.net
```

A value that is not an `http://` or `https://` URL refuses on the spot:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
store.remote_url = "not-a-url": only http:// and https:// URLs are supported
```

> **Note:** The store in this guide accepts any writer that reaches it. The network is the guard. fno also supports per-machine tokens, but token auth needs setup on the primary that this page does not cover. Skip `store.remote_token` unless you have already set that up.

If a host name does not resolve, give the client the primary's IP as a fallback:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno config set store.remote_addrs '["100.101.102.103"]'
```

Restart the daemon after the key lands, because it reads the key once, at startup:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents restart
```

The restart prints what it did, and a refusal prints its reason. A machine that skips this step still works in the terminal, but its background sync waits for the next daemon restart.

## Share the backlog

With `store.remote_url` set and `store.share_backlog` off, the machines share dispatch only: each machine keeps its own board. Set both keys on each machine for one board everywhere:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno config set store.share_backlog true
```

Then seed once, from the machine whose board the fleet keeps:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents claim backlog seed
```

The receipt names each table and its row count. It refuses a primary that already holds a board:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
claim backlog: the primary http://primary-host:18080 already holds a seeded backlog; run `fno agents claim backlog sync` instead
```

On every other machine, pull the board down:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents claim backlog sync
```

The receipt prints `snapshot: true` on the first pull. That pull replaces the machine's own board with the primary's, and keeps a backup of the old board beside the store. The machine you seeded from runs nothing else. From now on, pick any node from `fno backlog list` and `fno backlog get <TASK_ID>` answers on every machine.

## Check that the fleet answers

Run this on any machine:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents claim backlog probe
```

A healthy primary prints one JSON line, with the read and write round trips in milliseconds:

```json theme={"theme":{"light":"min-light","dark":"min-dark"}}
{"primary":"http://primary-host:18080","tables":110,"read_ms":33,"write_ms":25,"change_log":{"first_seq":28563,"last_seq":28844,"oldest_at_ms":1793959242576,"recent_avg_batch_bytes":4297}}
```

Your numbers will differ. The shape is what matters: a `read_ms` and a `write_ms` mean this machine reaches the store.

Try cross-host mail while you are here. From this machine, send a message to an agent on another machine:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents mail send <name>@<other-host> "Checking the cross-machine lane"
```

Replace `<other-host>` with the other machine's Tailscale host name. Replace `<name>` with the name of an agent on that machine: run `fno agents list` there to see the names. The receipt tells you how far the message got. See [Message agents](/docs/guides/message-agents.md) for the receipt fields.

## What the fleet shares, and what stays local

These facts are the same on every machine in the fleet:

* The dispatch claims. If two machines reach for one node at once, it still builds on exactly one machine.
* The backlog board. Set `store.share_backlog = true` and one board covers every machine.
* Cross-host mail. Address an agent on another machine as `<name>@<host>`, and the row waits for that host. This works with `store.remote_url` alone.
* Review attestations. A review recorded on one machine covers a merge on another.
* Open questions. A question asked on one machine shows on every machine.
* The plan bodies of open nodes.

These facts stay on each machine:

* The agent registry and the roles.
* The event store.
* The worktrees and the credentials, including harness logins.
* The rest of the config.

## Limits to know

* **The private network is the boundary.** Anyone who can reach the store can write any row on it. Keep the primary on the tailnet.
* **One primary per fleet.** A machine points at exactly one `store.remote_url`.
* **Tokens are not permissions.** A token names the machine that sent a request. It does not narrow what that machine can write.
* **A machine offline past its lease loses its claims.** The lease is 10 minutes, renewed while the machine works. A peer takes the node, and the returning machine is told who took it.

## Refusals and fixes

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
resolve <host>: no such host
```

The primary's name did not resolve. Set `store.remote_addrs` to the primary's Tailscale IP, or fix the name.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
backlog write refused by the shared primary: the nodes row on the primary no longer matches this machine's copy.
```

Another machine changed the same row first. The primary keeps its version, and this machine takes that row back. Your change to that row was not kept. If you still want it, make it again. Nothing else in the batch is lost.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
failed TLS
```

The store's certificate is not one your system trusts. Check the `tailscale serve` line, and use the `https://<primary-host>.<tailnet>.ts.net` URL.

## Next steps

* [Move a live session to another machine](/docs/guides/move-a-session.md): carry a running worker to another machine instead of stopping it.
* [Use one mux across your machines](/docs/guides/mux-remote-sessions.md): open another machine's session in a portal and type to it.
* [Message agents](/docs/guides/message-agents.md): reach an agent on another machine with its `<name>@<host>` address.
* [Command page](/docs/guides/command-page.md): read the whole fleet's state in a browser.


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