March 31, 2026

I BOUGHT A MAC MINI SO MY AI NEVER STOPS WORKING

It’s 11:47 on a Tuesday night and Claude is halfway through refactoring my authentication layer. It’s been reading files for twenty minutes. It understands the entire dependency chain — which services call which, where the tokens flow, what breaks if you touch the wrong abstraction. That knowledge lives in the context window, accumulated over an hour of tracing code paths I didn’t even know existed.

I need to sleep.

I close my laptop.

And just like that — gone. Every file it mapped, every architectural decision it surfaced, every connection it drew between modules I wrote six months apart. Tomorrow morning I’ll open the lid, start a new session, and spend the first twenty minutes rebuilding what took an hour to construct. If I can even remember what I was doing.

This happened enough times that I stopped thinking of it as an inconvenience and started thinking of it as a design flaw in how I work.

So I fixed it.

I bought a Mac Mini, put it on a shelf next to my router, and turned it into a machine that never sleeps. My Claude Code sessions run on it around the clock. I SSH in from wherever I happen to be — my cafe in northern Michigan, a hotel, the couch, my phone — and everything is exactly where I left it. The context is warm. The refactor finished at 3am. The results are waiting.

This is the complete guide to that setup.

The short version

claude YOUR LAPTOP anywhere SSH TAILSCALE encrypted MAC MINI ALWAYS ON app-1 app-2 chai build git TMUX SESSIONS persist when you disconnect

How it works

· · ·
01

THE COST OF CLOSING YOUR LAPTOP

The context window is the most valuable thing you build in a session. When you start Claude Code on a project, it reads your instructions, your architecture, your commit history. Over the course of an hour, it traces code paths, discovers dependencies, builds a model of how your system works. Claude Code can resume past sessions with --continue — but it rebuilds from the transcript, which costs time, tokens, and loses the deep reasoning state. The richest context is always the one that never stopped running.

Closing your laptop is like firing your best engineer at the end of every workday and hiring a new one in the morning. Same title. Same desk. The institutional knowledge walks out the door every night.

The fix isn’t discipline. The fix is architectural: put your AI development environment on a machine that doesn’t depend on your physical presence.

<$2 per month in electricity. The Mac Mini draws about 7 watts at idle, under 20 watts with active sessions. Less than a nightlight.
· · ·
02

WHAT CLAUDE CODE ACTUALLY NEEDS

Claude Code is network-bound, not compute-bound. All the intelligence happens on Anthropic’s servers. Your machine runs the CLI, orchestrates API calls, manages the context window, and reads/writes files. Here’s what that means for hardware:

RAM Is Everything

SetupRAMRuns Comfortably
Single project16GB1–2 sessions (each grows to ~1–2GB active)
Multi-project24–48GB3–4 sessions, Docker, multiple servers
Everything at once64GB5+ sessions, Xcode, Docker, local AI models

RAM is the one spec you cannot change later. CPU matters less — the API does the thinking. Put the Mac Mini on Ethernet, not Wi-Fi. GPU is irrelevant unless you’re running local AI models alongside Claude Code.

· · ·
03

THE MACHINE

THE BUILD

Mac Mini M4 Pro — 64GB RAM, 1TB Storage — $2,199

Customize at checkout on apple.com. Select M4 Pro chip, upgrade RAM to 64GB, select 1TB storage.

TierConfigPriceGood For
EntryM4, 16GB, 256GB$499Single session, light projects
SmartM4, 24GB, 512GB$7992–3 sessions, web dev
PowerM4 Pro, 64GB, 1TB$2,199Everything at once
OverkillM4 Max, 64GB, 1TB$3,199Local AI models too

The $799 config is genuinely excellent. I went with 64GB because I run five projects simultaneously and wanted zero compromises.

Why Not a Cloud VPS?

· · ·
04

EVERYTHING YOU NEED

Three tools. All free. One $10 purchase that solves a problem Apple should have fixed a decade ago.

