Run a cluster
How do I connect several Macs into one cluster?
Every Mac runs NativeCluster. One is the main: it keeps the group's records and routes each model call to a computer that has the model. Administrators turn on inference on the Macs that should run models, other Macs join with a PIN, and a model too big for one Mac can run split across two joined by a Thunderbolt cable.
Fetch the complete documentation index at https://www.nativecluster.com/llms.txt # How do I connect several Macs into one cluster? > Every Mac runs NativeCluster. One is the main: it keeps the group's records and routes each model call to a computer that has the model. Administrators turn on inference on the Macs that should run models, other Macs join with a PIN, and a model too big for one Mac can run split across two joined by a Thunderbolt cable. ## The computers in a cluster - **The main** keeps NativeCluster's records for the group and runs the cluster: it decides which computer answers each model call, and runs the scheduled work of the apps on it whether or not any other computer is on (an app on a person's own computer keeps its schedules there). It always runs models. A desktop Mac in the office is the usual main. A computer that thinks for people on other computers keeps itself from going to sleep when idle. - **Inference computers** run models for the cluster. Only an administrator's Mac runs models for the cluster. - **Other devices** use the cluster's apps and run no models, such as a laptop with inference off. `nativecluster cluster devices` lists them as the Cluster page does. Since 0.4.23 each computer also says which NativeCluster it runs, so an owner sees one that needs its update. ## Start a cluster On the first Mac, NativeCluster's setup asks the person to sign in, name the cluster (the people they invite will see the name), and choose **The main** or **Just using it**. The person who makes the cluster is its owner. The first Mac needs no PIN. Making a cluster needs the internet once, to register its name. ## Add a computer, with a PIN Every other computer is added with a PIN, the owner's own included: 1. On the new Mac, sign in to NativeCluster, pick the cluster, and choose **Ask to join**. The Mac must be on the office network with the main, or joined to it by a Thunderbolt cable. 2. Every owner and administrator sees the request. **See the PIN** shows six digits. They read them to the person in person or on a call, and only if they know it's them: a computer's name is whatever its owner typed. 3. The person types the six digits on the new Mac. A PIN works for ten minutes, or until a few wrong tries. An administrator's Mac is then asked **What will this Mac do?**: **Inference**, which runs models for the cluster, or **Just using it**. The PIN only ever shows in NativeCluster on an administrator's computer in the cluster, or on the main's pages on the office network: never on nativecluster.com or in an email. An account alone never adds a computer. ## Turn a computer on for inference **Turn this machine on for inference** is on each computer's Cluster page. Only an administrator signed in on that computer can turn it on, in NativeCluster on that computer itself. It then runs models for the group while it's plugged in, and its person can turn it off at any time. An inference computer's administrators could read what it answers: the questions it's given, from anyone in the group, and the answers it writes. It keeps the models the people who run the cluster chose for it, and never downloads a model by itself. Since 0.4.19, the cluster's owners and administrators can also download models on that computer itself, to its own folder: see [Models](https://www.nativecluster.com/docs/models.md). ## Which computer answers a call Model calls from every app on every computer wait in one line on the main. The main routes each call to an inference computer that has the model, and when several have it, one holding the model with nothing to do is never left idle while a call waits for a busier one. If no inference computer taking work has it, the call is refused in words rather than left waiting. See [Usage: one line](https://www.nativecluster.com/docs/usage.md). A laptop on battery rests and takes no new work until it's plugged in. An inference computer silent for 30 seconds counts as gone, and its waiting work runs elsewhere. Since 0.4.19 there is also a testing switch on the main, **Place calls where they'd finish first (testing)**, in Settings › Account, This Mac. It is off at first. With it off, Usage shows how often that choice would have differed. It is not yet the normal behaviour. ## Combined inference: one model on two Macs When two inference computers are joined by a Thunderbolt cable and NativeCluster has checked that they can run one model between them, the Cluster page adds up their memory under **Combined inference**. A model too large for either Mac alone can then run across the two, over the cable. Its calls take their turn with other work, first in, first out. NativeCluster splits only a model no one Mac of the group can hold: a model that fits on one Mac always runs on one Mac. A split model is loaded for the calls that ask for it and unloaded after, so a call on it waits minutes while the two Macs load it, and the pair takes its chat calls one at a time. The two must run the same engine. On the night one of them updates NativeCluster before the other, they can't run a model together: **Combined inference** says which computer runs the older engine, and a request for a model that needs both is told the same at once. Once that computer updates, the two run it together again. ## Away from the office NativeCluster doesn't carry your cluster over the internet. Away from the office network, a computer can't reach its main, unless both are on your office's VPN or Tailscale network ([below](https://www.nativecluster.com/docs/cluster.md#over-tailscale-since-0-4-23)): its apps still open, and everything that needs no model keeps working. On a computer with inference off, a request that needs a model is told at once that the app's AI runs on your office's computers. A computer turned on for inference uses its own models meanwhile, for an administrator only. A computer can also go offline on purpose: Settings › Account, This Mac, **Work offline**. Since 0.4.20, the same goes for an administrator's coding tools on a computer turned on for inference: `nativecluster run`, Open Code and anything set up with `nativecluster env` answer from that computer's own models, in its own line, while the main is out of reach or the computer works offline, with the sign-in they already have. Its limits: - Only an administrator's, signed in on that computer. - Only a sign-in the main made while the computer was in reach, and only while the main had said, within the last 7 days, that it still holds it. A first `run` away from the main can't start. - A `nativecluster env` or `run` sign-in from before 0.4.20 works away once it has been used through the main since the update. Open Code signed in before 0.4.20 needs one fresh `/login` while the main is in reach. A computer with inference off still says it can't reach the cluster. ## Over Tailscale (since 0.4.23) A VPN or Tailscale network your office's computers share counts as your office network. With Tailscale on, on the main and on a laptop, the laptop stays connected to your cluster from home just as in the office, and a computer turned on for inference stays in the cluster's pool. There is nothing to set up in NativeCluster, but the laptop learns the main's Tailscale address from the main itself: once Tailscale is on on both, open NativeCluster on the laptop once in the office. On another device of your tailnet, a browser opens the main over https at its Tailscale address on port 8484 (such as `https://100.101.102.103:8484`) once it trusts your cluster's certificate; signing in with NativeCluster there isn't available yet, so use NativeCluster on your own Mac. Everyone on your tailnet, devices someone shares with you included, can reach the main's sign-in page, and still needs a sign-in, a PIN or an API key for anything behind it: share your tailnet only with people you trust. NativeCluster never tells its servers your Tailscale addresses. ## A lost or stolen computer An owner or administrator chooses **Remove this Mac…** on its row of the Cluster page, on any computer of the cluster. Anyone can remove their own computers the same way: if your laptop is stolen, choose **Remove this Mac…** on its row from your other computer of the cluster, signed in as yourself, or on the main. It is refused from its very next request, stops what it's doing on the cluster, and only a new PIN adds it again. Since 0.4.19, what it handed the main to keep pauses too: the schedules, events and loops that computer set on the main, which the question lists before you confirm. They are kept, never deleted, and run again only when an administrator chooses **Resume** on Usage. Removing a computer is done in NativeCluster's window on the office network, or on NativeCluster's website (below), never from the terminal. Its own apps and data stay on it. ### From anywhere, on your account page (since 0.4.23) On your NativeCluster account page (**Open account** in Settings › Account), under **Computers**, choose **Remove…** on its row. Owners and administrators can remove any computer of the cluster except its main; anyone can remove their own. NativeCluster stops answering it at once: it can no longer read the cluster's members, apps or computers, or change anything there. The cluster's computers refuse it within five minutes, as **Remove this Mac…** does, pausing what it handed the main, and its own pages say it was removed on NativeCluster's website. Its own apps and data stay on it. Only a new PIN from an administrator adds it back. NativeCluster's servers can only take a computer off this way: nothing they send adds a computer or brings one back. ## From the command | Command | What it does | |---|---| | `nativecluster cluster devices` | The cluster's computers, as its Cluster page lists them. | | `nativecluster cluster main-pin` | Shows the PIN that makes this Mac another Mac's main, once you confirm on the Mac. | | `nativecluster cluster handover-pin` | Shows the PIN that hands this main's place to another Mac, once you confirm. | Joining a cluster, turning inference on and removing a computer are done in NativeCluster's window in 0.4.23 (removing one, also on your account page). Starting a cluster is too, except for an AI agent, whose `nativecluster setup` starts one (since 0.4.21). An agent never adds a Mac to a cluster: a person does, with the PIN.On this page
The computers in a cluster
- The main keeps NativeCluster's records for the group and runs the cluster: it decides which computer answers each model call, and runs the scheduled work of the apps on it whether or not any other computer is on (an app on a person's own computer keeps its schedules there). It always runs models. A desktop Mac in the office is the usual main. A computer that thinks for people on other computers keeps itself from going to sleep when idle.
- Inference computers run models for the cluster. Only an administrator's Mac runs models for the cluster.
- Other devices use the cluster's apps and run no models, such as a laptop with inference off.
nativecluster cluster devices lists them as the Cluster page does. Since 0.4.23 each computer also says which NativeCluster it runs, so an owner sees one that needs its update.
Start a cluster
On the first Mac, NativeCluster's setup asks the person to sign in, name the cluster (the people they invite will see the name), and choose The main or Just using it. The person who makes the cluster is its owner. The first Mac needs no PIN. Making a cluster needs the internet once, to register its name.
Add a computer, with a PIN
Every other computer is added with a PIN, the owner's own included:
- On the new Mac, sign in to NativeCluster, pick the cluster, and choose Ask to join. The Mac must be on the office network with the main, or joined to it by a Thunderbolt cable.
- Every owner and administrator sees the request. See the PIN shows six digits. They read them to the person in person or on a call, and only if they know it's them: a computer's name is whatever its owner typed.
- The person types the six digits on the new Mac. A PIN works for ten minutes, or until a few wrong tries.
An administrator's Mac is then asked What will this Mac do?: Inference, which runs models for the cluster, or Just using it. The PIN only ever shows in NativeCluster on an administrator's computer in the cluster, or on the main's pages on the office network: never on nativecluster.com or in an email. An account alone never adds a computer.
Turn a computer on for inference
Turn this machine on for inference is on each computer's Cluster page. Only an administrator signed in on that computer can turn it on, in NativeCluster on that computer itself. It then runs models for the group while it's plugged in, and its person can turn it off at any time.
An inference computer's administrators could read what it answers: the questions it's given, from anyone in the group, and the answers it writes. It keeps the models the people who run the cluster chose for it, and never downloads a model by itself. Since 0.4.19, the cluster's owners and administrators can also download models on that computer itself, to its own folder: see Models.
Which computer answers a call
Model calls from every app on every computer wait in one line on the main. The main routes each call to an inference computer that has the model, and when several have it, one holding the model with nothing to do is never left idle while a call waits for a busier one. If no inference computer taking work has it, the call is refused in words rather than left waiting. See Usage: one line.
A laptop on battery rests and takes no new work until it's plugged in. An inference computer silent for 30 seconds counts as gone, and its waiting work runs elsewhere.
Since 0.4.19 there is also a testing switch on the main, Place calls where they'd finish first (testing), in Settings › Account, This Mac. It is off at first. With it off, Usage shows how often that choice would have differed. It is not yet the normal behaviour.
Combined inference: one model on two Macs
When two inference computers are joined by a Thunderbolt cable and NativeCluster has checked that they can run one model between them, the Cluster page adds up their memory under Combined inference. A model too large for either Mac alone can then run across the two, over the cable. Its calls take their turn with other work, first in, first out.
NativeCluster splits only a model no one Mac of the group can hold: a model that fits on one Mac always runs on one Mac. A split model is loaded for the calls that ask for it and unloaded after, so a call on it waits minutes while the two Macs load it, and the pair takes its chat calls one at a time.
The two must run the same engine. On the night one of them updates NativeCluster before the other, they can't run a model together: Combined inference says which computer runs the older engine, and a request for a model that needs both is told the same at once. Once that computer updates, the two run it together again.
Away from the office
NativeCluster doesn't carry your cluster over the internet. Away from the office network, a computer can't reach its main, unless both are on your office's VPN or Tailscale network (below): its apps still open, and everything that needs no model keeps working. On a computer with inference off, a request that needs a model is told at once that the app's AI runs on your office's computers. A computer turned on for inference uses its own models meanwhile, for an administrator only. A computer can also go offline on purpose: Settings › Account, This Mac, Work offline.
Since 0.4.20, the same goes for an administrator's coding tools on a computer turned on for inference: nativecluster run, Open Code and anything set up with nativecluster env answer from that computer's own models, in its own line, while the main is out of reach or the computer works offline, with the sign-in they already have. Its limits:
- Only an administrator's, signed in on that computer.
- Only a sign-in the main made while the computer was in reach, and only while the main had said, within the last 7 days, that it still holds it. A first
runaway from the main can't start. - A
nativecluster envorrunsign-in from before 0.4.20 works away once it has been used through the main since the update. Open Code signed in before 0.4.20 needs one fresh/loginwhile the main is in reach.
A computer with inference off still says it can't reach the cluster.
Over Tailscale (since 0.4.23)
A VPN or Tailscale network your office's computers share counts as your office network. With Tailscale on, on the main and on a laptop, the laptop stays connected to your cluster from home just as in the office, and a computer turned on for inference stays in the cluster's pool. There is nothing to set up in NativeCluster, but the laptop learns the main's Tailscale address from the main itself: once Tailscale is on on both, open NativeCluster on the laptop once in the office.
On another device of your tailnet, a browser opens the main over https at its Tailscale address on port 8484 (such as https://100.101.102.103:8484) once it trusts your cluster's certificate; signing in with NativeCluster there isn't available yet, so use NativeCluster on your own Mac. Everyone on your tailnet, devices someone shares with you included, can reach the main's sign-in page, and still needs a sign-in, a PIN or an API key for anything behind it: share your tailnet only with people you trust. NativeCluster never tells its servers your Tailscale addresses.
A lost or stolen computer
An owner or administrator chooses Remove this Mac… on its row of the Cluster page, on any computer of the cluster. Anyone can remove their own computers the same way: if your laptop is stolen, choose Remove this Mac… on its row from your other computer of the cluster, signed in as yourself, or on the main. It is refused from its very next request, stops what it's doing on the cluster, and only a new PIN adds it again. Since 0.4.19, what it handed the main to keep pauses too: the schedules, events and loops that computer set on the main, which the question lists before you confirm. They are kept, never deleted, and run again only when an administrator chooses Resume on Usage. Removing a computer is done in NativeCluster's window on the office network, or on NativeCluster's website (below), never from the terminal. Its own apps and data stay on it.
From anywhere, on your account page (since 0.4.23)
On your NativeCluster account page (Open account in Settings › Account), under Computers, choose Remove… on its row. Owners and administrators can remove any computer of the cluster except its main; anyone can remove their own. NativeCluster stops answering it at once: it can no longer read the cluster's members, apps or computers, or change anything there. The cluster's computers refuse it within five minutes, as Remove this Mac… does, pausing what it handed the main, and its own pages say it was removed on NativeCluster's website. Its own apps and data stay on it. Only a new PIN from an administrator adds it back. NativeCluster's servers can only take a computer off this way: nothing they send adds a computer or brings one back.
From the command
| Command | What it does |
|---|---|
nativecluster cluster devices | The cluster's computers, as its Cluster page lists them. |
nativecluster cluster main-pin | Shows the PIN that makes this Mac another Mac's main, once you confirm on the Mac. |
nativecluster cluster handover-pin | Shows the PIN that hands this main's place to another Mac, once you confirm. |
Joining a cluster, turning inference on and removing a computer are done in NativeCluster's window in 0.4.23 (removing one, also on your account page). Starting a cluster is too, except for an AI agent, whose nativecluster setup starts one (since 0.4.21). An agent never adds a Mac to a cluster: a person does, with the PIN.