> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wednesdayai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Ollama

> Run AI models locally with Ollama — no API key, full privacy, auto-discovered by WednesdayAI.

# Ollama

Ollama runs AI models locally — no API key, no cloud, no data leaving your network. WednesdayAI auto-discovers a running Ollama instance.

## Prerequisites

Install Ollama from [ollama.com](https://ollama.com), then pull a model:

```bash theme={"dark"}
ollama pull llama3.3
ollama list
```

## Connecting

WednesdayAI detects a running Ollama instance automatically. To activate auto-discovery, set `OLLAMA_API_KEY` to any non-empty value — the value is not validated against any service, it just signals OpenClaw to enable the Ollama provider:

```bash theme={"dark"}
export OLLAMA_API_KEY=ollama-local
```

Once set, WednesdayAI probes `http://127.0.0.1:11434` by default. To point at a non-default host, use `models.providers` (see [Remote Ollama](#remote-ollama)) — `OLLAMA_HOST` is an Ollama-native variable for the Ollama process itself and has no effect on OpenClaw activation.

## Selecting a model

```json5 theme={"dark"}
{
  agents: {
    defaults: {
      model: { primary: "ollama/llama3.3" },
    },
  },
}
```

The `ollama/` prefix routes the request to the Ollama provider:

| Ollama model    | Reference              |
| --------------- | ---------------------- |
| `llama3.3`      | `ollama/llama3.3`      |
| `mistral`       | `ollama/mistral`       |
| `qwen2.5-coder` | `ollama/qwen2.5-coder` |
| `deepseek-r1`   | `ollama/deepseek-r1`   |

Run `openclaw models status` to see which Ollama models WednesdayAI can reach.

## Remote Ollama

<Warning>
  Do **not** append `/v1` to the `baseUrl`. Using `http://host:11434/v1` routes through the OpenAI-compatibility shim and breaks tool calling. Always use the native Ollama URL: `http://host:11434`.
</Warning>

If Ollama runs on another machine (a GPU box, a home server), set the base URL via `models.providers`:

```json5 theme={"dark"}
{
  models: {
    providers: {
      ollama: {
        baseUrl: "http://192.168.1.50:11434",
        api: "ollama",
      },
    },
  },
}
```

By default Ollama only listens on `127.0.0.1`. To accept remote connections, set `OLLAMA_HOST=0.0.0.0` on the Ollama machine. For secure remote access, put Ollama behind Tailscale and use its MagicDNS name rather than exposing port 11434.

## Troubleshooting

<AccordionGroup>
  <Accordion title="No models found">
    Ollama is running but no models are available, OR the models you have installed don't report `tools` capability. WednesdayAI only auto-discovers models that report `tools` support in `/api/show`. To check:

    ```bash theme={"dark"}
    curl http://localhost:11434/api/show -d '{"model":"llama3.2"}'
    ```

    Look for `tools` in the `capabilities` array. Pull a model with tool support (e.g., `ollama pull llama3.2`) or explicitly configure the model in `models.providers.ollama.models`.
  </Accordion>

  <Accordion title="Connection refused">
    Ollama is not running. Start it with `ollama serve` (or the system service) and verify with `ollama list`.
  </Accordion>

  <Accordion title="Remote Ollama not reachable">
    By default Ollama listens only on loopback. Set `OLLAMA_HOST=0.0.0.0` on the Ollama machine and restart it. Use Tailscale rather than exposing the port publicly.
  </Accordion>
</AccordionGroup>
