Run Claude Code on your own machine using a local model. No rate limits. No API costs. 100% private.
By the end of this guide, you'll have Claude Code running on your computer talking to a local AI model instead of Anthropic's servers. That means:
Total setup time: ~10 minutes.
Ollama is a free platform that lets you download and run AI models directly on your computer.
curl <http://localhost:11434>
You should see Ollama is running. That confirms Ollama is live on port 11434.
The model is the brain. Pick one based on your machine.
| Your machine | Recommended model | Pull command |
|---|---|---|
| Powerful PC / M-series Mac (32GB+ RAM) | Qwen3-Coder (best performance) | ollama pull qwen3-coder |
| Lighter machine (16GB RAM) | Qwen2.5-Coder (still solid) | ollama pull qwen2.5-coder |
Run the matching command in your terminal. The download is a few GB, so grab a coffee.