---
title: "Configure your first local model"
description: "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."
updated: 2026-11-17
canonical: https://holaclaw.ai/docs/guides/configure-a-local-model
---

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

:::tabs
@tab Desktop
- HolaClaw Desktop installed on an Apple Silicon Mac. See [Install HolaClaw Desktop](/docs/desktop/install-on-mac).
- 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.
@tab Server
- HolaClaw Server installed, or about to be. See [Choose a deployment](/docs/server/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](https://ollama.com), 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.

:::tabs
@tab Desktop
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](/docs/desktop/choose-a-provider#local).
@tab Server
With Ollama, browse [ollama.com/search](https://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:

```sh
ollama pull gemma4:e2b
```
:::

## Step 2: Start the model

:::tabs
@tab Desktop
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.
@tab Server
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:

```sh
OLLAMA_CONTEXT_LENGTH=65536 ollama serve
```

If 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:

```sh
curl http://localhost:11434/v1/models
```

Other 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

:::tabs
@tab Desktop
1. Create a new assistant.
2. Under **Provider**, select **Local**.
3. 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**.
4. 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**.
5. 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.
@tab Server
**On a new installation**, pass the endpoint to `init`. Press Enter when it asks for an API key, since Ollama needs none:

```sh
holaclaw init --provider openai-compat --base-url http://localhost:11434/v1 --model gemma4:e2b
```

In the container, `localhost` is the container itself. Use the host's address instead:

```sh
docker exec -it holaclaw holaclaw init --provider openai-compat --base-url http://host.docker.internal:11434/v1 --model gemma4:e2b
```

The [container guide](/docs/server/container#step-1-start-the-container) 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](/docs/server/providers-and-models#change-the-model-or-the-provider):

```toml title="config.toml"
[providers.ollama]
type     = "openai-compatible"
base_url = "http://localhost:11434/v1"

[models.local]
provider = "ollama"
id       = "gemma4:e2b"
context  = 65536
tools    = true
```

```toml title="agents/main/agent.toml"
[models]
chat = "local"
```

Leave out `auth`: the endpoint needs no key. Then check the config and restart the daemon:

```sh
holaclaw check --offline
```
:::

## Step 4: Try it

:::tabs
@tab Desktop
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.
@tab Server
```sh
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 `context` in `config.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](/docs/server/providers-and-models) covers fallbacks and the other model roles on Server.
- [AI providers](/docs/concepts/ai-providers) compares local and cloud models.
- [Build Luna, a travel assistant](/docs/guides/build-luna) puts your new assistant to work.

