How to set up your spare Mac for Claude Code to fully control - a step-by-step guide | claude-controls-mac
claude-controls-mac
How to set up your spare Mac for Claude Code to fully control - a step-by-step guide
Here’s a full step-by-step guide on how to turn your spare Mac into an always-on<br>machine Claude Code can fully control, with computer use enabled. You’ll be able to talk to it from your phone<br>through the Claude app, or from your main Mac over SSH.
Why do this?
I wanted to create a separate environment Claude Code can control on its own, so I can<br>delegate tasks I don’t necessarily want to run on my own machine - certain types of<br>research tasks, and development tasks.
Claude Code, especially with the --dangerously-skip-permissions flag on,<br>carries inherent risk when run on your main machine. You can eliminate / mitigate these<br>risks by creating a separate environment on your spare Mac with everything it needs<br>to have access to.
It has an added bonus of being able to talk to Claude Code anytime, anywhere from<br>your phone. I’ve personally found it really useful because I often prefer to talk to<br>Claude Code instead of regular Claude on the mobile app - Claude Code is often more<br>capable.
The following guide assumes you have your main Mac as well as a spare Mac you can set<br>up for this, but you should be able to take inspiration from it and apply it to any<br>combination of two machines.
Why this setup?
First, let’s quickly address a few questions you might have.
Why not run it in a container?
I’m a big proponent of running it in a container - I even built<br>an entire environment for doing so conveniently.<br>However, I’ve found it has a few limitations.<br>First, it still runs on your main machine, so it’s not completely separated. For<br>example, network requests it sends still go through your main machine.
Second, there are limitations to the container’s capabilities. For example, I wanted<br>my agent to be able to run Unity for game development, and there’s no easy way to do<br>that in a container. The same goes for any other app that’s only available on a Mac -<br>you won’t have access to it. That’s especially relevant if you want Claude Code to<br>control these apps through computer use - clicking, dragging, and so on.
Why not use something like OpenClaw?
I personally like having access to the full, latest features of Claude Code. I also<br>like being able to control it from the Claude app - I’ve found it really convenient.<br>And you get to use your Claude subscription usage if you happen to have one, which is<br>an added bonus.
At the end of the day, running an agent with broad permissions is safer on a machine<br>that has nothing to lose - but you get the benefit of being able to use a full Mac<br>instead of a container. The approach here:
Use an old/spare Mac , not your main one.
Create a fresh local account with no personal data and no Apple ID signed in, so<br>the agent has nothing sensitive to reach.
Drive it over SSH from your main Mac on your local network, and control it from<br>your phone.
What you’ll need
A spare Mac (the target ).
Your everyday Mac (the source ), on the same Wi-Fi.
1. Start fresh on the target Mac
Wipe it first (if it has any personal data)
You’ll be giving the agent full access to this machine, so it can reach anything stored<br>on it. If there’s existing data you don’t want it to have access to, erase the machine<br>first:
Macs that support it: System Settings -> General -> Transfer or Reset -><br>Erase All Content and Settings .
Older Intel Macs: restart into Recovery (hold Cmd-R at<br>boot), use Disk Utility to erase the internal drive, then reinstall macOS.
Optionally update to the latest macOS afterward (System Settings -> General -><br>Software Update).
Create a fresh, isolated account
Create a new local user account (System Settings -> Users & Groups).
I recommend not signing into an Apple ID. Skip it during setup.
Make the account an admin (if you haven’t already)
The account needs admin rights or sudo will refuse to run.
System Settings -> Users & Groups -> set the account to Allow this user to<br>administer this computer .
If you ever need to repair it from another admin account:<br>sudo dseditgroup -o edit -a -t user admin
2. Enable Remote Login (SSH) on the target Mac
On the target , turn on SSH so the source Mac can connect:
sudo systemsetup -setremotelogin on
If the command fails with Turning Remote Login on or off requires Full Disk Access<br>privileges, give your terminal app Full Disk Access first:
System Settings -> Privacy & Security -> Full Disk Access .
Click + , then in the file picker go to Applications -> Utilities -> Terminal<br>and add it.
Quit and reopen the terminal, then rerun the command.
3. Passwordless sudo for the target account
This is so the agent (and your SSH commands) can run admin tasks without a password<br>prompt each time. Run this once on the target. It<br>asks for the login password this one time:
echo " ALL=(ALL) NOPASSWD: ALL" | sudo tee...