Add Ollama Provider (NanoClaw)
Reroutes a NanoClaw agent group to a local Ollama model instead of the Anthropic API — no provider code required.
What it does
Points a NanoClaw agent group at a locally running Ollama server instead of the Anthropic API. Because Ollama exposes an Anthropic-compatible v1/messages endpoint, no new provider code is needed — only environment overrides (ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY, NO_PROXY) plus a model setting.
The runbook covers: checking/adding env and blockedHosts to ContainerConfig and container-runner.ts, fixing home-dir permissions in the Dockerfile, editing groups/<folder>/container.json, writing model into the group's shared settings.json, rebuilding and restarting via launchd/systemd, and verifying with docker inspect and Ollama's /api/ps. It also documents blocking api.anthropic.com (mapped to 0.0.0.0) to prevent accidental spend, a revert procedure, and four common failure modes.
Who it's for
- NanoClaw operators who want to cut API costs or go fully local
- Teams needing open-weight models in offline or restricted networks
- Developers comfortable with Docker, pnpm builds and service managers
Caveat: this is repo-specific. It assumes NanoClaw's file layout, SQLite DB and build scripts.
Examples
- "Switch my
researchagent group toqwen3-coder" — edits container.json + settings.json, rebuilds, restarts. - "Make sure I never accidentally hit the paid API" — adds
blockedHosts: ["api.anthropic.com"]so the container can't reach it. - "Agent replies but Ollama shows no activity" — walks the troubleshooting path (missing lowercase
no_proxy).
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .claude/skills/add-ollama-provider folder from the GitHub repo nanocoai/nanoclaw into my ~/.claude/skills/add-ollama-provider/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/nanocoai/nanoclaw.git /tmp/nanoclaw && mkdir -p ~/.claude/skills && cp -r /tmp/nanoclaw/.claude/skills/add-ollama-provider ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/nanocoai/nanoclaw.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r nanoclaw/.claude/skills/add-ollama-provider ~/.claude/skills/ - Prerequisites: install and start Ollama, verify with
curl -s http://localhost:11434/api/tags, then pull a model withollama pull <model>. - Launch Claude Code from your NanoClaw project root and ask: "Use add-ollama-provider to move group <name> to Ollama".
- Follow the build (
pnpm run build) and service restart steps, then verify withdocker exec <container> env | grep ANTHROPIC.