Run OpenClaw with Ollama: Cloud and Local Models
Configure OpenClaw to use Ollama's native /api/chat endpoint for cloud, local, or hybrid model setups. Covers the baseUrl config key and why the /v1 endpoint breaks tool calling.
Read this when
- You want to run OpenClaw with cloud or local models via Ollama
- You need Ollama setup and configuration guidance
- You want Ollama vision models for image understanding
OpenClaw uses Ollama's native API (/api/chat) rather than the OpenAI-compatible /v1 endpoint. There are three supported setups:
| Setup | What it uses |
|---|---|
| Cloud + Local | An Ollama host that can be reached, serving local models and, when signed in, :cloud models |
| Local only | An Ollama host that can be reached, local models only |
| Ollama Cloud | https://ollama.com straight through the ollama-cloud provider, with no daemon needed |
Access to hosted models alone is a separate Ollama Cloud setup choice; refer to Ollama Cloud. Its ollama-cloud/<model> refs keep cloud routing apart from the local ollama provider.
Warning
Avoid the
/v1OpenAI-compatible URL (http://host:11434/v1). Tool calling fails with it, and models may output raw tool-call JSON as plain text. Use the native URL instead:baseUrl: "http://host:11434"(without/v1).
The config key in use today is baseUrl. baseURL is still accepted for OpenAI-SDK-style examples, though new config should use baseUrl.
This page works as an index. Ollama documentation spans nine pages, each aimed at one reader task. Open whichever page fits what you are doing.
| Page | Read it when |
|---|---|
| Ollama setup | You are connecting an account: auth rules per host type, onboarding and manual setup, and the hybrid cloud-plus-local flow. |
| Ollama model discovery | You want to know how models are found: the implicit-discovery table, capability detection, and smoke-test checks. |
| Ollama node-local inference | You are running models on a paired node: setup steps, model filtering, and direct verification commands. |
| Ollama vision and image description | You are describing or understanding images through a local or hosted Ollama vision model. |
| Ollama configuration | You are writing the provider entry: implicit discovery, an explicit model list, or a custom base URL. |
| Ollama config recipes | You want a working config to copy: per-scenario recipes, model selection, and quick verification. |
| Ollama Web Search | You are using Ollama as the web_search provider: host, auth, and requirement rules. |
| Ollama advanced configuration | You are tuning behavior: context windows, thinking control, reasoning, costs, embeddings, and streaming. |
| Ollama troubleshooting | Something is broken: detection, connection, tool-JSON, garbled output, timeouts, and WSL2 crash loops. |
Where each section moved
Every anchor that the single-page version published still resolves on this page, so a link you already have, such as /providers/ollama#node-local-inference, continues to work. Each entry directs you to the page that now carries the content.
- Auth rules
- Getting started
- Cloud models through a local host
- Local and LAN hosts
- Remote and Ollama Cloud hosts
- Custom provider ids
- Auth profiles
- Memory embedding scope
- Onboarding (recommended)
- Run onboarding
- Select a model
- Verify
- Manual setup
- Install and start Ollama
- Set a credential
- Select the model
Ollama vision and image description
- Common recipes
- Model selection
- Quick verification
- Local model with auto-discovery
- LAN Ollama host with manual models
- Ollama Cloud only
- Cloud plus local through a signed-in daemon
- Multiple Ollama hosts
- Small local model profile
- Advanced configuration
- Legacy OpenAI-compatible mode
- Context windows
- Thinking control
- Reasoning models
- Model costs
- Memory embeddings
- Streaming configuration
- Troubleshooting
- WSL2 crash loop (repeated reboots)
- Ollama not detected
- No models available
- Connection refused
- Remote host works with curl but not OpenClaw
- Model outputs tool JSON as text
- Kimi or GLM returns garbled symbols
- Cold local model times out
- Large-context model is too slow or runs out of memory
Related
-
Ollama Cloud, A cloud-only deployment that relies on the dedicated
ollama-cloudprovider. -
Model providers, A survey of every provider, along with model refs and how failover works.
-
Model selection, Picking models and getting them configured.
-
Ollama Web Search, Complete instructions and behavioral notes for web search backed by Ollama.
-
LM Studio, A different local runner for GGUF or MLX models, usable either as a GUI app or as a headless server.
-
Memory LanceDB, Long-term memory stored in LanceDB, using local embeddings compatible with Ollama.
-
Configuration, The complete configuration reference.