Skip to content

Overview

Coding agents and AI assistants are most useful when they can keep working while you don’t: running a long refactor overnight, answering a request from your phone, or picking up a task from a team queue. A laptop is a poor home for that work — it sleeps when you close the lid, leaves the house with you, and restarts for updates at the worst moment.

This guide turns a Mac mini into a small, dedicated AI server that:

  • never sleeps, and restarts on its own after a power cut or a freeze;
  • starts your tools automatically — Cursor, Claude, sync clients, and headless jobs such as a Cursor self-hosted worker;
  • is reachable from anywhere over a private network, with no ports opened on your router;
  • tells you what’s wrong after a reboot with a one-command health check;
  • is locked down and backed up like any machine that holds API keys and source code.
The whole setup in 3 minutes3:09
Read the transcript

0:00 Here's how to set up a Mac mini as an always-on AI server. It's a quiet home for your AI assistants and coding agents, running around the clock.

0:13 Start with the hardware. Any Apple silicon Mac mini will do. Get at least sixteen gigabytes of memory, a large SSD, and use wired Ethernet.

0:27 Next, finish the macOS setup. Install every update, give the Mac a clear name, and create one admin account for the server.

0:39 Now, keep it awake. The setup-power script turns off sleep and restarts the Mac after a power failure. It also turns on restart after a freeze. It's a dry run by default, so you can review every change first. When it looks right, run it again with --apply.

1:00 Unattended restarts come with a tradeoff. Automatic login brings your agents back on their own, but only with FileVault off. With FileVault on, the disk stays encrypted, and the Mac waits to be unlocked.

1:17 For remote access, Tailscale puts the Mac on your own private network. Turn on Screen Sharing and Remote Login, and you never open a port to the internet.

1:30 Background jobs run as LaunchAgents. A LaunchAgent starts your job at login, and restarts it if it stops. It can also run a job on a schedule instead. The guide's install script writes and loads one for you.

1:47 Sync your files with iCloud Drive, Google Drive, or OneDrive. Keep agent folders downloaded, so nothing waits on the cloud.

1:59 Then install your tools: Homebrew, Node, and Python. Homebrew keeps them all easy to update. Add Cursor and Claude, and start a Cursor private worker, so agents can run on this Mac.

2:15 Harden the machine. Turn on the firewall, use SSH keys, keep secrets in the keychain, and give agents only the access they need.

2:27 Back it up with Time Machine, keep one copy off-site, and test a restore. And remember, Git is not a backup.

2:38 Finally, after every reboot, run the health check. It checks power, remote access, and your agents, then ends with a one-line summary. Anything that needs attention shows up as a warning or a failure, so you know exactly where to look.

2:58 Always on, recoverable, and secure. The full guide, the scripts, and a printable checklist are ready when you are.

Narration: Kokoro TTS voice af_heart (Apache-2.0).

Developers, founders, and power users who already use AI tools on a Mac and want them running 24/7. You should be comfortable pasting commands into Terminal. You do not need to be a macOS administrator — every command is explained, and the scripts show what they will change before they change anything.

Layer What it does Where it’s covered
Hardware A Mac mini on wired Ethernet, ideally behind a small UPS 1. Hardware
Power pmset keeps it awake; auto-restart after power loss or freeze 3. Always on
Login FileVault, auto-login and unattended-reboot trade-offs 3. Always on
Network Tailscale private network, SSH, Screen Sharing 4. Remote access
Processes Login Items for apps, LaunchAgents for headless jobs 5. Background jobs
Files Code in git; documents in iCloud / Google Drive / OneDrive 6. Cloud storage
Tools Homebrew, Node, Python, Cursor, Cursor worker, Claude 7. AI tools
Safety Firewall, SSH keys, Keychain secrets, backups 8. Security, 9. Backups
  • your-mac-mini is the server’s name. Replace it with whatever you call yours.
  • you or YOUR_USER is your macOS short user name (run whoami to see it).
  • ~/ means your home folder, for example /Users/YOUR_USER/.
  • Commands that start with sudo need an administrator password.
  • Menu paths such as System Settings → General → Sharing are for macOS 15 Sequoia and macOS 26 Tahoe. Older versions use similar names.