Run Claude Code Locally for Free: LM Studio Integration Guide
Altruistic-Key-6205 · reddit · 2026-08-01
This guide details how to connect Claude Code to local open-source models (like Gemma 4 or Qwen3.6) via LM Studio, enabling completely free local inference without API costs.
Setup Steps:
- Install LM Studio and download the desired model.
- Start LM Studio's local server.
- Configure environment variables in your terminal, pointing ANTHROPICBASEURL to the local port and setting a dummy token.
- Launch Claude Code with the local model specified.
Recommended Local Models:
- Gemma 4 E4B 4-bit: Recommended starting point, requiring only 6GB VRAM.
- Gemma 4 12B 4-bit: Stronger coding and reasoning, requires at least 16GB unified memory.
- Qwen3.6 27B/35B-A3B 4-bit: Best for demanding coding tasks, needing 16GB-20GB VRAM.
More from coding & agent
- Using Codex to Improve Voice-to-Text: Auto-Extracting Custom Vocabularies — jdjohnson · 2026-08-01
- Fable Agent Burns $700 in 8h, Halts Task Citing a Rule It Just Invented — MarcJSchmidt · 2026-08-01
- From Copy-Paste to Multi-Terminal: The Evolution of AI Coding Workflows — GregKamradt · 2026-08-01
- Claude + Thrixel Generated a Full 3D Game with Under 5 Prompts — RanaHanocka · 2026-08-01
- Introducing LOLM: A Low-Cost AI Agent with Transparent Run Receipts — OGMYT · 2026-08-01
- Roomote Launches: A Source-Available, Self-Hostable Cloud Agent Platform — Scobleizer · 2026-08-01