Back to Kun Chen

How I work from anywhere with a multi-machine setup

Kun ChenNovember 8, 202616m
In a Nutshell

The setup prioritizes a 14-inch M5 MacBook Pro as the primary workstation for zero-latency interaction, while delegating heavy agent work to a headless M4 Mac Mini with 64GB RAM running remote Secondmates. Tailscale creates a unified private network across all devices, enabling seamless SSH access and agent orchestration regardless of physical location. Hurder manages terminal sessions across machines, Ship provides mobile SSH control, and offline continuity ensures agent work persists when the laptop disconnects.

AI-Generated Notes

These notes were generated by AI and may contain inaccuracies.

The setup utilizes three primary devices: a 14-inch M5 MacBook Pro with 24 GB of memory as the primary interactive workstation, an M4 Mac Mini with 64 GB of memory running headlessly, and an iPhone for remote access. The MacBook Pro serves as the main workstation where FirstMate runs as the primary orchestrator agent, controlling remote workers on the Mac Mini.

The laptop is chosen over the Mac Mini as the primary machine despite the Mac Mini being always-on. The key advantage is direct access without network latency between the user and work environment. When using the Mac Mini remotely via SSH, even 100-millisecond latency disrupts keyboard navigation in Neovim. The laptop allows seamless work at coffee shops, meetings, or flights regardless of network quality.

A command enables the laptop to continue running agents even when the lid is closed, eliminating the need to carry a partially open laptop.

Initial setup requires physical monitor, mouse, and keyboard connection. Three essential configurations must be completed:

  • Create a separate administrator user account for agent isolation
  • Enable remote login (SSH) and add the agent account to allowed users
  • Ensure the machine shares the same network as the interactive machine, noting the local hostname for connections

After initial setup, delegate remaining configuration to an agent using the hostname. The "headless" skill repository can be provided to the agent for standardized setup procedures. This delegation ensures the agent maintains context for ongoing management rather than requiring manual intervention for updates or issues.

If manual setup is preferred, complete these steps:

  • Disable FileVault encryption to prevent password requirements after power loss
  • Enable automatic login using the dedicated headless account
  • Configure energy settings: prevent automatic sleep, disable hard disk sleep, enable wake for network access, and set automatic startup when power is connected

Tailscale creates a private virtual network connecting all devices regardless of physical location. This solves the limitation of requiring devices to be on the same local network. Devices can communicate using Tailscale-assigned IP addresses or hostnames across different Wi-Fi networks, mobile networks, or locations. The free tier provides sufficient functionality for personal use.

Hurder functions as a modern tmux alternative for managing multiple terminal sessions across machines. Remote machines are added using their Tailscale hostnames with custom labels. Sessions on remote machines appear alongside local sessions, allowing unified management of all machines from a single interface.

FirstMate creates remote Secondmates on other machines to distribute work. A remote Secondmate operates as another FirstMate instance on a different machine, receiving work assignments from the primary FirstMate. Projects can be assigned to specific remote machines, with all associated work executed there.

Remote Secondmates provide continuity when the primary laptop goes offline. Since most orchestration occurs on remote Secondmates running on the Mac Mini, agent work continues independently. Upon laptop reconnection, the primary FirstMate can synchronize with completed work and resume operations.

The iPhone connects to the Tailscale network through the Tailscale app, enabling SSH connections to any machine using Tailscale IP addresses or hostnames. The Ship SSH client provides single-handed operation through a dial interface, eliminating mobile keyboard usage. The dial expands to reveal command groups and saved frequent commands. Voice input enables complex commands without typing, with on-device transcription processing.

Terminal-based workflows maintain consistent experiences across laptop, desktop, and mobile environments. All desktop-accessible functionality remains available through phone SSH connections, preserving workflow continuity regardless of device used.

Keep Kun Chen in your library

Save the videos and channels worth coming back to, and find them again in one place.