My Quick Notes

Ain't Nobody Got Time to Read

March 9, 2026

Setup local agent on Raspberry Pi 5 with OpenClaw and Ollama

Install Ollama

  1. On the machine which will host the Ollama, create a folder for ollama.
    mkdir ollama
    cd ollama
  1. Create docker-compose.yaml in ollama folder with content:

    services:
      ollama:
        image: ollama/ollama:latest
        container_name: ollama
        ports:
          - "11434:11434"
        volumes:
          - ./data:/root/.ollama
        restart: unless-stopped
  2. Pull a model for local use, for example, qwen3:0.6b:

    docker compose exec ollama ollama pull qwen3:0.6b

Install OpenClaw

  1. On Raspberry Pi, get OpenClaw source code from: https://github.com/openclaw/openclaw

  2. Create docker:

    cd openclaw
    export OPENCLAW_SANDBOX=1
    export OPENCLAW_IMAGE=ghcr.io/openclaw/openclaw:latest
    ./docker-setup.sh
  3. Open config file ~/.openclaw/openclaw.json, in section gateway, add controlUi field:

    {
      "gateway": {
        "controlUi": {
          "allowedOrigins": [
            "http://localhost:18789",
            "http://127.0.0.1:18789",
            "http://<your_pi_address>:18789"
          ]
        }
      }
    }
  4. Restart gateway:

    docker compose restart openclaw-gateway

Add local Ollama to OpenClaw

Open ~/.openclaw/openclaw.json

  1. In section models > providers, add information for the local Ollama:

    {
      "models": {
        "mode": "merge",
        "providers": {
          "ollama": {
            "baseUrl": "http://<ollama_machine_address>:11434",
            "api": "ollama",
            "models": [
              {
                "id": "qwen3:0.6b",
                "name": "qwen3:0.6b",
                "reasoning": false,
                "input": [
                  "text"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 16000,
                "maxTokens": 512,
                "compat": {
                  "thinkingFormat": "qwen"
                }
              }
            ]
          }
        }
      }
    }
  2. Restart gateway:

    docker compose restart openclaw-gateway
  3. Now your agent can use ollama/qwen3:0.6b as its model.

PreviousHyprland - Pixelated your screen when locking
NextImplement basic authentication in actix-web

Comments