Start the local API first
OpenClaw does not bundle model weights. It calls an OpenAI-compatible endpoint on your machine. Before touching OpenClaw settings, Ollama or LM Studio must already be running with a loaded model.
Ollama defaults to http://127.0.0.1:11434; LM Studio's local server is usually http://127.0.0.1:1234/v1. Hit /v1/models with curl or the app's test panel. If that works, OpenClaw configuration is much faster.
- Ollama: ollama pull llama3.2 — serve often starts automatically after install.
- LM Studio: load a model on the Local Server tab, click Start Server, note the port.
- Verify: curl http://127.0.0.1:11434/v1/models returns a model list.
Add Ollama in OpenClaw
Open OpenClaw Settings → Model Providers → add an OpenAI-compatible endpoint. Base URL: http://127.0.0.1:11434/v1 (include /v1). API key can be ollama or any placeholder—local Ollama usually does not validate keys.
Model name must match ollama list exactly (e.g. llama3.2, qwen2.5:7b). Wrong names often show "connected" but fail at inference with model not found. Send a short test message after saving.
Add LM Studio in OpenClaw
Use the URL shown in LM Studio, typically http://127.0.0.1:1234/v1. API key: lm-studio or empty per your build's docs.
Model ID must match the loaded checkpoint in LM Studio. If OpenClaw cannot list models, confirm /v1/chat/completions works in LM Studio logs, then refresh or type the ID manually.
When it still will not connect
Missing /v1 in Base URL is the top cause of 404 errors. Second: proxy or firewall redirecting localhost—stick to 127.0.0.1 unless you intentionally expose LAN. Third: testing before the model finishes loading in LM Studio.
Fourth: your workflow may still default to a cloud model. Explicitly select the local provider in the chat or agent config so you are not unknowingly calling GPT-4.
Realistic use cases and limits
Local models fit first drafts, code brainstorming, and keeping sensitive notes off cloud APIs. They are weaker for heavy multi-step agents, very long legal review, or top-tier reasoning versus frontier cloud models.
A practical split: local for privacy-sensitive drafting, cloud for final polish and SEO QA—document which step must stay local in your OpenClaw workflow. See also the multi-model workflow guide on this site.
Local LLM Setup FAQ
Which local LLM backends work with OpenClaw?
The usual approach is Ollama or LM Studio exposing an OpenAI-compatible API. Start the local server first, then in OpenClaw set Base URL (e.g. http://127.0.0.1:11434/v1) and the exact model name.
Should I use Ollama or LM Studio?
Ollama is lighter for CLI and servers; LM Studio has a friendlier GUI for swapping GGUF models. Both work—pick what matches your workflow.
Does data still go to the cloud after I connect a local model?
If you only use a local endpoint and no cloud providers are enabled, inference stays on your machine. Cloud models in the same OpenClaw setup still send requests to their vendors.
Local inference is very slow—what can I do?
Try a smaller quant (Q4), confirm GPU offload is active, and close other VRAM-heavy apps. Large models on CPU alone will be slow—that is a hardware limit, not a misconfiguration.
Use this with an OpeClaw workflow
Check the current OpeClaw download status first, then save this guide as part of your setup, review, or troubleshooting workflow.