Run Local LLMs on a Mac mini with Ollama: Setup, Model Picks, and 24/7 Serving

A Mac mini that never sleeps is a local AI server

You don’t need a GPU server to run a large language model. Apple Silicon’s unified memory lets the CPU and GPU share one pool, so small and mid-size models run smoothly — and a Mac mini that stays online 24 hours a day makes a natural always-on local AI server. This guide uses the 16GB M4 Mac mini as its reference machine, and covers installing Ollama, picking a model that fits, keeping it loaded, and calling it from your other devices.

First, check memory: how big a model can your Mac run?

Whether a local model runs at all — and how well — is mostly decided by unified memory. A rough rule of thumb: at 4-bit quantization, a model needs about 0.6GB per billion parameters, plus 2–4GB for macOS and context. Bigger models and longer context windows both eat more memory.

Here are download sizes for common models in the Ollama library (as of December 2026):

Model Download size Fits in
qwen3:8b about 5.2GB 16GB, comfortably
llama3.1:8b about 4.9GB 16GB, comfortably
qwen3.5:9b about 6.6GB 16GB, comfortably
gemma3:12b about 8.1GB 16GB, tight
qwen3:14b about 9.3GB 16GB, very tight
gpt-oss:20b about 14GB 16GB, does not fit

On a 16GB machine, the 8B class is the sweet spot: good enough for everyday chat, coding help, and summarizing documents. A 14B model will run, but keep the context short and don’t run other memory-hungry apps at the same time. A 20B model is not worth trying. As a rule, keep the model file at least 6–8GB smaller than your total memory so the system has room to breathe.

Install Ollama in three steps

Ollama is the fastest way in: one app that downloads models, runs inference, and serves an API. It needs macOS 14 Sonoma or newer, and an Apple Silicon chip for GPU acceleration.

On a Mac rented from Tokyo Mac, you can skip step 1. Open My Macs → Install apps on the website, tick Ollama under the AI category, and press install — it’s done in a few minutes. The installer comes from Tokyo Mac’s own software server in the same data center as the machine, so it is much faster than downloading from the internet, and every package is checked against the SHA-256 published by official Homebrew before it installs. No administrator password is needed; it works on a standard user account. You can tick Claude, ChatGPT and other AI apps on the same screen, up to 5 at a time.

Selecting Ollama under My Macs → Install apps on Tokyo Mac

On your own Mac, follow these three steps:

  1. Download and install. Get the macOS app from ollama.com, drag it into Applications, and open it. When the Ollama icon appears in the menu bar, the server is already running in the background. If you prefer the terminal, use the official install script:
curl -fsSL https://ollama.com/install.sh | sh

With Homebrew installed, brew install --cask ollama works too.

  1. Verify the server is up. In Terminal, run:
ollama --version
curl http://127.0.0.1:11434/api/tags

If the second command returns a response, Ollama is listening on port 11434.

  1. Pull a model and start chatting:
ollama pull qwen3:8b
ollama run qwen3:8b

Once the download finishes you’ll see a >>> prompt. Type your question, and type /bye to exit. To see what’s installed and what’s running:

ollama list
ollama ps

In ollama ps, the PROCESSOR column should read 100% GPU — that confirms the model is actually running on the GPU. Downloaded models live in ~/.ollama/models; remove one with ollama rm qwen3:8b.

Call it over the API — not just terminal chat

Once started, Ollama is a local server with an OpenAI-compatible API. Any tool that can call the OpenAI API can talk to your local model by just changing the address:

curl http://localhost:11434/v1/chat/completions -d '{
  "model": "qwen3:8b",
  "messages": [{"role": "user", "content": "Explain unified memory in one sentence"}]
}'

That makes it a useful local backend for AI coding assistants and always-on agents: scripts that batch-process documents, or an agent that handles lightweight work on a local model, without sending anything to the cloud. If you’d rather have a ChatGPT-style web interface, install Open WebUI (it needs Docker):

