Mac Mini M4 Pro:
The Ultimate OpenClaw Server
/** How to size, buy, set up and cost out a Mac Mini M4 Pro as an always-on OpenClaw host */
π Reported throughput on Apple Silicon (verify on your own unit)
| Model | tok/s | Context | Use Case |
|---|---|---|---|
| llama3.1:8b | ~30β50 | 128K | // Default conversational model |
| qwen2.5:14b | ~18β28 | 128K | // Stronger Chinese, longer context |
| gemma3:12b | ~20β30 | 128K | // Code + vision tasks |
| nomic-embed-text | n/a | 8K | // Embeddings, not chat generation |
β‘ Running cost β the arithmetic, so you can redo it with your own tariff
Monthly figures assume the machine sits in that state 24/7 at $0.12/kWh: watts Γ· 1000 Γ 730 hours Γ $0.12. Substitute your own tariff. A real always-on host spends most of its time idle and only briefly at load, so your bill will land near the idle number, not the inference one. To measure rather than estimate, put an energy-monitoring smart plug on it for a week.
βοΈ A starting config for a 24 GB M4 Pro
π Recommended Accessories
1. Which configuration to actually buy
Unified memory is the only spec that decides what you can run; everything else decides how fast it runs. A 4-bit quantised model needs roughly 0.6 GB per billion parameters, plus headroom for the context window and for macOS itself. That arithmetic, not a benchmark, should pick your configuration. A model that does not fit does not run at any speed.
| Configuration | What fits | Verdict |
|---|---|---|
| M4, 16 GB | 8B comfortably; 14B is tight | Fine if you will only ever run an 8B chat model and nothing else lives on the box. |
| M4 Pro, 24 GB | 8B and 14B with room for context | The sensible default for an always-on agent host. Leaves headroom for a browser, Docker and the OS. |
| M4 Pro, 48 GB | 32B-class models | Worth it only for a specific 32B workload. For agent tasks a well-prompted 14B usually wins on latency. |
| M4 Pro, 64 GB | 70B at 4-bit, slowly | It fits, but a 70B feels sluggish interactively. Buy this for batch work, not for chat. |
Rule of thumb: 4-bit size in GB β parameters in billions Γ 0.6. An 8B lands near 5 GB, a 14B near 9 GB, a 32B near 20 GB, a 70B near 40 GB. Add 2β4 GB for a long context and leave about 8 GB for macOS. Once the total exceeds your unified memory, macOS starts swapping and throughput collapses. That cliff, not the tokens-per-second figure, is what you are buying around.
2. From unboxing to first response
Every command below runs on the Mac Mini itself, over SSH or with a keyboard attached. About twenty minutes end to end, most of it waiting for the model download.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # follow the printed instructions to put brew on your PATH, then: brew install node
OpenClaw needs a current Node; Homebrew is the least painful way to get one on macOS.
brew install --cask ollama open -a Ollama # start it once so the background service registers ollama pull llama3.1:8b
The first pull downloads several GB. Ollama uses Metal automatically on Apple Silicon, so there is no GPU flag to set.
ollama run llama3.1:8b "reply with the single word: ready"
If this fails, the problem is Ollama, not OpenClaw. Isolating it here saves a lot of confusion later.
curl -fsSL https://openclaw.ai/install.sh | bash openclaw --version openclaw doctor
Confirm the version prints before starting the gateway; a partial install fails in confusing ways.
3. Surviving reboots, sleep and power cuts
A desktop Mac is not a server out of the box. Three defaults will take your agent offline: it sleeps, it stays off after a power cut, and nothing relaunches the gateway at boot. Fix all three, or you will find the agent unreachable at the worst possible moment.
sudo pmset -a sleep 0 sudo pmset -a disablesleep 1 # confirm: pmset -g | grep -E 'sleep|disablesleep'
Display sleep is fine and saves power. System sleep is what kills the gateway.
sudo pmset -a autorestart 1
Without this the machine stays off after a brief outage, which defeats the point of putting it on a UPS.
openclaw gateway install openclaw gateway start openclaw gateway status
`gateway install` writes and loads the launchd agent for you. Writing your own plist works until an upgrade changes the expected arguments, at which point you own a subtly broken copy.
sudo reboot # once it is back, from another machine on the network: curl -sf http://<mac-mini-ip>:18789/health && echo OK
The only test that counts. Do it now rather than discovering the gap in three weeks.
4. Benchmark your own machine
Published throughput numbers β including the ranges on this page β are close to useless for capacity planning, because they depend on quantisation, context length and thermal state. Measuring your own unit takes two minutes and gives you a number you can actually plan against.
ollama run llama3.1:8b --verbose "Write two paragraphs about tide pools."
Read the eval rate line in the output: that is generation tokens per second, the number that decides how fast a reply feels. Ignore prompt eval rate, which measures a different and much faster phase and is what inflated figures usually quote.
ollama run llama3.1:8b --verbose "$(cat some-long-document.txt) Summarise the document above."
Throughput falls as context grows. Measure at the context length you will actually use, not at zero.
sudo powermetrics --samplers cpu_power,gpu_power -i 1000 -n 10
Reports package power in milliwatts while a request runs. For wall power including PSU losses, an energy-monitoring smart plug is more honest, since powermetrics cannot see the supply.
pmset -g thermlog
If this ever reports throttling, your sustained throughput is below your burst throughput and the fan curve is why.
When a Mac Mini is the wrong answer
- βYou need more than 64 GB, or CUDA-only tooling. Buy or rent an NVIDIA machine instead.
- βThe agent must be reachable at a static public address. A Mac at home behind CGNAT will fight you; a VPS is simpler.
- βYou want the cheapest always-on host and only need a small model. A Raspberry Pi 5 does that for a fraction of the price.
- βYou run one batch job a week. Renting GPU time by the hour costs less than hardware that idles for six days.