claude code with ollama
10 Apr 2026install ollama and claude
see: https://docs.ollama.com/integrations/claude-code
It’s simple, just install ollama and claude separately:
curl -fsSL https://ollama.com/install.sh | sh
curl -fsSL https://claude.ai/install.sh | bash
lanuch claude
- use ollama launch sub-command //recommend
ollama launch claude ollama launch claude --model qwen3-coder:30b - manually setup
export ANTHROPIC_AUTH_TOKEN=ollama export ANTHROPIC_API_KEY="" export ANTHROPIC_BASE_URL=http://localhost:11434 claude --model qwen3-code:30b
tips
-
depending on the differences in the system, you may also need to set up the firewall to allow Ollama’s port 11434.
-
sometimes it may also be necessary to delete the existing Claude configuration files.