Back to help center
    Getting started

    Best practices for configuring your macOS server

    Sleep, energy, Spotlight and the other settings every hosted Mac should have.

    6 min read

    Before you change anything, please skim the companion article: What NOT to do with your hosted Mac. The settings below assume you've read it.

    Disable Spotlight indexing

    If you aren't using the Mac as a desktop, Spotlight is just CPU and disk overhead. We've seen it tank server performance and trigger unrelated stalls.

    sudo mdutil -a -i off
    

    Energy, sleep and reboot

    A headless server should never sleep and must come back on its own after a power event. Re-apply after every macOS upgrade — Apple sometimes resets these.

    sudo systemsetup -setallowpowerbuttontosleepcomputer off
    sudo systemsetup -setcomputersleep Off
    sudo systemsetup -setrestartfreeze on
    sudo pmset sleep 0
    sudo pmset displaysleep 0
    sudo pmset autorestart 1
    sudo pmset womp 1
    sudo pmset repeat wakeorpoweron MTWRFSU 07:00:00
    sudo pmset -c powernap 0
    sudo pmset -a standby 0
    sudo pmset -a disksleep 0
    sudo pmset -a hibernatemode 0
    sudo defaults write /Library/Preferences/com.apple.screensaver loginWindowIdleTime 0
    

    What that does:

    • All sleep / standby / hibernate modes off.
    • autorestart: boot back up after a power failure.
    • womp: wake on network.
    • repeat wakeorpoweron: boot every day at 07:00 as a safety net in case somebody accidentally shut the Mac down.

    Auto-login

    A hosted Mac with no monitor still needs an active GUI session for things like Xcode CI, Resolve render nodes, or Screen Sharing performance. Set the admin user to log in automatically on boot from System Settings → Users & Groups → Automatic login.

    Keep SSH and Remote Management on

    Both Remote Login (SSH) and Remote Management (VNC) should stay enabled. Losing both means losing the Mac.

    Updates

    Schedule macOS minor updates yourself. Don't enable "install updates automatically" on a server you can't physically attend — a stuck update can leave the Mac at a screen you can only escape with our help.