Guide · October 2026

Run a local LLM overnight on a MacBook

Hand Ollama or LM Studio a long generation, embedding or fine-tuning job and close the lid without it stopping. The free options (caffeinate, pmset) and their limits come first.

Lidnight stops runaway spend, silent approval stalls, and unexpected limit hits while you step away. Track Claude Code, Codex, Antigravity, Gemini and Kiro sessions, limits and cost, approve from your phone, and keep going with the lid closed.

Download freePro trial included · no card · Apple Silicon, macOS 13+Pro pricing ($9.99 / 3 Macs $14.99) ›

Homebrew: brew install whereisdw/tap/lidnight

Why it stops

Closing the lid puts the Mac to sleep, and GPU work stops with it. Short of clamshell mode (external display, power and keyboard all connected), there's no built-in way around it.

The free way, right now

A job you start yourself: wrap it, caffeinate -i your-command. It blocks idle sleep until that command exits (man caffeinate). For a process that's already running, such as a model server, caffeinate -i -w <PID> holds it only while that process lives. Find the PID with pgrep -x <process name> or in Activity Monitor.

With the lid closed: man caffeinate doesn't cover closing the lid, and without an external display the Mac usually still sleeps. Running lid-closed needs sudo pmset -a disablesleep 1 (not in man pmset; check it with pmset -g | grep SleepDisabled), and you must set it back to 0 afterwards. Local models run hot, so never do this in a bag or under a blanket.

Checking: pmset -g assertions during the job shows what is holding sleep off, and afterwards pmset -g log | grep -E "Clamshell|Sleep|Wake" shows when the lid closed and the Mac slept. Limits: you turn it on and off per job, must remember to undo it, and have to watch heat and battery yourself.

If you'd rather not toggle it yourself: Lidnight

Lidnight detects when local models like Ollama, LM Studio or llama.cpp are using the GPU, stays awake while they work and sleeps once things go quiet. There's also an until-time mode if you'd rather pick an end time.

Local models run hot. Pre-spinning the fans (Pro) or capping the charge at 80% is easier on the battery during long runs, and Lidnight sleeps right away if the battery drops below your floor or it gets too hot.

Keep it on a hard, ventilated surface. Not inside a bag or under a blanket.

Try Lidnight free

Apple Silicon Macs · macOS 13 or later. Every download includes a free trial of everything in Pro (14 days or 5 lid-closed runs of 10+ minutes, whichever comes first), no payment details needed. Pro is a one-time payment (1 Mac $9.99 · 3 Macs $14.99 USD, plus regional tax) with a 14-day full refund, no questions asked.

Homebrew: brew install whereisdw/tap/lidnight