#hi
1 messages · Page 1 of 1 (latest)
so i have a api key for a local ollama model how do i connect that with openclaw
hey, what can I help you with? 🦐
Let me verify the Ollama docs so I give you the right config keys, not vibes.
first, paste openclaw --version so I can match the right setup.
If you mean a local Ollama server, the easiest path is:
- make sure Ollama is running and you have a model pulled
ollama pull gemma4 - set the Ollama env var
- local-only:
export OLLAMA_API_KEY="ollama-local" - Ollama cloud:
export OLLAMA_API_KEY="your-real-key"
- local-only:
- run:
openclaw onboard - choose Ollama
- pick Local only or Cloud + Local
- verify/set the model
openclaw models list --provider ollama
openclaw models set ollama/<your-model>
Important: if you use a custom Ollama host, use http://host:11434 with no /v1. The /v1 URL is the OpenAI-compatible path and tool calling gets unreliable there.
If you want manual config instead of onboarding, I can give you the exact JSON5 too.
Docs:
- https://docs.openclaw.ai/providers/ollama
- https://docs.openclaw.ai/help/faq#can-i-use-self-hosted-models-llamacpp-vllm-ollama
If you send:
openclaw --version- local vs remote Ollama
- local-only vs cloud+local
I’ll give you the exact next command.
ok but how do i add the thingy and conenct them
yeah, the “thingy” is just the OLLAMA_API_KEY env var 😄
For local Ollama, do this:
ollama serve
ollama pull gemma4
export OLLAMA_API_KEY="ollama-local"
openclaw onboard
Then in the setup wizard choose:
- Ollama
- Local only
- pick your model
After that, run:
openclaw models list --provider ollama
openclaw models set ollama/gemma4
That’s basically the connection:
- Ollama runs on
http://127.0.0.1:11434 - OpenClaw sees
OLLAMA_API_KEY - OpenClaw discovers the Ollama models and uses them
Important:
- for local Ollama, the key does not need to be real,
ollama-localis fine - if OpenClaw is already running in the background, restart it after adding the env var
- if you use a custom Ollama URL, use
http://host:11434and not/v1
Docs: https://docs.openclaw.ai/providers/ollama
If you want, I can give you the exact commands for your OS next.
how do i open openclaw again
if you mean the OpenClaw web UI, run:
openclaw gateway start
openclaw dashboard
If the gateway is already running, just:
openclaw dashboard
You can also open it directly at: