Setup guide - From Ollama and Roo Code docs
Use Ollama in Roo Code
Roo Code has a native Ollama API provider; set the provider to Ollama, keep the default base URL http://localhost:11434, and enter an Ollama model id.
Last verified 6 steps3 official sources
Steps
- Step 1.
Install Roo Code from the VS Code Marketplace, open it, and click the gear icon at the top right to open Provider Settings.
- Step 2.
Set API Provider to Ollama.
- Step 3.
(Optional) Update Base URL if Ollama runs remotely. The default is
http://localhost:11434. - Step 4.
Enter a valid Model ID, for example qwen3 or qwen3-coder:480b-cloud.
- Step 5.
Adjust the Context Window to at least 32K tokens for coding tasks. Roo Code's docs show how to bake the context into an Ollama model.
Terminalollama run qwen2.5-coder:32b /set parameter num_ctx 32768 /save your_model_name - Step 6.
ollama.com cloud: create an API key at https://ollama.com/settings/keys, enable Use custom base URL and set it to https://ollama.com, enter your Ollama API Key, then select a model.
Caveats
- Roo Code's docs say it defers to the Modelfile's num_ctx setting by default, so context is set in Ollama rather than Roo.
- Ollama's page names the Context Window setting in Roo; Roo's page instead recommends configuring num_ctx in an Ollama Modelfile. Both are documented.
- The qwen2.5-coder:32b example comes from Roo Code's docs; Ollama's page uses qwen3 and qwen3-coder:480b-cloud.
More setup guides
Same tool, other providers
Related reading
- Ollama Decision Models: Run Nimble Locally with --askOllama 0.40.4 runs decision models locally: ollama run nimble --ask answers yes/no, label and score questions with probabilities. Commands and limits.
- Ollama 0.40 on Mac: MLX by Default, Disk Space DoubledOllama 0.40 runs supported models on MLX on Apple Silicon and keeps a backup copy of each model you load. What it costs in disk, what is fixed, and the cleanup.
- GitHub Copilot CLI With Ollama: Local Models and the New SandboxCopilot CLI 1.0.94 finds local Ollama models from /model and ships an OS-level sandbox. Setup, the 4k context trap, and why local is not offline.
- Hermes Agent Guide (2026): What It Is, Local Setup With Ollama, Skills, and Hermes vs OpenClawHermes Agent is Nous Research's open-source, self-improving AI agent. Run it locally with Ollama, see how its skills system works, and compare it with OpenClaw.
- What Is OpenClaw? Setup, Skills, MCP Server, Claude Code, and Ollama (2026 Guide)What is OpenClaw? A self-hosted personal AI agent you reach through chat apps. Install, skills and ClawHub, its MCP server, Claude Code use, and Ollama models.
- GitHub Copilot for JetBrains Gains Persistent Memory and Ollama BYOKGitHub Copilot for JetBrains adds memory across chat sessions, Ollama as a BYOK provider, and enterprise settings for MCP access. What each feature does.
FAQ
How do I use Ollama in Roo Code?
Roo Code has a native Ollama API provider; set the provider to Ollama, keep the default base URL http://localhost:11434, and enter an Ollama model id.
Which Ollama model ids work in Roo Code?
The official docs read for this guide list qwen3, qwen3-coder:480b-cloud and qwen2.5-coder:32b. Requests go to http://localhost:11434.
Is this an official Ollama and Roo Code setup?
The steps draw on both Ollama's and Roo Code's docs. It was last checked against 3 official pages on October 17, 2026.
Sources
Last verified against 3 official pages.
- docs.ollama.comhttps://docs.ollama.com/integrations/roo-code
- raw.githubusercontent.comhttps://raw.githubusercontent.com/ollama/ollama/main/docs/integrations/roo-code.mdx
- raw.githubusercontent.comhttps://raw.githubusercontent.com/RooCodeInc/Roo-Code-Docs/main/docs/providers/ollama.md
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.