Your local LLM: swap models, tune, and troubleshoot

Every ClawNode Node ships with Ollama and an open-source model preinstalled and wired to OpenClaw. No API keys, no per-token costs - just SSH in and go. This guide covers how your Node is wired, how to swap the model for another Ollama tag, how to point OpenClaw at a remote OpenAI-compatible endpoint, and what to check when something goes sideways.

1

How your Node is wired

Your Node boots a systemd-managed Ollama service on 127.0.0.1:11434 and OpenClaw is configured to talk to it via the OpenAI-compatible endpoint at http://127.0.0.1:11434/v1. The preinstalled model depends on your Node size:

Node size RAM Default model Good for
Small Node 4 GB qwen2.5:3b Short chats, scripting, routine automations.
Standard Node 16 GB llama3.1:8b General-purpose coding, reasoning, tool use.

OpenClaw talks to Ollama through its native API (not the /v1 OpenAI-compatible shim - that path breaks tool calling and produces Unknown model errors). The Node sets OLLAMA_API_KEY to a placeholder (ollama-local - Ollama does not require authentication on loopback) in /root/.openclaw/openclaw.json, and the default model is referenced with the ollama/ provider prefix (e.g. ollama/llama3.1:8b).

2

Swap to another Ollama model

SSH into your Node (the IP and root password are on your instance page):

ssh root@YOUR_NODE_IP

Pull the model you want. Any tag from ollama.com/library works:

ollama pull qwen2.5:7b

Point OpenClaw at it by rewriting a single key in the config:

node -e "const f=require('fs'),p='/root/.openclaw/openclaw.json',c=JSON.parse(f.readFileSync(p,'utf8'));c.agents=c.agents||{};c.agents.defaults=c.agents.defaults||{};c.agents.defaults.model={primary:'ollama/qwen2.5:7b'};f.writeFileSync(p,JSON.stringify(c,null,2));"

Restart the gateway so it reloads the config:

systemctl restart openclaw-gateway
Model-vs-RAM rule of thumb: a model needs roughly its file size in RAM plus ~1 GB for context. On a Small Node (4 GB) stick to 3-4 B parameter models quantised to q4; on a Standard Node (16 GB) you can run 7-13 B models comfortably.
3

Point OpenClaw at a remote endpoint (advanced)

If you already run Ollama somewhere else - a GPU box at home, a dedicated inference VPS - you can point your Node's OpenClaw at it. Edit /root/.openclaw/openclaw.json and set:

{
  "env": { "OLLAMA_API_KEY": "ollama-local" },
  "models": {
    "providers": {
      "ollama": {
        "baseUrl": "http://your-ollama-host:11434",
        "api": "ollama",
        "apiKey": "ollama-local"
      }
    }
  },
  "agents": { "defaults": { "model": { "primary": "ollama/your-model-name" } } }
}

Use the native Ollama base URL without a /v1 suffix. The OpenAI-compatible /v1 endpoint breaks tool calling in OpenClaw and surfaces as an Unknown model error.

For a non-Ollama OpenAI-compatible backend (vLLM, LM Studio, a private proxy) use the `openai-completions` legacy mode with a manual model entry - see the advanced OpenClaw docs.

Then systemctl restart openclaw-gateway. You can leave the local Ollama running (harmless) or stop it to reclaim memory:

systemctl disable --now ollama
4

Troubleshooting

  • "Agent failed before reply: Unknown model": the config is using the openai/ prefix for a local Ollama model. OpenClaw validates openai/* against a fixed OpenAI allowlist and rejects anything else before calling the API. Switch the prefix to ollama/ and remove any OPENAI_API_BASE pointing at http://127.0.0.1:11434/v1:
    node -e "const f=require('fs'),p='/root/.openclaw/openclaw.json',c=JSON.parse(f.readFileSync(p,'utf8'));c.env=c.env||{};delete c.env.OPENAI_API_BASE;delete c.env.OPENAI_API_KEY;c.env.OLLAMA_API_KEY='ollama-local';c.agents=c.agents||{};c.agents.defaults=c.agents.defaults||{};c.agents.defaults.model={primary:'ollama/llama3.1:8b'};f.writeFileSync(p,JSON.stringify(c,null,2));"
    systemctl restart openclaw-gateway
  • Model not responding / empty replies: journalctl -u ollama -n 100 and journalctl -u openclaw-gateway -n 100. A fresh pull on first use can take a minute.
  • Out-of-memory on a Small Node: you're probably running a model larger than ~4 B parameters. Pull a smaller tag (qwen2.5:3b, phi3:mini) and switch the config.
  • Ollama won't start: systemctl status ollama. Port 11434 must be free and the binary must be in /usr/local/bin/ollama.
  • Model in config but not pulled: ollama list to see what's on disk, ollama pull <tag> to fetch.
  • Disk full: ollama rm <tag> removes models you no longer need.

Sign up

Welcome to ClawNode

Pick a plan: OpenClaw (bring your own API key) or a Node (Ollama + open-source LLM preinstalled).

or

By selecting Agree and continue, I agree to ClawNode's Terms of Service and Privacy Policy.

or

Already have an account? Log in