
Running my Mac Studio fully headless as an LLM server
I've been running a Mac Studio (M1 Ultra) as a dedicated, always-on Ollama server for a while — fully headless, no monitor, managed over SSH. Along the way I collected a pile of tweaks that made a real difference in throughput and stability, and wrapped them into a single install script so I could rebuild the whole thing in one shot. Sharing in case it's useful to anyone else pointing their Studio at inference.
What it does:
- Headless setup — disables the GUI and unnecessary services so RAM and GPU go to models, not the desktop
- GPU memory optimization — lets Metal use more of your unified RAM for models (configurable %), so you can fit bigger models than the default cap allows
- Ollama tuned for serving — external access, parallel requests, longer keep-alive, flash attention, several models resident at once
- Auto-start and recovery on boot via launchd, with proper logging
- Optional Docker/Colima autostart if you run containers alongside
It's just config + scripts, one install command. Not selling anything — built it for my own box, it's been rock solid, figured I'd put it out there.
Repo: https://github.com/anurmatov/mac-studio-server
Feel free to use it, fork it, or lift whatever parts are handy — it's MIT. And if you're running Apple Silicon headless for inference, the GPU-RAM allocation trick is the one setting most people don't realize they can change.