# Use CmdBrief on a rented cloud machine

> Run a build machine or an agent server on a rented Linux machine that stops and resumes, with Tailscale so a new address doesn’t matter.

- **Category:** Setup and safety
- **Updated:** 2026-12-01
- **Reading time:** 4 min
- **Canonical page:** https://cmdbrief.com/guides/cmdbrief-on-a-rented-machine

## What you get

- **Your Mac:** Finds it by its tailnet name; Reconnects on its own after a resume
- **Rented machine:** A build machine or an agent server; Stops and resumes; Keeps your home folder
- **Your Mac → Rented machine:** builds, or briefs
- **Rented machine → Your Mac:** output, or work
- **Connection:** Tailscale, so a new public address doesn’t matter

CmdBrief does not host compute: you bring the machine. A rented Linux machine can be either of these:

|  | Build machine | Agent server |
| --- | --- | --- |
| Agents run on | Your Mac | The rented machine |
| Agent sign-ins there | None | Yes, on its disk |
| With your Mac closed | Nothing runs | Work can go on |
| When it stops | Builds run on the Mac | Agents pause until it resumes |
| Guide | [Build machine](https://cmdbrief.com/guides/linux-build-machine) | [Agent server](https://cmdbrief.com/guides/run-agents-on-a-linux-server) |

> **Tip:** Agents setting this up for someone: follow the steps in order. The steps marked “You do this” need the person; ask them and wait.

## Before you start

Every provider handles stops differently. Find these in its docs, and treat anything they don’t say as unknown until you have tried it:

- What starts the auto-stop: idle time, or a fixed time from the start (some count from the start, whatever you are doing).
- What a stop keeps: the disk, your home folder, systemd services, `/var/lib/tailscale`.
- Whether a stop tells running programs, or just ends them.
- Whether a resume is something you start, and whether it brings a new IP address and host key.
- Whether Tailscale can run there (it needs a TUN device, or its userspace mode).

The machine needs Linux on x86_64 with glibc 2.35 or newer and systemd, as in the other two guides.

## Join Tailscale with a fixed name

**Step 1 of 3 · You do this** (In your own terminal on the rented machine)

A rented machine usually gets a new public address on every resume. Over Tailscale, your Mac finds it by its tailnet address instead. Sign it in with a one-off auth key, or approve the device in Tailscale’s admin console. Your Mac must be on the same tailnet.

**On the rented machine**

```bash
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up --hostname build-box
```

If `tailscale up` can’t create its network device, start `tailscaled` with `--tun=userspace-networking`.

**Check it worked**

| Where | Run or do | Pass |
| --- | --- | --- |
| Rented machine | `tailscale status` | It lists your Mac, and this machine under the name you gave it. |

## Install, sign in and pair

**Step 2 of 3 · You do this** (On the rented machine and your Mac)

Follow the install and pairing steps of the [build machine guide](https://cmdbrief.com/guides/linux-build-machine) or the [agent server guide](https://cmdbrief.com/guides/run-agents-on-a-linux-server). Then give CmdBrief a fixed name too, since a resume can change the machine’s hostname — and if this machine is an agent server that should resume interrupted agents automatically after a stop and resume, enable Remote host (automatic resume is off by default even under `cmdbrief serve`):

**On the rented machine**

```bash
cmdbrief computer name build-box
cmdbrief remote-host on              # agent server: auto-resume interrupted agents after stops
```

Install toolchains and agent CLIs in your home folder, which a stop normally keeps. Caches such as `~/.cache` and `/tmp` are often not kept.

**Check it worked**

| Where | Run or do | Pass |
| --- | --- | --- |
| Rented machine | `cmdbrief computers` | Your Mac is listed with full use and a direct line. |

## Stop and resume it once

**Step 3 of 3 · You do this** (At your provider, then on your Mac)

Stop the machine during a build or a lead’s turn, wait more than ten minutes, resume it, and check again without logging in to start anything:

**Check it worked**

| Where | Run or do | Pass |
| --- | --- | --- |
| Rented machine | `systemctl --user is-active cmdbrief` | `active` within a couple of minutes of the resume. |
| Rented machine | `tailscale status` | Same name and tailnet address, and no new device to approve. |
| Mac | Look at the machine’s row in Settings › Computers | It is back without pairing again. The Mac retries the connection on its own. |
| Mac | Build machine: run the next build | It goes to the machine again. |
| Mac | Agent server: look at the lead that was working | The agents are still signed in. With Remote host (`cmdbrief remote-host on`) or **Resume interrupted agents on launch** on, the lead resumes by itself; with both off (the default), it stays recorded until you press **Continue** or **Resume lead & crew** from your Mac. |

> **Warning:** While it is stopped: on a build machine, a build that was running ends with an error and is not rerun, and new builds run on the Mac. On an agent server, the agents stop with the machine and stay recorded — automatic resume is off by default, even under `cmdbrief serve`. They resume on their own at the next start only when **Resume interrupted agents on launch** is enabled in Settings › Conversations or **Remote host** is on (`cmdbrief remote-host on`, or Settings › Computers); otherwise continue them from your Mac with **Continue** or **Resume lead & crew**. If the provider ends programs without warning, the last moments before the stop may be lost; work saved to disk stays.

## If it fails

| What it says | Fix |
| --- | --- |
| The service isn’t back after a resume | Check `loginctl show-user "$USER" -p Linger`. If the provider doesn’t bring back user services, run CmdBrief from a system unit with `User=` set to your user. |
| Tailscale shows a new device after a resume | **You:** `/var/lib/tailscale` wasn’t kept. Use an auth key meant for reuse, or ask the provider which folders a stop keeps. |
| SSH warns that the host key changed | **You:** Expected when a resume moves to a new machine. Check the new key with your provider, then update `known_hosts`. |
| The Mac says “Connect both to the same network or to Tailscale” | Tailscale isn’t up on one side. Run `tailscale status` on both. |

## Undo

For an agent server, sign the agents out from the Mac first (Sign out in one of its agent panes). Then unpair it in Settings › Computers and delete the machine at your provider, so its disk is gone.

## Questions

### Does CmdBrief rent the machine for me?

No. CmdBrief does not host compute. You rent the machine from a provider and pair it with your Mac.

### Why use Tailscale?

Your Mac connects to your other computers only on a network they share or over Tailscale. On a rented machine, Tailscale also keeps the same address when the public one changes.

### What if the machine stops in the middle of a build?

The build ends with an error and is not rerun on its own. Your next build runs on the Mac until the machine is back.

## Primary sources

Provider terms and product behavior can change. Confirm plan, pricing, model, and permission details in the current official documentation.

- [Tailscale: install on Linux](https://tailscale.com/kb/1031/install-linux)
- [Tailscale: auth keys](https://tailscale.com/kb/1085/auth-keys)
- [Tailscale: userspace networking](https://tailscale.com/kb/1112/userspace-networking)

## Keep reading

- Setup and safety: [Add a Linux build machine for your Mac’s agents](https://cmdbrief.com/guides/linux-build-machine)
- Setup and safety: [Run your agents on a Linux server and close your laptop](https://cmdbrief.com/guides/run-agents-on-a-linux-server)
- Setup and safety: [Claude Code sandbox and permissions: how to run it safely](https://cmdbrief.com/guides/claude-code-sandbox)

---

Markdown mirror of https://cmdbrief.com/guides/cmdbrief-on-a-rented-machine, generated at build time from the same data the HTML page renders. Machine-readable index: https://cmdbrief.com/llms.txt
