#how do i add ollama local models
1 messages · Page 1 of 1 (latest)
Yep. First, what does openclaw --version show?
If you're on a current build, the easiest path is:
openclaw onboard
Then choose:
- Ollama
- Local only if you just want your local models
- Cloud + Local if you also want Ollama cloud models
If you want the minimal manual setup instead:
export OLLAMA_API_KEY="ollama-local" # any placeholder value works for local Ollama
ollama pull gemma4 # or any model you want
openclaw models list --provider ollama
openclaw models set ollama/gemma4
Important: if you set a custom Ollama URL, use:
baseUrl: "http://your-host:11434"
and do not use /v1. OpenClaw wants Ollama's native API, not the OpenAI-compatible path.
Docs:
If you paste your openclaw --version, I can give you the exact commands for your setup.
OpenClaw 2026.4.15 (041266a)
Nice, that version should support it cleanly.
If Ollama is running on the same machine, the usual path is:
export OLLAMA_API_KEY="ollama-local" # any placeholder value works for local Ollama
ollama list
openclaw models list --provider ollama
openclaw models set ollama/<your-model>
Example:
openclaw models set ollama/gemma4
A few gotchas:
- OpenClaw will auto-discover local Ollama at
http://127.0.0.1:11434 - if the gateway is already running as a daemon, restart it after setting the env var
- if your model is not installed yet, do
ollama pull <model>
If Ollama is on a different host/port, use a custom base URL, but do not use /v1. Use the native Ollama URL like:
{
models: {
providers: {
ollama: {
apiKey: "ollama-local",
baseUrl: "http://your-host:11434",
api: "ollama"
}
}
}
}
If you want the guided version instead, this also works:
openclaw onboard
Then pick Ollama → Local only.
Docs:
If you want, paste the output of ollama list and I can tell you the exact openclaw models set ... line to run.
if i do openclaw onboard can i just add the new model but keep all of my agents on the existing models until i want to swap them?
Yes, but with an important caveat:
openclaw onboard is a full setup wizard, and it normally writes the default model (agents.defaults.model).
So:
- if your agents are just inheriting the global default, and you pick Ollama as the new default during onboarding, they’ll switch
- if your agents already have their own explicit
agents.list[].model, they’ll keep those
If your goal is “add Ollama now, switch later”, the safer path is:
export OLLAMA_API_KEY="ollama-local"
openclaw models list --provider ollama
If you run OpenClaw as a daemon, restart it after setting the env var so the gateway sees it.
Then don’t run openclaw models set ... yet.
When you actually want to switch, do:
openclaw models set ollama/<model>
or use /model in a chat session for a session-only switch.
So my recommendation: if you want zero disruption, don’t use onboard for this, just enable Ollama and leave your current default alone.
Docs:
If you want, I can show the exact config for “add Ollama but keep current defaults unchanged.”
i did export OLLAMA_API_KEY="ollama-local"
openclaw models list --provider ollama
but got Could not reach 127.0.0.1:11434 mine is running on http://192.168.1.144:11434
Yep, that explains it.
That env-only shortcut assumes Ollama is on 127.0.0.1:11434. Since yours is on http://192.168.1.144:11434, you need to point OpenClaw at that host instead.
First, quick sanity check from the machine running OpenClaw:
curl http://192.168.1.144:11434/api/tags
If that works, the easiest supported setup is honestly:
openclaw onboard
Then choose Ollama and enter:
http://192.168.1.144:11434
Important: do not use /v1.
Use:
http://192.168.1.144:11434
not:
http://192.168.1.144:11434/v1
One caveat from your earlier question: onboarding can also touch the default model. So if you want to keep your current agents unchanged, keep your existing default selected there, or switch it back after.
If you want to avoid onboarding entirely, that’s possible too, but for a non-localhost Ollama host it gets more manual. I’d use onboarding here.
Docs: https://docs.openclaw.ai/providers/ollama
If you paste the output of:
curl http://192.168.1.144:11434/api/tags
I can tell you the exact next step.
I cant post all of the models but here are some {"models":[{"name":"qwen3.5:9b-q4_K_M","model":"qwen3.5:9b-q4_K_M","modified_at":"2026-04-10T13:07:27.6169314-05:00","size":6594474711,"digest":"6488c96fa5faab64bb65cbd30d4289e20e6130ef535a93ef9a49f42eda893ea7","details":{"parent_model":"","format":"gguf","family":"qwen35","families":["qwen35"],"parameter_size":"9.7B","quantization_level":"Q4_K_M"}}
Perfect, that’s enough.
That means the Ollama host is up, and the model ID you’d pick is:
qwen3.5:9b-q4_K_M
So the clean next step is:
openclaw models status
openclaw onboard
Then in onboarding choose:
- Ollama
- Local only
- Base URL:
(nohttp://192.168.1.144:11434/v1) - Model:
qwen3.5:9b-q4_K_M
I’d run openclaw models status first just so you know your current primary model. If onboarding changes it and you want to switch back after, you can do:
openclaw models set <your-old-model>