How to Use Claude Code for FREE with Ollama ($0 Setup in 7 Steps), by DevopsLesson on YouTube. 8 min 35 s.
- Video length
- 8 min 35 s
- Time to do it
- 30 minutes
- Difficulty
- Medium
- Steps
- 8
What you need
Steps
Download Ollama from ollama.com and run the installer for your system. On macOS drag it to Applications, on Windows run the setup file, on Linux use the install script.
Open a terminal and type ollama --version to confirm the install worked. If the command is not found, reopen the terminal or restart your computer.
Download the Qwen 3.5 model by running ollama pull qwen3.5. The file is about 7.6 GB, so give it time on a slow connection.
Test the model with ollama run qwen3.5, type hi and check that it answers. Type /bye to exit the chat.
Open the Ollama app, go to Settings and set Context length to 64K. Quit Ollama from the menu bar and reopen it so the change takes effect.
Install Claude Code on macOS or Linux with the curl install script from the official docs, then run claude --version to check it.
Connect Claude Code to your local model by running ollama launch claude --model qwen3.5. Claude Code now starts on the free model.
Try a small task like writing a script or fixing a short file. If you have less than 16 GB of RAM, use Kimi K2.7 Code through a free Ollama cloud account instead.
Tips and common mistakes
Do not skip the 64K context length setting, or Claude Code may fail on longer files.
Quit and reopen Ollama after changing settings, otherwise the new context length is not used.
Keep the model on a drive with at least 10 GB free, since downloads and updates need extra room.
The free local model is slower and less reliable on large messy codebases than paid Claude models.
Questions
Do I need a paid Claude subscription for this?
No. Claude Code runs against the free Qwen 3.5 model through Ollama, so there is no monthly fee. You only pay with your own hardware and electricity.
What if my computer has less than 16 GB of RAM?
Use Kimi K2.7 Code in the cloud instead. It runs on Ollama's servers through a free Ollama account, so your machine does not need to hold the model.
Does this work on Windows?
Ollama installs on Windows, but the video installs Claude Code on macOS and Linux only. Check the Claude Code docs for the current Windows option before you start.
This guide was drafted from the video's details and general task knowledge. It has not been checked against the full video. Check the video and relevant product instructions before following a procedure. Report a correction.



