Skip to content

Instantly share code, notes, and snippets.

@emadshanab
Forked from iam-veeramalla/openclaw_with_ollama.md
Created February 19, 2026 01:55
Show Gist options
  • Select an option

  • Save emadshanab/6f04e9bde302161dd7b6068e346e3909 to your computer and use it in GitHub Desktop.

Select an option

Save emadshanab/6f04e9bde302161dd7b6068e346e3909 to your computer and use it in GitHub Desktop.
openclaw with ollama (Zero cost AI Assistant)

OpenClaw configuration with Ollama

Install OpenClaw

curl -fsSL https://openclaw.ai/install.sh | bash

Install Ollama

curl -fsSL https://ollama.com/install.sh | sh

Run a powerful model locally

ollama run gpt-oss:20b

Uninstall OpenClaw (if exists)

openclaw uninstall

Prepare OpenClaw config for Ollama

{
  "models": {
    "providers": {
      "ollama": {
        "baseUrl": "http://localhost:11434/v1",
        "apiKey": "ollama-local",
        "api": "openai-completions",
        "models": [
          {
            "id": "gpt-oss:20b",
            "name": "gpt-oss:20b",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 131072,
            "maxTokens": 8192
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "ollama/gpt-oss:20b"
      },
      "workspace": "/Users/abhi/.openclaw/workspace",
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    }
  },
  "tools": {
    "web": {
      "search": {
        "enabled": false
      },
      "fetch": {
        "enabled": true
      }
    }
  }
}

Start OpenClaw

openclaw onboard

Configure it with Telegram (optional)

Steps explained in the video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment