Michael Limberger
Need me? Email mike@limberger.ca
AI
Installing And Configuring Ollama
The engine, then a model that can actually see
Ollama runs your local models. Install it, pull a model, then create a properly configured version of that model. That last step is critical and often missed.
+-------------------------------------------------------+
| IMPORTANT: Ollama 0.14.0 or higher required |
| |
| The Anthropic API compatibility was added January |
| 2026. Older versions return 404 errors. |
+-------------------------------------------------------+
Show me.
Check version: ollama --version.
If it is below 0.14.0, update.
Fresh install on macOS: download from ollama.com, or run brew install ollama.
On Linux: curl -fsSL https://ollama.ai/install.sh | sh.
Already have it but too old?
On macOS Homebrew: brew upgrade ollama.
Direct install: download the latest from ollama.com and install over the old version.
On Linux, the same install script handles upgrades.
Verify: ollama --version should show 0.14.0 or higher.
On macOS, open Ollama from Applications (menu bar icon) or run ollama serve.
On Linux: sudo systemctl start ollama, then sudo systemctl enable ollama so it starts on boot.
Pull the base, then don't use the default context
We recommend qwen3-coder-next:
ollama pull qwen3-coder-next:latest
About 18GB, so go get coffee.
+-------------------------------------------------------+
| DO NOT SKIP THIS SECTION |
| |
| The base model defaults to 4K context. |
| Claude Code will barely function with 4K. |
| You MUST create a model with proper context size. |
+-------------------------------------------------------+
qwen3-coder-next supports 256,000 tokens of context. Ollama's default is 4,096. Ollama uses a conservative default regardless of model capability. With only 4K, Claude Code cannot fit your files plus conversation history. It will seem broken.
Show me.
Create a Modelfile at ~/Modelfile-qwen-claude:
FROM qwen3-coder-next:latest
PARAMETER num_ctx 32768
FROM uses qwen3-coder-next as the base.
num_ctx sets the context window to 32K tokens.
Then:
ollama create qwen3-coder-32k -f ~/Modelfile-qwen-claude
This creates qwen3-coder-32k: identical to the base, but with 32K context instead of 4K.
It does not re-download the weights.
It creates a configuration layer.
ollama list should show both the 18GB base and the 18GB 32k version.
Use the 32k version with Claude Code.
Test: ollama run qwen3-coder-32k, then in another terminal run ollama ps.
CONTEXT should show 32768, not 4096.
Type /bye to exit.
Pick a window that fits RAM
On 16GB unified memory: PARAMETER num_ctx 8192, and name it qwen3-coder-8k.
On 32GB: 32768, qwen3-coder-32k.
On 64GB: 65536, qwen3-coder-64k.
Larger context uses more RAM.
Do not exceed available memory or the machine swaps to disk and slows to a crawl.
If the client is on another machine
By default Ollama only listens on localhost. Skip this section if everything is on one machine.
On macOS: echo 'export OLLAMA_HOST="0.0.0.0:11434"' >> ~/.zshrc, then source ~/.zshrc, pkill ollama, and ollama serve.
That runs in the foreground.
Keep the terminal open.
On Linux: sudo systemctl edit ollama.service, add a [Service] section with Environment="OLLAMA_HOST=0.0.0.0:11434", then daemon-reload and restart.
Check lsof -i :11434.
You want *:11434 (LISTEN).
An asterisk means all interfaces.
If it says localhost, the setting did not take.
Find the server IP.
On macOS: ipconfig getifaddr en0.
On Linux: hostname -I | awk '{print $1}'.
Write it down.
Show me. Test the Anthropic endpoint Claude Code will use. Use your configured model name, not the base:
curl http://YOUR_IP:11434/v1/messages \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-coder-32k",
"max_tokens": 50,
"messages": [{"role": "user", "content": "Say hello"}]
}'
You should get JSON back with a greeting.
When Ollama won't talk
Connection refused: is Ollama running (ps aux | grep ollama)?
Is the firewall blocking 11434?
Did OLLAMA_HOST take effect (lsof -i :11434)?
"404 page not found" on /v1/messages: the version is too old, so update to 0.14.0+.
Model not found: did you create the configured model, and is the name spelled exactly as in ollama list?
Next: install Claude Code on the workstation.