Tailscale

Encrypted mesh VPN. Access your Mac Mini from anywhere. No port forwarding, no DNS, no firewall rules. Free for personal use.

tailscale.com/download

tmux

Terminal sessions that persist when you disconnect. Start Claude Code inside tmux, close your laptop, reconnect hours later — everything is where you left it. brew install tmux

github.com/tmux/tmux

HDMI Dummy Plug

Without a display, macOS degrades — GPU acceleration drops, Screen Sharing fails. A $10 plug tricks macOS into thinking a 4K monitor is connected. Plug it in. Forget it exists.

Amazon: “HDMI dummy plug 4K”

· · ·
05

THE SETUP: UNBOXING TO FIRST SSH

Fifteen minutes from opening the box to your first remote Claude Code session. You don’t need to type these commands yourself — open Claude Code and tell it “set up SSH keys, install tmux, and configure this machine for headless use.” It handles everything. The steps below show what happens under the hood.

Step 1: macOS Configuration

Plug in the Mac Mini (power + Ethernet + HDMI dummy plug). Complete macOS setup with a borrowed keyboard and monitor. Then:

System Settings > General > Sharing:
  ✓ Remote Login (SSH) — ON

System Settings > Energy:
  ✓ Prevent automatic sleeping
  ✓ Wake for network access
  ✓ Start up automatically after power failure

System Settings > General > Login Items:
  + Tailscale
Step 2: Install the Essentials
# Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# tmux
brew install tmux

# Claude Code
npm install -g @anthropic-ai/claude-code

# Authenticate
claude
Step 3: Tailscale
brew install --cask tailscale

Open Tailscale, sign in. Install on your laptop with the same account. Both devices now see each other from anywhere.

Step 4: SSH Key Authentication
# From your laptop
ssh-keygen -t ed25519
ssh-copy-id your-username@your-mac-mini

# On the Mac Mini — harden SSH
sudo nano /etc/ssh/sshd_config

PasswordAuthentication no
PermitRootLogin no
MaxAuthTries 3
AllowUsers your-username
Step 5: Create tmux Sessions
$ ssh your-mac-mini
$ tmux new -s my-project
$ claude

# Detach: Ctrl+B, then D. Or close your laptop.

# Later, from anywhere:
$ ssh your-mac-mini
$ tmux attach -t my-project
# Claude Code is still running. Context intact.
Step 6: Auto-Recovery After Reboot
$ cat > ~/Library/LaunchAgents/com.user.tmux-sessions.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key><string>com.user.tmux</string>
  <key>ProgramArguments</key>
  <array><string>/bin/bash</string><string>-c</string>
  <string>/opt/homebrew/bin/tmux new-session -d -s project-one 2>/dev/null || true</string>
  </array>
  <key>RunAtLoad</key><true/>
</dict></plist>
EOF

$ launchctl load ~/Library/LaunchAgents/com.user.tmux-sessions.plist

Power goes out at 3am, comes back at 3:01am. The Mini boots, Tailscale reconnects, tmux sessions are recreated. You won’t know it happened.

The context window is the most expensive thing you build in a session. tmux means you never lose it unless you choose to.

· · ·
06

A DAY IN THE LIFE

0:composed 1:fermata 2:chai 3:servers 4:git
$ ssh mac-mini
Connected. Last login: Tue Mar 31 02:17

$ tmux attach -t composed

Claude > Completed test suite — 47/47 passing.
Claude > Changes written to src/auth/middleware.swift
Claude > Diff summary: +142 -89 across 4 files
Claude > Ready for review. What’s next?

jesse > now do the same thing for the settings screen
Claude > Reading SettingsView.swift...
[composed] 0:composed* 1:fermata 2:chai 3:servers 4:git mac-mini • 7:14 AM
7:14 AM

