OpenClaw Ollama Setup for Windows
One-script Windows setup for OpenClaw + local Ollama. No cloud API keys. Self-hosted AI agents with Telegram & web search.
Originally published:
Purpose & Significance
OpenClaw + Ollama Setup bridges the gap between local AI infrastructure and OpenClaw's multi-agent framework on Windows. Instead of relying on cloud API keys and external services, this single-script installer automates the entire configuration process, enabling developers to run a fully self-hosted AI agent system on their own hardware. For teams prioritizing data privacy, offline capability, and cost control, this tool eliminates friction in the setup workflow and removes dependency on cloud providers.
Key Features
- One-command setup: PowerShell script automates Docker, Ollama detection, model pulling, and OpenClaw Docker image building
- Windows-native: Optimized for Windows 10/11 with PowerShell 5.1+; no Linux expertise required
- Local-first architecture: Zero cloud API keys needed; runs entirely on your machine with persistent gateway tokens
- Multi-model support: Configure primary models for conversations and dedicated subagent models for parallel task execution
- Optional integrations: Brave Search for web capabilities, GitHub CLI for repository access, and Telegram for mobile chat access
- Interactive model selection: Toggle to pick from your installed Ollama models at setup time
- Docker Compose orchestration: Automated health checks and container management with cached image builds for fast re-runs
- Workspace templates: Pre-configured skill directories and agent documentation (AGENTS.md) included
Getting Started
Clone the repository with submodules, ensure Docker Desktop is running, then execute the setup script:
git clone --recurse-submodules https://github.com/flottokarotto/openclaw-ollama-setup.git ~/workspace/openclaw
cd ~/workspace/openclaw
.\setup.ps1
The script auto-starts Ollama if needed, pulls configured models (default: qwen3:14b), builds the OpenClaw Docker image, and launches the gateway. After completion, open the printed dashboard URL and approve device pairing via the command provided. Setup time depends on model size and initial Docker build; subsequent runs leverage cached layers for speed.
Configuration & Customization
Edit variables at the top of setup.ps1 or create a wrapper script to override defaults. Key configuration options include:
- $OLLAMA_MODELS: Array of model names; first is primary (alias: smart), last is for subagents. Example: @("qwen3:14b", "qwen3:8b") enables dual-model setup with fast switching via /model command
- $AUTO_UPDATE: Pull latest OpenClaw source before building (useful for staying current with upstream changes)
- $BRAVE_SEARCH_API_KEY: Enable web search with free API key (2,000 queries/month from brave.com/search/api)
- $SETUP_GITHUB: Install GitHub CLI in container for repository and issue interaction
- $SETUP_TELEGRAM: Connect to Telegram for chat access; requires bot token from @BotFather and optional user/group IDs for access control
Who It's For
Windows developers and teams seeking local-first AI agent setup without cloud dependencies. Ideal for: privacy-conscious organizations running on-premises infrastructure, developers prototyping multi-agent workflows with budget constraints, teams integrating Ollama with OpenClaw's skill system, and anyone needing offline AI capability with optional mobile/web access via Telegram and Brave Search integrations.
Advanced Usage
Telegram Integration: For private DM access, add your Telegram user ID to $TELEGRAM_ALLOW_FROM. For group chats, disable bot privacy mode in BotFather settings, add the bot to your group, then capture the negative group ID from gateway logs (docker compose -f openclaw/docker-compose.yml logs -f openclaw-gateway) and add to $TELEGRAM_GROUP_ALLOW. This enables the bot to respond to all messages without @mention requirement.
Device Pairing: The gateway token persists across restarts, so your dashboard URL remains stable. If you need to list or approve devices, use: docker exec openclaw-openclaw-gateway-1 node dist/index.js devices list and docker exec openclaw-openclaw-gateway-1 node dist/index.js devices approve.
Resources
- Repository: GitHub — OpenClaw Ollama Setup
- OpenClaw: Included as git submodule; openclaw-framework
- Ollama: Download from ollama.ai; auto-detection and launch built into setup.ps1
- Docker Desktop: Required prerequisite; docker.com/products/docker-desktop
- Model Library: Browse available Ollama models at ollama.ai/library
- License: MIT — open for commercial and personal use
Source: GitHub repository flottokarotto/openclaw-ollama-setup, last updated February 2026.
Original Source
https://github.com/flottokarotto/openclaw-ollama-setup
Last updated: