Docs/Guides/Your first local model
Configure your first local model
Run your assistant on a model that lives on your own hardware, with no API key and no cloud calls, on HolaClaw Desktop or HolaClaw Server.
- Desktop
- Server
- AI providers
- Local models
A local model answers from your own machine. Your messages never go to a cloud provider, there is no key to manage and no bill per message. In exchange, the model has to fit in your memory, and it answers more slowly and less capably than the largest cloud models.
By the end of this guide you have an assistant that answers from a local model. On HolaClaw Desktop the app downloads and runs the model for you. On HolaClaw Server you run a model server such as Ollama yourself and point HolaClaw Server at it.
Before you start
- HolaClaw Desktop installed on an Apple Silicon Mac. See Install HolaClaw Desktop.
- Free disk space for the model: from about 4 GB for the smallest model to about 20 GB for the large ones.
- Memory matters most. An 8 GB Mac runs only the smallest model. 16 GB or more gives you real choice.
- HolaClaw Server installed, or about to be. See Choose a deployment.
- A machine that can run the model: the same host, or another machine on your network. A GPU helps a lot, but small models run on a CPU.
- A model server that speaks the OpenAI API: Ollama, llama.cpp's
llama-server, LM Studio or vLLM. This guide uses Ollama.
Step 1: Choose a model
Pick the largest model that fits comfortably, then step down if replies are too slow. A model needs to call tools to be useful as an assistant, so prefer models that support tool calling.
The app does the sizing for you. Each model in its catalog has a memory budget, and the app compares it with what your Mac has left once the assistant's virtual machine has taken its share. A few examples:
| Model | Download size | Fits a Mac with |
|---|---|---|
| Gemma 4 E2B | ~4.1 GB | 8 GB |
| Gemma 4 E4B | ~6.0 GB | 16 GB |
| Qwen3.5 9B | ~7.1 GB | 16 GB |
| Ministral 3 14B Instruct | ~9.1 GB | 16 GB |
| Gemma 4 26B MoE | ~18.1 GB | 32 GB |
| Gemma 4 31B | ~19.5 GB | 32 GB |
The full list, with every model's size, is in Choose a provider.
With Ollama, browse ollama.com/search and filter for models with tool support. The examples in these docs use gemma4:e2b, a small model that runs on modest hardware.
Download it on the machine that runs Ollama:
ollama pull gemma4:e2bStep 2: Start the model
Nothing to do here: the app runs the model with the bundled llama-server while the assistant runs, and connects the assistant to it through a private tunnel. Go to step 3.
HolaClaw Server expects a 65,536-token context window by default, and Ollama starts with a much smaller one. Start Ollama with a larger window:
OLLAMA_CONTEXT_LENGTH=65536 ollama serveIf Ollama runs as a systemd service, set the variable on the service instead: run sudo systemctl edit ollama, add Environment="OLLAMA_CONTEXT_LENGTH=65536" under [Service], and restart it.
If HolaClaw Server runs in a container, the container cannot reach Ollama on the host's loopback. Make Ollama listen on every interface too, with OLLAMA_HOST=0.0.0.0 set the same way. Ollama has no authentication, so firewall port 11434 to the machines that need it.
Check that the endpoint answers and lists the model:
curl http://localhost:11434/v1/modelsOther servers work the same way. llama-server listens on port 8080 by default and LM Studio's server on port 1234. Whatever you use, the base URL ends in /v1.
Step 3: Connect your assistant to it
- Create a new assistant.
- Under Provider, select Local.
- Under Model, open the list. With Show supported models only on, it lists only the models your Mac can run, and marks the best fit as Recommended.
- Pick a model. The panel shows its download size and the smallest Mac it needs, and whether it is Downloaded or Will download on first run.
- Click Finish setup.
The first start takes longer: the app downloads the model once and keeps it cached for every assistant that uses it.
Note
The provider is fixed when the assistant is created. If you later want a cloud provider, create a new assistant.
On a new installation, pass the endpoint to init. Press Enter when it asks for an API key, since Ollama needs none:
holaclaw init --provider openai-compat --base-url http://localhost:11434/v1 --model gemma4:e2bIn the container, localhost is the container itself. Use the host's address instead:
docker exec -it holaclaw holaclaw init --provider openai-compat --base-url http://host.docker.internal:11434/v1 --model gemma4:e2bThe container guide starts the container with --add-host host.docker.internal:host-gateway, which makes that name work.
On an installation that already has a provider, add the endpoint to config.toml and point the agent at it, as in Change the model or the provider:
[providers.ollama]
type = "openai-compatible"
base_url = "http://localhost:11434/v1"
[models.local]
provider = "ollama"
id = "gemma4:e2b"
context = 65536
tools = true[models]
chat = "local"Leave out auth: the endpoint needs no key. Then check the config and restart the daemon:
holaclaw check --offlineStep 4: Try it
Open a new chat and ask something. The assistant's Settings has an Inference Server section that shows whether the local engine is running, and lets you restart it if it gets stuck.
holaclaw chat -m "Reply with exactly: hola"The trace line shows the model that answered. Then run holaclaw check without --offline. It probes the endpoint and reports MOD002 when the window Ollama or llama-server actually allocated is smaller than the context in config.toml.
If replies are slow or poor
- Try a smaller model if the first reply takes very long. Bigger models answer better but more slowly on the same hardware.
- Try a larger model if it ignores instructions or misuses tools. Small models are the first to struggle with tool calls.
- Turn off thinking on Server. A model that reasons by default, such as Qwen on Ollama, spends its reasoning from the reply budget. Set
reasoning = "none"on its[models.<name>]table. - Check the window on Server. If Ollama runs with a smaller context than the
contextinconfig.toml, long conversations fail or lose their start.
On Desktop, an assistant keeps the model you chose when you created it; to try another catalog model, back up and delete the assistant, then create a new one with it. On Server, change id in the [models.local] table and restart.
Next steps
- Providers and models covers fallbacks and the other model roles on Server.
- AI providers compares local and cloud models.
- Build Luna, a travel assistant puts your new assistant to work.
Was this page helpful?