I open my laptop at the cafe. Two keystrokes: ssh mac-mini, tmux attach -t composed. The terminal fills with the last thing Claude was doing — it finished a test suite at 2am and all 47 tests pass. I read the diff, approve it, and say “now do the same thing for the settings screen.” It already knows the codebase. It starts immediately.

10:30 AM

A customer walks in. I close the laptop and make their latte. Seven minutes later, I’m back. tmux attach. Nothing was lost. Claude is mid-file-read, waiting for me to review something. We continue.

2:15 PM

I need to switch to my chai website. Ctrl+B, 2 — instant switch to a completely different Claude Code session, different project, different context. Update the product page. Review and deploy. Four minutes.

11:52 PM

I’m done for the night. I tell Claude to run a full engineering audit — twenty minutes of autonomous work. I close the laptop. I go to bed.

TRAVELING

Hotel in Traverse City. Different Wi-Fi, different city. SSH in through Tailscale, attach to tmux. Four seconds. The session doesn’t know I’m 80 miles from home. It doesn’t care.

You stop thinking in sessions and start thinking in streams. A feature isn’t something you grind out in one sitting — it’s something you advance across days, from anywhere.

· · ·
07

THE MATH

Mac Mini

$2,273

3-year total
14 dedicated cores • 64GB • macOS

VS

Cloud VM

$21,000+

3-year on-demand
AWS/GCP: $400–600/mo • Linux only

Mac Mini M4 ProCloud VM
CPU14 dedicated cores8 shared vCPUs
RAM64GB64GB
Year 1$2,220$4,800–7,000
Year 2~$20$4,800–7,000
Year 3~$20$4,800–7,000
macOS / XcodeYesNo
· · ·
08

WHEN TO SKIP THIS

THE REAL SHIFT

The Mac Mini draws under 20 watts with active sessions. It sits on a shelf, silent, running five development contexts that collectively understand more about my projects than I do.

When your development environment lives on a machine that never sleeps, you stop thinking in sessions and start thinking in streams. A feature is something you advance, incrementally, across days and locations — with an AI that remembers everything.

Close the laptop at midnight. Open it at 7am in a different city. Everything is exactly where you left it. That’s the setup.

I build iOS apps, a chai brand, and a music platform — mostly from a terminal conversation with an AI. My cafe is in Charlevoix, Michigan. My Mac Mini is on a shelf by the router. These are the same distance from the work.

· · ·
09

EVERYTHING YOU NEED — ONE LIST

ItemPriceLink
Mac Mini$499–3,199apple.com
Tailscale$0tailscale.com
tmux$0github.com/tmux
Claude Code$0 (API costs)docs.anthropic.com
HDMI dummy plug~$10Amazon: “HDMI dummy plug 4K”
Ethernet cable~$8Amazon: “Cat 6 ethernet 3ft”
Blink Shell (iPad)$19.99blink.sh

RELATED READING

· · ·
10

FAQ

Does Claude Code keep running when I detach from tmux?

Yes. tmux sessions are independent of your SSH connection. Claude Code continues processing — reading files, writing code, running builds. When you reattach, you see everything that happened.

What if the Mac Mini loses internet?

Claude Code sessions pause — they need API access. When internet returns, you resume. The tmux sessions themselves survive indefinitely as local processes.

M4 Pro or M4 Max?

M4 Pro. Claude Code is API-bound, not GPU-bound. The Max adds GPU cores you’ll never use headless. Save $1,000 or put it toward 64GB RAM.

What about Claude Code’s built-in remote features?

Claude Code has remote triggers and scheduled agents on Anthropic’s infrastructure — excellent for automation. For interactive development, nothing replaces a persistent tmux session on hardware you control. Use both.

Is the HDMI dummy plug really necessary?

Yes. Without a display, macOS degrades — GPU acceleration drops, Screen Sharing fails, processes break silently. A $10 plug prevents all of it.

Can I access the Mac Mini from my phone?

Install Tailscale on your phone, use any SSH app (Termius, Blink Shell for iPad). Perfect for checking on overnight builds.