docker run -d --name open-webui --restart always \
  -p 3000:8080 \
  -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
  -v open-webui:/app/backend/data \
  ghcr.io/open-webui/open-webui:main

Then open http://localhost:3000 in a browser to chat and switch models.

Keep the model loaded: the always-on setup

Ollama has one easy-to-miss default: after 5 minutes idle, it unloads the model, so your next question waits tens of seconds for a reload. For a 24-hour server, change two settings:

launchctl setenv OLLAMA_KEEP_ALIVE "-1"
launchctl setenv OLLAMA_CONTEXT_LENGTH 8192

Restart the Ollama app afterwards for the change to take effect. OLLAMA_KEEP_ALIVE "-1" keeps the model in memory indefinitely; OLLAMA_CONTEXT_LENGTH sets how much conversation the model remembers — a bigger number remembers more but uses more memory, and 8192 is a safe value on 16GB.

Two more practical notes: on a 16GB machine, keep only one model loaded at a time (two large models will fight for memory and both will suffer); and when you run heavy work like an Xcode build on the same machine, local model responses will slow down, because the memory is shared — schedule around it.

Call it from your laptop and phone

By default Ollama only listens on 127.0.0.1:11434, and it has no password. Never switch it to listen on all interfaces and expose the port to the public internet — anyone could use your compute for free. There are two safe ways to reach it remotely:

Step-by-step guides for both are linked in the related reading below. The principle is simple: Ollama’s port should only ever appear on a network you trust.

Ollama vs MLX vs LM Studio

All three run local models on a Mac, but they serve different needs:

Tool Best for Character
Ollama Serving models to other programs CLI + API, just works, easy to keep running
MLX Developers comfortable with Python Apple’s own framework, fast, supports custom quantization and fine-tuning
LM Studio People who don’t want the terminal Graphical app with a model browser, chat in a few clicks

If you want the quickest path to a server that stays up, pick Ollama. If you want maximum speed and Python scripting, try MLX: pip install mlx-lm, then mlx_lm.generate --model mlx-community/Llama-3.2-1B-Instruct-4bit --prompt "Hello". If you’d rather browse and click, LM Studio is the easiest — and on a Tokyo Mac machine it installs in one click from My Macs → Install apps, just like Ollama. One more note: since Ollama 0.40 (November 2026), supported model architectures automatically run on the MLX runtime on Apple Silicon — no manual setup needed.

On a Tokyo Mac

A rented Mac mini has a natural advantage here: it’s online 24 hours a day with sleep and screen lock disabled, so an Ollama server stays up without worrying about a laptop lid closing. The machine on offer is an M4 Mac mini with 16GB of unified memory, whose comfort zone is exactly the 8B class of models. Ollama, Docker Desktop and Tailscale are all in the software library under My Macs → Install apps — tick them and they install in one go, so Open WebUI and private networking take minutes. If models fill up the disk or the setup gets messy, Actions → Erase and reset puts a fresh macOS back on the machine, and you pick the apps you want while entering the new account, so it comes back clean with your apps already installed. You can try it for 2 hours first — pull an 8B model and see how it feels before deciding.

FAQ

Downloads are slow. What can I do? Model files are several gigabytes, so the first download depends on your connection speed. Start with a small model such as gemma3:1b to verify everything works, then download your main model. Downloads are resumable.

The model fails to load with an out-of-memory error. What now? Switch to a smaller model first, then lower OLLAMA_CONTEXT_LENGTH, then free space with ollama rm for models you don’t use. Don’t load two large models at once.

Can a local model replace ChatGPT or Claude? For everyday chat, summaries, and simple coding tasks, yes. For hard reasoning, multi-file refactors, and cutting-edge knowledge, cloud flagship models are still stronger. The sensible split: local for frequent lightweight work, cloud for the hard parts.

Do my models survive a restart? Yes — model files stay in ~/.ollama/models. After a restart, just run ollama run qwen3:8b again to load it. Make sure Ollama is listed under System Settings → General → Login Items so it starts at login.

More guides