A lot of people bought a Mac mini this year to run something that never stops: an AI agent, a local model, a build runner, a Plex or Home Assistant box, an iOS CI machine. Apple Silicon makes it a great always-on server. It idles at a few watts, it's silent, and it's fast.
The weak spot is usually the house it sits in. Power blinks during a storm and the Mac doesn't come back. The router reboots at 3 a.m. Your ISP hands you a new IP address. Your upload speed tops out at 20 Mbps. Someone unplugs it to charge a vacuum.
This guide covers two parts:
- Setting up macOS so a Mac mini survives being a server, wherever it lives.
- Your options for getting it out of the house: a better home setup, renting a Mac in the cloud, or colocating your own.
Part 1: make macOS behave like a server
Stop it from sleeping and make it restart after power loss
In System Settings > Energy, turn on:
- Prevent automatic sleeping when the display is off
- Wake for network access
- Start up automatically after a power failure
Or do the same from Terminal:
sudo pmset -a sleep 0 # never sleep sudo pmset -a disksleep 0 # never spin down disks sudo pmset -a womp 1 # wake on network access sudo pmset -a autorestart 1 # power back on after a power failure pmset -g # check the result autorestart 1 matters most here. Without it, a two-second power cut can leave your server off until someone presses the button.
Turn on remote access
In System Settings > General > Sharing:
- Remote Login gives you SSH
- Screen Sharing or Remote Management gives you VNC, for the rare time you need the desktop
Then switch SSH to keys only. Copy your key over first:
ssh-copy-id you@your-mac-mini Then disable password logins. On recent macOS, put the setting in its own file so updates don't overwrite it:
echo "PasswordAuthentication no" | sudo tee /etc/ssh/sshd_config.d/100-no-passwords.conf echo "KbdInteractiveAuthentication no" | sudo tee -a /etc/ssh/sshd_config.d/100-no-passwords.conf Test a new SSH session before you close the current one.
Also turn on the firewall in System Settings > Network > Firewall.
Know what FileVault does to a remote reboot
With FileVault on, a Mac that restarts stops at the pre-boot unlock screen. Until someone unlocks the disk, nothing runs and SSH may not answer. Two ways to handle it:
- For reboots you plan, use
sudo fdesetup authrestart. It unlocks the disk once for the next boot, so the Mac comes back up on its own. - For reboots you don't plan (power loss, kernel panic), you need console access. Some recent macOS versions can unlock FileVault over SSH, so check whether yours does. If not, you need a screen and keyboard, either in person or through an IP KVM (more on that below).
Turning FileVault off is the other option. Only do that if the machine sits somewhere physically secure.
Automatic login doesn't work while FileVault is on. That matters if your app runs as a LaunchAgent, which needs a logged-in user.
Keep your service running
Run long-lived processes with launchd instead of leaving them in a terminal. A LaunchDaemon starts at boot without anyone logging in, and KeepAlive restarts it if it crashes:
<!-- /Library/LaunchDaemons/com.example.agent.plist -->
<?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.example.agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/my-agent</string>
</array>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
<key>UserName</key><string>youruser</string>
<key>StandardOutPath</key><string>/var/log/my-agent.log</string>
<key>StandardErrorPath</key><string>/var/log/my-agent.log</string>
</dict>
</plist> sudo launchctl bootstrap system /Library/LaunchDaemons/com.example.agent.plist
sudo launchctl print system/com.example.agent | grep state
Control updates
A server that installs a macOS update and reboots itself at night can take your service down without warning. In System Settings > General > Software Update > Automatic Updates:
- keep security responses and system files on
- turn off the automatic install of macOS updates
Then install updates yourself at a time you choose, followed by fdesetup authrestart if you use FileVault.
Headless quirks
A Mac mini runs fine with no monitor attached. Screen Sharing on a headless Mac can give you a tiny default resolution, though, and a few apps behave oddly without a display. A cheap HDMI "dummy plug" (display emulator) fixes both.
Back it up somewhere else
A server in one place with its only backup in the same place has no real backup. Use Time Machine to a network share, or restic / borg to object storage or another machine offsite.
Part 2: where should it live?
Option A: keep it at home, but harden it
- A small UPS covers short power cuts. A Mac mini draws so little that even a basic unit keeps it up for a long time. Plug the router in too.
- Use a dynamic DNS service, or a tunnel (Cloudflare Tunnel, Tailscale), so a changing home IP doesn't break access.
- Check your ISP's terms. Some don't allow servers on residential plans.
This costs least. You still get home internet, a home upload speed, and a home address for anything public.
Option B: rent a Mac in the cloud
Several providers rent Mac minis by the hour or month (AWS EC2 Mac, MacStadium, Scaleway and others). You get data-center power and network, and nothing to ship.
The catch: you don't own it, monthly prices are usually well above colocation, and some services have minimum rental periods. AWS, for example, bills Mac dedicated hosts for at least 24 hours. If you already own the Mac mini, you're paying twice.
Option C: colocate your own Mac mini
You ship the Mac mini to a data center. They put it on a shelf, connect power and a network port, and give you public IP addresses. You manage it remotely, the same way as above.
What to check before you pick a provider:
- Size. Mini PC shelf plans list maximum dimensions. A current Mac mini is about 5 x 5 x 2 inches, and older models are about 7.7 x 7.7 x 1.4 inches.
- Power. Small plans often include 1 A at 120 V, which is 120 W. An idle Mac mini uses a few watts. To see peak draw under your real workload, use a plug-in watt meter;
sudo powermetricsonly shows the chip, not the whole machine. - Network. Ask for the port speed and how many public IPv4 addresses you get. Use a static IP, set in System Settings > Network > Ethernet > Details > TCP/IP.
- Console access. If a reboot leaves it at the FileVault screen, or a bad network change locks you out, you need a way in that isn't SSH. Ask whether they offer an IP KVM or another out-of-band option, and how fast someone can press the power button for you.
- Shipping. Use the original box or solid foam. Include the power cable, and the HDMI dummy plug if you use one. Write down the serial number, and note which Ethernet port you configured.
Pre-ship checklist
-
pmset -gshowssleep 0andautorestart 1. - SSH works with your key, and password login is off.
- Your service runs from a LaunchDaemon and comes back after
sudo reboot. - You know how you'll handle FileVault after an unplanned reboot.
- Automatic macOS installs are off.
- A backup ran, and you restored one file from it to prove it works.
- The static IP settings from your provider are saved somewhere you can reach without the Mac.
Where Avant fits
Disclosure: I work at Avant AI Technologies, and we sell exactly option C.
Our Mini PC colocation plan in Flint, Michigan is $35/month (Sofia, Bulgaria: €34/month, excl. VAT). The plan page describes it as shelf space for mini PCs and Mac minis, and it includes:
- a 1 Gbps port
- 2 public IPv4 addresses and a /64 of IPv6
- 1 A at 120 V of power
- room for a device up to 8 x 3 x 8 inches, which fits every Apple Silicon Mac mini
- an Out-of-Band VPN option, so you can reach the console when the main network path is down
Details and ordering: https://hosting.avantaitech.com/colocation?utm_source=devto&utm_medium=article&utm_campaign=mac-mini-colo&utm_content=a03-macmini
Questions about your setup? Ask in the comments, even if the honest answer is "a UPS at home is enough for you"

