This setup matters when you want more local control over model choice and runtime behavior, or when privacy and cost constraints make cloud APIs less attractive.
You should have OpenClaw running locally before adding Ollama to the stack.
ollama --versionOllama runs as a local server, usually on http://localhost:11434.
Pull a model you want to use:
ollama pull llama3Good starting models:
llama3 — general purpose, good balance of quality and speedmistral — fast and efficient for simpler taskscodellama — better for code-related tasksqwen2 — strong multilingual supportStart with one model. Do not pull five models before testing one.
Test that the model works:
ollama run llama3 "Hello, how are you?"If this returns a sensible response, Ollama is ready.
Add Ollama as a model provider in your OpenClaw config:
{
"providers": {
"ollama": {
"baseUrl": "http://localhost:11434",
"model": "llama3"
}
}
}Then set Ollama as your default provider or assign it to specific tasks.
Restart Gateway and send a simple message through your connected channel. The assistant should respond using the local Ollama model.
If it does not:
ollama ps)Local models run on your hardware. Performance depends on:
If responses are slow, try a smaller model or check your hardware utilization.