Portrait of Michael Limberger

Michael Limberger

Need me? Email mike@limberger.ca

AI

Installing Claude Code

The client, not the brain

Claude Code is the client. It is where you type. Ollama is the server. It is where the thinking happens. Now we install the client.

Show me. Anthropic's installer, on your workstation (not the Ollama server, unless they are the same machine):

curl -fsSL https://claude.ai/install.sh | bash

You should see "Setting up Claude Code..." then a success line. In the notes we took, that was version 2.1.30. Your version number will vary. The binary lands at ~/.local/bin/claude. Next, run claude --help to confirm it is on disk.

PATH, then don't launch it yet

The installer puts claude in ~/.local/bin. That folder might not be in your PATH. PATH is the list of folders your shell searches for commands.

Add these lines to your ~/.zshrc (or ~/.bashrc):

export PATH="$HOME/.local/bin:$PATH"
export COLORTERM=truecolor

Then run source ~/.zshrc. Verify with claude --version. You should see a version number.

Do not run claude yet. We need to configure it first. If you run it now, it will try to connect to Anthropic's cloud and ask for login credentials. That is not what we want tonight.

Two ways to point it at Ollama

We recommend both, for reliability. Environment variables take priority. The settings file is the backup.

Method 1: add these to ~/.zshrc. Replace 10.0.0.79 with your Ollama server IP. Use localhost if Ollama runs on the same machine. Replace qwen3-coder-32k with the model name you created from the Modelfile, not the base model name.

export ANTHROPIC_BASE_URL="http://10.0.0.79:11434"
export ANTHROPIC_AUTH_TOKEN="ollama"
export ANTHROPIC_MODEL="qwen3-coder-32k"
export ANTHROPIC_SMALL_FAST_MODEL="qwen3-coder-32k"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
export API_TIMEOUT_MS="600000"

Then source ~/.zshrc.

Method 2: create ~/.claude/settings.json:

mkdir -p ~/.claude
nano ~/.claude/settings.json

Paste this. Use the same IP and model name as above.

{
  "env": {
    "ANTHROPIC_BASE_URL": "http://10.0.0.79:11434",
    "ANTHROPIC_AUTH_TOKEN": "ollama",
    "ANTHROPIC_MODEL": "qwen3-coder-32k",
    "ANTHROPIC_SMALL_FAST_MODEL": "qwen3-coder-32k",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "API_TIMEOUT_MS": "600000"
  }
}

Save and exit (Ctrl+O, Enter, Ctrl+X in nano).

Checklist at this point: Claude Code installed at ~/.local/bin/claude, PATH includes ~/.local/bin, COLORTERM=truecolor is in the shell profile, the ANTHROPIC variables are in zshrc, and settings.json exists under ~/.claude/. Still do not launch Claude Code yet. Next: what each setting actually does.