Remote AI Development on Mac Mini: Building a Portable Development Rig That Goes With You
The Modern Developer's Dilemma
Let's face it: Mac minis make excellent development machines. They're affordable, powerful, and if you're deep into AI-assisted coding workflows, they can handle Claude, ChatGPT, and other AI tools without breaking a sweat. But here's the catch—they're not exactly portable.
Many developers find themselves in a situation where their entire workflow, project files, AI contexts, and work-in-progress code live on a stationary Mac mini. Moving to a different room (or city) shouldn't mean abandoning that machine. Fortunately, with modern networking tools and some clever terminal tricks, you can access and control your Mac mini from virtually anywhere as if you were sitting right in front of it.
Step 1: Activate SSH Access on Your Mac mini
The foundation of remote development is SSH—Secure Shell. This protocol lets you open a terminal session on your Mac mini from any other device.
Getting started is straightforward:
- Open System Settings on your Mac mini
- Navigate to General → Sharing
- Enable Remote Login
That's it. Your Mac mini is now listening for SSH connections from your local network. You've just turned it into a remote-accessible machine.
Step 2: Break Free from Your Local Network with Tailscale
Here's where things get interesting. Enabling SSH only works when you're on the same Wi-Fi network. The moment you leave your home or office, your Mac mini becomes unreachable.
The solution? Tailscale—a modern VPN service built on WireGuard that creates a private, encrypted mesh network across all your devices.
Think of Tailscale as creating an invisible private Wi-Fi network that spans the entire internet. Your Mac mini, MacBook Air, iPhone, and any other device you add can communicate securely as if they're all sitting on the same network, regardless of where they physically are.
Installation is dead simple:
- Download and install Tailscale on both your Mac mini and your client device
- Sign in with the same account on each device
- Accept the connection request
Once connected, your Mac mini gets a stable hostname that works globally. SSH into it from Tokyo, São Paulo, or your kitchen—the connection remains secure and reliable.
Step 3: Keep Your Mac mini Awake and Responsive
Here's a sneaky problem that catches many developers off guard: sleep modes.
Most Macs are configured to sleep after a period of inactivity. When your Mac mini enters sleep mode, the hard drive spins down, the network adapter goes to sleep, and your SSH connection becomes impossible. You'll be locked out remotely, and you can't even reconnect until someone physically wakes the machine.
To prevent this, run this single command on your Mac mini:
sudo pmset -a disablesleep 1
This command ensures your Mac mini stays awake indefinitely. The display may turn off to save power, but the machine remains fully operational and SSH-accessible.
Important caveat: Don't run this on your laptop. Laptops can overheat when the lid is closed if they're not sleeping. Also, ensure your Mac mini has adequate ventilation before enabling this setting.
One more thing—never manually send your Mac mini to sleep using the Apple menu. Doing so bypasses this setting, and you'll lose remote access until someone wakes it manually.
Step 4: Persist Your Work Sessions with tmux
Now for the final piece of the puzzle. Your Mac mini is always on and reachable, but what about the device you're connecting from?
Imagine this scenario: You SSH into your Mac mini from your MacBook Air and start a long-running AI code generation task. Then your meeting starts, and you close the MacBook's lid. After a few minutes, the MacBook sleeps, your SSH connection drops, and—oops—your code generation was interrupted mid-way.
This is where tmux (terminal multiplexer) saves the day.
tmux is a powerful utility that runs terminal sessions independently from your SSH connection. Here's the magic: when you run a process inside a tmux session, it keeps running even if your SSH connection drops. When you reconnect later, you can reattach to that session and see exactly where it left off.
Getting started with tmux:
# Install tmux (if not already installed)
brew install tmux
# Create a new tmux session
tmux new-session -s work
# Inside the tmux session, start your AI coding task
# Run Claude Code, Python scripts, whatever you need
# Detach from the session (Ctrl+B, then D)
# Close your laptop, take a nap, travel the world
# Reconnect later and reattach
tmux attach-session -t work
The beauty of this approach is that your work continues running on the Mac mini regardless of what happens to your client device. Network hiccup? No problem. Your laptop sleeps? Doesn't matter. You can disconnect, reconnect hours later, and your processes are still running exactly where you left them.
Creating Your Always-On Development Environment
By combining these four layers—SSH, Tailscale, persistent wake settings, and tmux—you've created something powerful: a development environment that's truly location-independent.
Your Mac mini becomes less like a stationary desktop and more like a distributed compute node. You can work from anywhere, on any device, knowing that:
- Your Mac mini is always reachable (Tailscale)
- It stays awake and ready (pmset)
- Your code keeps running even if you disconnect (tmux)
- Everything is encrypted and secure (SSH + Tailscale)
For modern AI-assisted development workflows where you're heavily relying on prompts and code generation, this setup is transformative. You get the power of a dedicated machine without the limitation of being tethered to your desk.
Pro Tips for the Road
- Use SSH key pairs instead of password authentication for faster, more secure connections
- Organize your tmux sessions by project—create separate sessions for different work streams
- Monitor Mac mini resources remotely with Activity Monitor to ensure it's not getting overwhelmed
- Keep Tailscale updated to benefit from the latest security patches
Welcome to the era of truly portable development. Your Mac mini just became as flexible as you are.