Setting up your spare Mac for Claude Code to control, a step-by-step guide

Hacker News · 2026-07-18

This guide details how to repurpose a spare Mac as a dedicated, always-on machine for Claude Code, enabling full computer control and mitigating the inherent risks of running Claude Code with broad permissions on a primary device. The setup allows users to control the AI from their phone via the Claude app or from a main Mac over SSH, facilitating tasks like research and development that might be too sensitive or resource-intensive for a primary workstation.

The process involves preparing the spare Mac by erasing existing data, creating a new local administrator account without an Apple ID, and configuring passwordless `sudo` for the created user. Key steps include enabling SSH for remote login, establishing a fixed hostname, and setting up passwordless SSH login from the main Mac to the spare. To ensure uninterrupted operation, the guide outlines how to prevent the spare Mac from sleeping or locking. It also covers installing utility scripts like `clip` for cross-device clipboard sharing and `ic` for simplified interactive Claude Code sessions. Furthermore, it details how to install Claude Code itself and optionally set up a robust development environment. A critical section addresses enabling computer use by routing around macOS permissions via a LaunchAgent that maintains a `tmux` server within the GUI session, allowing Claude Code to see and control the desktop remotely.

*The full article also explores optional configurations for GitHub CLI, VNC access, and remote control via phone, along with troubleshooting tips for various steps.*

Read the original report at Hacker News