Add a second machine
In this tutorial you add a second machine to the Thermite you started in Install on one machine. Control sets a rig up there over SSH, and you start a run of your campaign on it, beside the first.
It takes about thirty minutes, most of it the second machine downloading the images.
What you need
Section titled “What you need”- Thermite on your first machine, from Install on one machine, and a campaign from Run your first campaign.
- A second machine: Linux with systemd, which you reach over SSH. It must reach your first machine, and pull the release’s images from
ghcr.io. - An account on it for control. Make one with
sudo useradd -m thermite. For control to install Podman there, give it sudo without a password: add the linethermite ALL=(ALL) NOPASSWD: ALLwithsudo visudo -f /etc/sudoers.d/thermite. You can remove that file once the installs are done. - A name for your first machine that the second one reaches, and a reverse proxy on the first machine that serves HTTPS under it, such as Caddy or nginx. Compose shows control only to the first machine itself, at
127.0.0.1:8800. With Tailscale on both machines, Tailscale is the name and the proxy: see If you are using Tailscale.
1. Let the second machine reach control
Section titled “1. Let the second machine reach control”-
Point your reverse proxy at
127.0.0.1:8800, under the name, such ascontrol.example.com. Have it sendX-Forwarded-Proto: httpsand take request bodies of up to 90 MB. With Tailscale,tailscale serve --bg 8800does this, and the name is the machine’s on your tailnet, the address it prints (If you are using Tailscale). -
In
.env, next tocompose.yamlon your first machine, add the address and open the message bus’s port to other machines:.env (part) THERMITE_CONTROL_PUBLIC_URL=https://control.example.comTHERMITE_NATS_PUBLISH=0.0.0.0:4222 -
Start Thermite again with them:
Terminal window docker compose up -d # or: podman compose up -d -
On the second machine, check that it reaches both:
Terminal window curl https://control.example.com/v1/healthnc -zv control.example.com 4222curlanswers{"ok":true,"bus":"connected","degraded":false}, andncconnects. If your firewall blocks port 4222, open it to the second machine: a rig talks to control on that port. With Tailscale, publish the bus on the first machine’s tailnet address only, so that nothing outside your tailnet reaches it:THERMITE_NATS_PUBLISH=<address>:4222, with the addresstailscale ip -4prints.
2. Add the machine
Section titled “2. Add the machine”- Open the dashboard, press the cog at the foot of the sidebar, then Machines under Rigs, and press Add a machine.
- Choose A computer over SSH, and fill in a Name such as
machine-2, its Address, the SSH port (usually 22) and the User,thermite. Leave Private key empty: control makes one. - Press Add and read its host key.
The machine’s row opens, with a line that starts with restrict: the public half of control’s key.
3. Let control in
Section titled “3. Let control in”- On the second machine, as
thermite, add that line to~/.ssh/authorized_keys. Make the folder and the file first if they are new:~/.sshwith mode 700, the file with mode 600. - Back in the row, compare its fingerprint with the machine’s own:
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pubon the machine. If they match, press It matches: trust it.
Control logs in and reads the machine: its system, GPUs, Podman and whether it reaches control. Under Missing for a rig, it asks about each thing the machine still needs, such as May control install Podman?, with the exact script it would run. Press Install it for each, then refresh in the status bar along the bottom of the page until the row has nothing missing.
4. Add the rig
Section titled “4. Add the rig”- Open Rigs in the sidebar, then press Add a rig.
- Under What kind of rig?, choose One machine, then Next.
- Under Where does it run?, choose machine-2 (over SSH), then Next.
- Under Which GPUs does it use?, leave its GPUs ticked, if it has any. With none, the rig measures on the CPU. Press Next.
- Under Name it and create it, give a Rig name, such as
rig-2. Message bus shows the address the rig will reach, such asnats://control.example.com:4222. - Press Create the rig.
You land on the rig’s page. Its Set up by control block ticks off each step as it comes: enrolled, files and services written and started, its key on the message bus registered, first report. The first download of the images takes most of the time. When the last step is ticked, press refresh: the page says rig-2 is live.
5. Start a run there
Section titled “5. Start a run there”- Open Campaigns in the sidebar, then your campaign, and press Start a run at the top of its page.
- Under Where it runs, choose
rig-2. - Press Start the run.
The campaign’s page now has two runs at work, one on each machine. Each rig’s judge measures only its own run, and every result reaches the same control.
What you did
Section titled “What you did”You gave control a way in from other machines, let it set a rig up on a second one over SSH, and ran your campaign on both at once.
- Step 4, Keep Thermite on a private network: Tailscale or WireGuard between your machines, so that nothing off that network reaches control or its message bus.
- Run one campaign on several rigs: share experiments between the runs, and move a champion from one rig to another.
- Add a rig on a machine over SSH: every option of this tutorial’s steps, what control writes on the machine, and how to stop, update or remove the rig.
- Other places for a rig: a Kubernetes cluster, a machine control can’t reach, with a join command, or a GPU on RunPod.
- Give a rig several GPUs: split them between the judge and the agents.