Ollama and OpenClaw: Gemma 4 local model setup
Learn to connect Gemma 4 through Ollama to OpenClaw, choose a model size for your memory, and troubleshoot connections with ollama serve.
Player not loading? Watch on YouTube
This tutorial explains how to run models locally with Ollama and connect Gemma 4 to OpenClaw. The speaker covers Windows, macOS and Linux, including a VPS with suitable hardware. OpenClaw installation is assumed; the walkthrough focuses on configuring its model provider.
Hardware guidance centers on unified memory for M-series Macs and GPU VRAM for Windows and Linux machines with Nvidia graphics. On a Mac with 32 GB of memory, the speaker considers a roughly 20 GB model an upper target, with room left for other memory use. He recommends smaller models when speed or available memory is a constraint. These are his sizing guidelines, rather than performance guarantees.
The setup starts with installing or updating Ollama. The speaker says the recommended model needs the newest version, but gives no version number. He explains model downloads, lists installed models with ollama list, and tests a terminal chat with ollama run. Tool-calling support matters when choosing a local LLM for an AI agent.
In OpenClaw, he selects Ollama's local-only option, keeps the default base URL, enables downloaded models and restarts the gateway. If the connection fails, he suggests ollama serve or launching the Ollama app. The final section covers switching models and his preference for keeping a cloud model available for harder tasks.