OpenClaw is an open-source AI assistant that runs on your own computer and answers you through the chat apps you already use, such as WhatsApp, Telegram, Slack and Discord. Pair it with Ollama and the language model can run on your own graphics card too. Ollama now has a one-line launcher for OpenClaw, so this guide covers that route, the settings that matter for local models, and the security steps worth taking before you connect a messaging app. It's based on Ollama's and OpenClaw's official documentation, read on 28 November 2026.
What you need
Ollama installed and running. Our guides to installing Ollama on Linux and setting up WSL2 for local AI cover the basics.
A model that handles tool calling well. OpenClaw is an agent, so it needs a model that can use tools. Ollama's OpenClaw page links to its list of supported local and cloud models.
Enough memory for a big context window. Ollama's documentation says OpenClaw needs a larger context window and recommends at least 64k tokens with local models. A longer context uses more memory, so see our explainer on context length and VRAM and our guide to how much VRAM you need.
OpenClaw's installer supports macOS, Linux and Windows. It was previously called Clawdbot, and Ollama notes that ollama launch clawdbot still works as an alias.
Step 1: Raise Ollama's context length
Ollama picks a default context length based on your graphics memory. Its documentation lists 4k tokens for less than 24GiB of VRAM, 32k for 24 to 48GiB, and 256k for 48GiB or more. So any PC with less than 48GiB of graphics memory starts below the 64k OpenClaw needs.
You can change it with the slider in the Ollama app's settings, or start the server with a larger value:
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
Our guide to setting Ollama's context length has more detail. After loading a model, run ollama ps and check the PROCESSOR and CONTEXT columns. Ollama recommends avoiding offloading the model to the CPU, so if you see a CPU share there, pick a smaller model or a shorter context.
Step 2: Launch OpenClaw from Ollama
Run:
ollama launch openclaw
According to Ollama's documentation, this handles the whole setup:
If OpenClaw isn't installed, Ollama offers to install it via npm.
On first launch, a security notice explains the risks of giving the assistant tool access.
You pick a model from a selector.
Ollama configures the provider, installs the gateway daemon, sets your model as the primary one and turns on OpenClaw's bundled Ollama web search.
The gateway starts in the background and the OpenClaw terminal interface opens.
To change models later without starting the gateway, run ollama launch openclaw --config, or name a model directly with ollama launch openclaw --model <model>. Ollama says a running gateway restarts automatically to pick up the change. For scripts or Docker, adding --yes skips the selectors and pulls the model automatically, but it requires --model.
If you set OpenClaw up yourself
If you install OpenClaw with its own installer instead, point it at Ollama's native address, such as http://localhost:11434. OpenClaw's documentation says it talks to Ollama's native /api/chat API, and warns against using the OpenAI-compatible /v1 URL because it breaks tool calling and models can print raw tool-call JSON as plain text. So if your assistant replies with JSON instead of doing things, check the URL first. Our guide to tool calling in Ollama explains what's happening under the hood.
The same applies if Ollama runs on another machine: use its LAN address without /v1. Our guide to sharing Ollama on your local network explains how to make Ollama listen beyond localhost.
Step 3: Web search
Ollama says web search is enabled automatically when you launch OpenClaw through it, using Ollama's web search provider. There's a catch for local models: Ollama's documentation says web search with local models requires you to run ollama signin. To change the setting by hand, run openclaw configure --section web. Our guide to Ollama's web search API has more on how it works.
Step 4: Connect a messaging app
To chat with your assistant from your phone, run:
openclaw configure --section channels
Ollama's guide lists WhatsApp, Telegram, Slack, Discord and iMessage. OpenClaw's own documentation says most chat channels answer an unknown sender with a pairing code rather than processing the message, and you approve a sender with openclaw pairing approve <channel> <code>. OpenClaw's README says to treat inbound messages as untrusted input and notes that tools run on the host for the main session unless you configure sandboxing, so only approve people you trust.
Step 5: Lock it down
OpenClaw's security guide says that on a regular install the gateway binds to loopback, unknown senders get a pairing code, and group access is allowlisted. It recommends running openclaw security audit to check you haven't drifted from those defaults.
Two points from the documentation are easy to miss:
Sandboxing is off by default. OpenClaw can run tool execution in a sandbox, but you have to turn it on. The gateway itself always stays on the host. OpenClaw calls the sandbox "not a perfect security boundary", but says it materially limits filesystem and process access.
One trust boundary per gateway. OpenClaw says it isn't designed to separate users who don't trust each other on one gateway. For people who don't trust each other, it recommends separate gateways and credentials.
If you want stronger isolation than OpenClaw's own sandbox, Ollama's documentation describes NVIDIA's NemoClaw as an open-source security stack that wraps OpenClaw in the NVIDIA OpenShell runtime, adding kernel-level sandboxing, network policy controls and audit trails. Ollama says its support in NemoClaw is still experimental. For access away from home, use a VPN such as Tailscale rather than exposing the gateway to the internet.
To stop the assistant, run openclaw gateway stop.
Troubleshooting
Replies contain raw JSON: check the base URL doesn't end in /v1, and try a model with better tool support.
The assistant loses track on longer tasks: check the context length with ollama ps; Ollama recommends at least 64k for agents.
It's very slow: run ollama ps and check the model is 100% on the GPU. Our guide to checking Ollama is using your GPU helps.
Web search fails with a local model: run ollama signin.
If you're comparing agent apps, our roundup of the best local AI agent apps covers OpenClaw alongside alternatives such as Hermes Agent.