Blog · AI
LM Studio on Mac: Run It as a Headless LLM Server (2026 Guide)
What's new in LM Studio 0.4 and Bionic, how to run LM Studio headless on a Mac with the lms CLI, call its OpenAI- and Anthropic-compatible API, and which Mac to use.

LM Studio is one of the easiest ways to run open models on a Mac, and since version 0.4 it also runs without its window, as a headless server. This guide covers what changed in 2026, how to set up LM Studio as an always-on LLM server on a Mac, how to call its OpenAI- and Anthropic-compatible API, and which Mac to use.
What's new in LM Studio in 2026
- LM Studio 0.4 (January 28, 2026) introduced
llmster, the engine behind the desktop app packaged to run headless, with no GUI. The latest 0.4 release at the time of writing is 0.4.26 (October 13, 2026). - Parallel requests. The llama.cpp engine handles several requests to the same model at once with continuous batching, instead of queueing them. At launch, LM Studio said MLX support for this was still in the works.
- A stateful REST API. The
/v1/chatendpoint returns aresponse_idyou can pass back asprevious_response_id, and it can use your configured MCP servers, gated by permission keys. - Compatible endpoints. OpenAI-compatible
/v1/chat/completionsand/v1/responses, plus an Anthropic-compatible/v1/messages, so most SDKs and tools work by changing the base URL. - Bionic (July 16, 2026), a separate agent app for open models that uses LM Studio for local inference. Its free plan covers local models; Bionic+ ($20/month) and Pro ($100/month) add hosted models.
Install LM Studio headless on a Mac
On a cloud Mac you'll usually want the server running without anyone logged in to the desktop. Connect over SSH and run:
curl -fsSL https://lmstudio.ai/install.sh | bash
lms daemon up
lms runtime update mlx
Then download and load a model. lms get searches LM Studio's catalogue; on Apple silicon you can choose MLX or GGUF builds:
lms get <model>
lms ls
lms load <model_key> --context-length 8192 --ttl 3600
lms ps
--ttl unloads the model after an hour without requests, which frees memory on a shared machine. Finally, start the API server:
lms server start --port 1234
Call the API
Any OpenAI-compatible client works. With curl:
curl http://localhost:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "<model_key>", "messages": [{"role": "user", "content": "Say hello"}]}'
In the OpenAI Python or JavaScript SDK, set the base URL to http://localhost:1234/v1. Tools built for Anthropic's Messages API can point at /v1/messages instead.
Reach it safely from your laptop
The server listens on 127.0.0.1 by default, so only the Mac itself can reach it. The safest way to use it from elsewhere is an SSH tunnel:
ssh -N -L 1234:localhost:1234 you@your-mac
Your laptop's http://localhost:1234 now reaches the Mac's server. If you need other machines to connect directly, start the server with --bind 0.0.0.0, turn on authentication in LM Studio's server settings, and allow only the IP addresses you trust. LM Studio's own documentation warns that a non-localhost bind exposes the server.
MLX or GGUF?
On Apple silicon, MLX builds use Apple's own machine learning framework and are usually the fastest choice for a single user. GGUF builds run on llama.cpp, which gets the parallel-request batching first and supports the widest range of models. If you serve several users or agents at once, try the GGUF build of the same model and compare. Read more in What is Apple MLX?
Which Mac to run it on
Memory decides which models fit. As a rough guide, a 4-bit model needs a little over half a gigabyte per billion parameters, plus room for the context and macOS:
- Mac mini M6 with 24GB: 7B to 14B models for coding help, chat and embeddings.
- Mac Studio M5 Max with 36GB: models up to about 30B, with more GPU power for faster replies.
- Mac Studio M5 Ultra with 96GB: 70B-class models at 4-bit, or several smaller models loaded at once.
A Hatmac Mac is dedicated to you, so the model stays loaded and nobody else's workload slows it down. For bigger models, see connecting Macs into an AI cluster with exo.
Mac mini M6
24GB · 512GB SSD
More memory and storage for larger projects and caches.
from $219/mo
- Monthly$259/mo
- 6 months$249/mo
- 12 months$219/mo
Mac Studio M5 Max
36GB · 512GB SSD
High GPU throughput for ML, rendering and parallel CI.
from $599/mo
- Monthly$799/mo
- 6 months$699/mo
- 12 months$599/mo
Mac Studio M5 Ultra
For AI96GB · 1TB SSD
96GB unified memory for large local LLMs and fine-tuning.
from $1,299/mo
- Monthly$1,499/mo
- 6 months$1,399/mo
- 12 months$1,299/mo
Prices in USD per month for each machine's starting configuration. More memory, storage or several machines? Ask us.
FAQ
Is LM Studio free?
Yes. LM Studio is free to download and run local models with. Bionic's paid plans only add hosted cloud models. Check LM Studio's terms for your organisation's use.
Can LM Studio run without the desktop app open?
Yes. Since 0.4, the llmster daemon runs headless. Start it with lms daemon up and manage everything with the lms command.
Does LM Studio work with OpenAI and Anthropic SDKs?
Yes. It offers OpenAI-compatible /v1/chat/completions and /v1/responses endpoints and an Anthropic-compatible /v1/messages endpoint.
Should I use LM Studio or Ollama on a Mac server?
Both work well. LM Studio has MLX support, a desktop app and the Bionic agent; Ollama is a lighter command-line server. See running Ollama on a Mac mini server.