Run Claude Code on your own machine using a local model. No rate limits. No API costs. 100% private.

What you'll get

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.


Step 1: Install Ollama

Ollama is a free platform that lets you download and run AI models directly on your computer.

  1. Go to ollama.com and download the installer for your OS (macOS, Windows, or Linux).
  2. Run the installer. Setup is one command on Linux, or just an installer on Mac/Windows.
  3. Verify it's running. Open your terminal and run:
curl <http://localhost:11434>

You should see Ollama is running. That confirms Ollama is live on port 11434.


Step 2: Pull the right model

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.