Adding a Mac

in Japanese(日本語)

These steps add another Mac (a runner machine) to your fleet so it can run your tests. For the big picture, see Fleet concepts; for what remote runs can do and how they work in detail, see Remote runs.

Most steps can be done either in the terminal (CLI) or in the VSCode extension. However, installing fleetest on the runner (Step 3) can only be done in the terminal.

Step Where CLI VSCode extension
0. Prepare the runner Runner — (by hand) —
1. Set up SSH key login Your Mac ✅ —
2. Register the machine Your Mac ✅ ✅
3. Install fleetest on the runner Your Mac ✅ —
4. Add the runner's devices to your profiles Your Mac ✅ ✅
5. Check the connection Your Mac ✅ ✅
6. Run your first test Your Mac ✅ ✅

In the examples below, the runner is user@192.168.xxx.xxx and its machine name is M1Max.

You can hand the work on your Mac (Steps 1–6) to an AI assistant; give it the "Prompt for the AI" of each step. In Claude Code, the /fleetest-remote-setup skill asks for the values it needs (the runner's destination, the machine name and the project), leaves the mechanical work to fleetest remote setup, hands you the parts that need a person, and reports the result at the end. The AI assistant does not do the work on the runner (Step 0) or anything else only a person can do, such as typing an SSH password.

Before you start

Requirement Check (run on the runner)
Apple silicon Mac sysctl -n hw.optional.arm64 is 1
A matching Xcode product version somewhere on the runner (beta build numbers don't need to match, and the macOS version may differ, as long as it runs that Xcode) xcodebuild -version
Someone stays logged in at the console stat -f%Su /dev/console matches the runner's user
System sleep disabled (display sleep and screen lock are fine) pmset -g | grep " sleep"
Remote Login on checked in Step 1
The firewall's "Block all incoming connections" is off (the firewall itself can stay on) see item 2 of Step 0
Homebrew is installed, in a version that supports that macOS (only when the runner uses physical iPhones, .apks files, or Apple Container installed with Homebrew) brew --version runs
Xcode's license is accepted and its first-launch setup is done sudo xcodebuild -license accept, then sudo xcodebuild -runFirstLaunch (fleetest remote setup stops if either is missing)
Screen Sharing on (recommended: lets you log back in from your Mac after the runner restarts; fleetest remote setup does not require it) System Settings → General → Sharing → Screen Sharing
The iOS Simulator runtime you test with is downloaded (only when running iOS; runs are not stopped without it, but Step 5 warns) xcodebuild -downloadPlatform iOS
Android SDK and AVDs (only when running Android). Keep the SDK in its default location (~/Library/Android/sdk) fleetest doctor
Apple Container or Docker (only when running a project that has scripts/compose.yaml; the services start on the runner. Build your own images on the runner too, or load them with fleetest services load <tar>; nothing is transferred from your Mac. See service declarations) container --version or docker --version

If the runner has several Xcode versions installed side by side under /Applications, fleetest automatically picks the one that matches your Mac's Xcode product version — you don't need to uninstall the others, and you don't need sudo. If you keep an Xcode somewhere else, register its path when you register the machine (Step 2), with --developer-dir <path to the .app>; otherwise fleetest won't find it. If no matching Xcode can be found, or more than one equally matches, the run is stopped with a message that lists the candidates.

If your Mac and the runner run different macOS versions (for example 26 and 27), the text visibility check (OCR and FM) uses the features bundled with each Mac's macOS, so its results can differ between Macs. If a check fails only on one Mac, suspect the macOS version difference.

Step 0: Prepare the runner (on the runner, once)

Sit at the runner or use Screen Sharing. These tasks need sudo or the GUI, so fleetest does not do them for you.

  1. Turn on Remote Login: System Settings → General → Sharing → Remote Login.
  2. Check that the firewall's "Block all incoming connections" is off (System Settings → Network → Firewall → Options). While that option is on, SSH is blocked too. The firewall itself can stay on (if it is off, there is nothing to do). You can check the state with these commands:
    /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate   # "Firewall is disabled" means the firewall itself is off (you are done)
    /usr/libexec/ApplicationFirewall/socketfilterfw --getblockall      # "… set to disabled" means OK
    
  3. Turn on Screen Sharing (recommended). It lets you log back in from your Mac after the runner restarts.
  4. Disable system sleep:
    sudo pmset -a sleep 0
    
  5. Install Xcode and accept its license. Use the same product version as your Mac (beta build numbers don't need to match). You can download Xcode from https://developer.apple.com/download/.
    sudo xcodebuild -license accept
    sudo xcodebuild -runFirstLaunch
    
  6. Install Android Studio (only when running Android). You can download Android Studio from https://developer.android.com/studio. Install the Android SDK in the setup wizard that runs the first time you start it.
    • Keep the SDK in its default location (~/Library/Android/sdk). fleetest runs over SSH, so an ANDROID_HOME set in ~/.zshrc or similar is not read (fleetest looks at ANDROID_HOME, then ANDROID_SDK_ROOT, then the default location). In the default location, nothing needs to be configured.
    • You can create Emulators (AVDs) in Android Studio's Device Manager. You can also create them from fleetest in Step 4.
  7. Install Homebrew (only when needed). fleetest remote setup itself does not use Homebrew. You need it only to install the tools for physical iPhones (libimobiledevice), .apks files (bundletool), or Apple Container (container) on the runner.
    • If Homebrew has never been installed: run the following command in the terminal (the instructions are also at https://brew.sh/). It asks for the runner's login password partway through.
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
      
      When it finishes, it shows commands under "Next steps" that make brew available. Run them as shown, then check that brew --version works.
    • If Homebrew is already installed: check that brew --version works. On a Mac that has not been updated for a while, Homebrew may not support the newer macOS and may not run at all. In that case, update it with the command below (brew update itself does not run, so the update goes through git).
      git -C /opt/homebrew fetch origin && git -C /opt/homebrew reset --hard origin/master
      
  8. Stay logged in. Do not log out. Locking the screen is fine.

If anything is still missing, fleetest remote setup in Step 3 lists it for you.

Step 1: Set up SSH key login (on your Mac)

Prompt for the AI

Set up SSH so that I can connect to user@192.168.xxx.xxx
If you do it manually (click to show details)

If you have no key yet, create one with ssh-keygen -t ed25519.

ssh-copy-id user@192.168.xxx.xxx                       # enter the password once, the first time only
ssh -o BatchMode=yes user@192.168.xxx.xxx 'echo ok'    # printing ok means you are ready

Typing the password is needed, so the AI assistant may stop partway and ask you to enter it.

Expected result:

fleetest connects without entering a password, so the second line must succeed without one. Also accept the host key here, the first time you connect.

For a runner behind a router, or one that uses a port other than 22, define an alias in ~/.ssh/config and use that alias as the destination (see "Runners on another network (across a router)" in Remote runs).

Step 2: Register the machine (on your Mac)

Give the runner a name known only on this Mac (a machine name). The later steps and your profiles refer to the runner by this name.

Prompt for the AI

Register the machine M1Max (user@192.168.xxx.xxx) in fleetest.
If you do it manually (click to show details)

Register in the VSCode extension

  1. Run fleetest: Show Device Monitor from the Command Palette to open the Device Monitor.
  2. Open the "Settings" tab and press "Add remote host" under the "Machines" table. A new row is added to the table.
  3. Enter the SSH destination in "user@host" (for example user@192.168.xxx.xxx; an alias from ~/.ssh/config also works).
  4. Enter the machine name in "Machine (optional alias)" (for example M1Max). If you leave it blank, the destination without user@ (for example 192.168.xxx.xxx) becomes the machine name.
  5. Normally, leave "Base directory" and "FM concurrency" blank. The base directory defaults to ~/fleetest-runner. If you change it, do not point it at the place where the runner has its own copy of fleetest.
  6. Press "Confirm" on the row. "Confirm" stays disabled until "user@host" is filled in, and nothing is registered until you press it.
  • Editing a registered row saves the change right away.
  • The button in the "Badge color" column opens a palette to choose the badge color. If you do not choose one, a color not used by other machines is assigned automatically. The color is used for the machine name badges in the Device Monitor.
  • "Machine enabled" (right of the badge color, on by default): when you turn it off, test runs are not scheduled onto that machine. Devices of a run profile that live on it are skipped and the scenarios go to the remaining machines. The row for your own Mac has it too. A run that names the machine explicitly with --runner still reaches it.
  • Every remote machine row except the first has an up-arrow button at the left end. Pressing it moves the row up by one and saves that order. The row for your own Mac always stays at the top. The Device Monitor and the dashboard follow this order right away (tiles, graph rows, the run board and the health tables).
  • The "−" at the right end of a row removes the registration after you confirm it in a dialog.
  • "user@host" and the machine name must be unique (a blank machine name counts as the name taken from "user@host", and local is taken by your own Mac). If they collide, nothing is saved: the fields are outlined and the reason appears under the table.
  • If saving fails, the reason appears under the table as "Failed to save the machine registry".

Register with the CLI

fleetest remote machines add M1Max --host user@192.168.xxx.xxx
fleetest remote machines        # check the registration
  • A machine name may contain only letters, digits, _, . and -. local means your own Mac, so it cannot be used.
  • Running add again with the same name updates the registration.
  • A destination that is already registered under another machine name is rejected.
  • To remove it, run fleetest remote machines remove M1Max.
  • If you keep the Xcode you want this runner to use somewhere other than /Applications, add --developer-dir <path to the .app> (for example --developer-dir /Applications/Xcode_27.app) to pin it. Omit it when the runner's /Applications has at most one Xcode matching each product version you run tests on it with.

The CLI and the extension read and write the same registry (~/.config/fleetest/config.json), so either way gives the same result.


Expected result:

Step 3: Install fleetest on the runner (on your Mac)

This cannot be done from the VSCode extension. Ask the AI assistant, or run the following command in the terminal. You do not need to log in to the runner over SSH yourself.

Prompt for the AI

Set up fleetest remote runs on M1Max (ssh user@192.168.xxx.xxx). The project is project1.
If you do it manually (click to show details)
fleetest remote setup M1Max --project <project>
  • For --project, give the name of your local test project (TestProjects/<name>). If you have only one project, you can leave it out.
  • The first time takes a few minutes because of the build.
  • It is safe to run it again. If it stops partway, fix the problem and run the same command again; it picks up where it left off.

The command goes through these stages:

  1. Checks that it can reach the runner and that someone is logged in.
  2. Checks the runner's requirements. If anything still needs a person, it lists those items and stops.
  3. Prepares fleetest and your test project under ~/fleetest-runner/ on the runner.
  4. Brings the runner's fleetest to the same version as your Mac.
  5. Only when you add --profile <run profile> (and optionally --scenario <scenarioID>), runs one real test on the runner as a final check. Without it, this stage is reported as "not yet verified" (a warning). --skip-verify also skips it.

The exit code tells you how it ended:

Exit code Meaning What to do next
0 Done (the final test run passed too) Go on to Step 4
2 The required checks passed, but some items are not finished: a person still has to do something, or the final test-run check was skipped (no --profile, or --skip-verify) Fix the listed items and run the same command again. If only the check was skipped, running a real test in Steps 4–6 is enough
1 Failed Read the message and fix it (see "Troubleshooting" below)

If something from Step 0 is still missing, the AI assistant lists the missing items and stops. Finish them on the runner, then give the same prompt again.

Expected result:

Step 4: Add the runner's devices to your run profile (on your Mac)

Which devices run your tests is decided by the run profile's devices list — each device names its own machine directly. You edit profiles on your Mac; they are sent to the runner automatically on every run. You never need to edit files on the runner.

Prompt for the AI

Find the devices on M1Max and add them to the run profile ios-run.
If you do it manually (click to show details)

Add them in the VSCode extension

  1. In the Device Monitor's "Profiles" tab, open the run profile that should use the runner's devices.
  2. Press the "+" next to "Add devices". "Select Devices" opens.
  3. Choose M1Max in "Machine:" at the top. The list switches to the devices on the runner ("Loading..." is shown while it loads).
  4. Check the devices you want to use. If the device you want does not exist, you can create it on the runner with the "+" next to "Create device". Before creating it, you are asked "This creates "" on M1Max. Continue?"; press "Create".
  5. Press "OK". Devices with "machine": "M1Max" are added to the run profile's devices on your Mac.
  6. Check the added devices under "Devices" in the run profile.

Add them with the CLI

  1. See which devices exist on the runner:
    fleetest remote exec M1Max -- api installed-devices
    
  2. Add them, with machine, to the devices of the run profile (TestProjects/<project>/profiles/runs/<name>.json):
    { "devices": [
        { "platform": "ios", "machine": "M1Max", "name": "iPhone 17 Pro-01",
          "osVersion": "iOS 27.0", "model": "iPhone 17 Pro", "udid": "<UDID>" } ] }
    

Expected result:

Things to keep in mind

Step 5: Check the connection (on your Mac)

Prompt for the AI

Check the state of the runner M1Max and whether it can be reached.
If you do it manually (click to show details)

Check with the CLI

fleetest remote status --runner M1Max
HOST          REACHABLE  LOGIN  REV          TOOLCHAIN     RUNTIME             FM  BINARY  FREE    LOCK
user@mac2     yes        yes    ✅ 9655a21…  ✅ Xcode27…   ✅ iOS 27.0: 24A434  -   yes     412 GB  -
What you see Meaning What to do
LOGIN is no The runner is sitting at the login window Log in, for example over Screen Sharing
⚠️ in REV The tool version differs from your Mac (runs are stopped) Run fleetest remote setup M1Max again
❌ in TOOLCHAIN No Xcode on the runner matches your product version, or more than one equally matches (runs are stopped) Install the matching Xcode product version on the runner (you can keep other versions installed), or pin one with --developer-dir if several match
⚠️ in TOOLCHAIN Same Xcode product version but a different beta build number (runs are not stopped) Optional — install the same build on both Macs if you want them to match
⚠️ in RUNTIME The runner's iOS Simulator runtime differs from your Mac's Run xcodebuild -downloadPlatform iOS on the runner (this is only a warning; runs are not stopped)
⚠️ iOS <version>: none in RUNTIME That runner has no Simulator runtime for the Xcode in use there, so devices on that iOS version cannot be created (Simulator runtimes do not come with Xcode) Run xcodebuild -downloadPlatform iOS on that runner
BINARY is no fleetest is not built on the runner Run Step 3 again

FM is measured only when you pass --fm (otherwise it shows -).

Check in the VSCode extension

When you open the Device Monitor, the runner's devices appear as tiles just like your local ones, with a badge showing the machine name.

  • If a tile stays "unknown", the runner's fleetest is on a different version from your Mac, or the SSH connection is not working. Run Step 3 again, then press "Restart Monitor" in the toolbar.
  • The toolbar graphs (MEM/CPU and so on) get one row per machine.

Expected result:

Step 6: Run your first test (on your Mac)

The first run takes a few minutes to start, because the runner builds the scenarios and so on. Later runs start within seconds. Reports, recordings and logs are brought back to your Mac.

Prompt for the AI

Run the scenario <scenario name> on M1Max with the run profile ios-run.
If you do it manually (click to show details)

Run with the CLI

fleetest run --profile <run profile> --scenario <scenarioID>

If the run profile's devices carry "machine": "M1Max", the run goes to the runner without --runner. To send just this one run to a different machine, add --runner M1Max.

A run starts any Android Emulator that is not running before it begins. Run this only if you want to warm them up beforehand (optional):

fleetest remote exec M1Max -- devices up --profile <run profile>

Run in the VSCode extension

  1. Run fleetest: Select Run Profile from the Command Palette and choose the run profile from Step 4.
  2. Press "Run Tests" in the Device Monitor's toolbar. It starts the devices, then runs the tests. You can also run from the Test Explorer.

Before a run starts, the extension checks whether the runner's fleetest is on the same version as your Mac.

  • If it differs, you see "The remote runners' fleetest version differs from this machine's." Pressing "Update and run" brings the runner to your version and then runs.
  • If it cannot be brought in line (this Mac's fleetest is older than the runner's, the revisions have diverged or which side is older cannot be determined; the runner cannot be reached; the Xcode product versions differ, and so on), you see "Cannot run: the remote runners' fleetest cannot be updated from here." with the reason, and the run does not start. A difference in Xcode beta build number alone does not stop the run — it is only a warning.

Expected result:

After you update fleetest

After updating fleetest on your Mac, bring the runner to the same version. Runs do not start until the versions match.

Prompt for the AI

Bring fleetest on the runner M1Max to the same version as my Mac.
If you do it manually (click to show details)
  • CLI: run fleetest remote setup M1Max again. To align the version only, fleetest remote align M1Max also works.
  • VSCode extension: use "Update and run", which appears when you start a run.

When several people share one runner

Troubleshooting

Message or symptom Cause What to do
cannot reach … over ssh Key login does not work, or the destination is wrong Redo Step 1
must not contain ':' You wrote a port number in the destination (host:2222) Define an alias in ~/.ssh/config and use it as the destination
remote setup ends with exit code 2 Some items on the runner still need a person Fix the listed items and run the same command again
Xcode 27.2 or later is required The runner's Xcode is older than 27.2 Install Xcode 27.2 or later on the runner (Step 0, item 5; you do not need to remove other versions), then run fleetest remote setup again
is sitting at the login window The runner is at the login window Log in, for example over Screen Sharing
git revision mismatch Your Mac and the runner are on different versions Run fleetest remote setup M1Max again
toolchain mismatch No Xcode on the runner matches your Xcode product version (the macOS version is not compared; a beta build number difference alone does not trigger this message) Install the matching Xcode product version on the runner, under /Applications (you don't need to remove the one already there)
could not tell which installed Xcode to dispatch with: … match this Mac's product version More than one Xcode on the runner matches your product version Pin the one to use: fleetest remote machines add M1Max --host <user@host> --developer-dir <path to the .app> (if you changed the base directory, also pass --dir <path>)
could not tell which installed Xcode to dispatch with: none of the … No Xcode on the runner matches your Mac (the message lists every Xcode it found) Install that product version of Xcode on the runner (you can keep the others). Pinning does not help here
no runner workspace at … Your work area does not exist on the runner yet Run fleetest remote setup M1Max once
no running emulator for AVD … The Android Emulator is not running (the run's automatic start before the run could not start it) Try the devices up command from Step 6 and read its output
app package not found at … There is no app at appPath on your Mac Build the app on your Mac, or fix appPath
A tile stays "unknown" The runner's fleetest is out of date, or SSH cannot connect Run Step 3 again, then press "Restart Monitor" in the toolbar

For a message not listed here, report it as described in "Reporting a problem" in Troubleshooting, attaching the output of fleetest remote status --runner <machine> (Step 5) and fleetest doctor.