How To With Claude AI - Step-by-step tutorials for getting real things done with Claude

Can You Run Claude Code for Free on Your Own Computer?

By · Updated

Disclosure: this page contains Amazon affiliate links. As an Amazon Associate we earn from qualifying purchases, at no extra cost to you.

Ooh, the “free and unlimited” question — pull up a chair, thrifty code wrangler! Say you’ve seen the videos promising unlimited Claude Code for free, and you’d like to know what’s really true before you spend an evening on it. Here’s the honest picture, straight from Anthropic’s and Ollama’s own pages. If you decide to run AI at home, the part that matters most is a graphics card with plenty of video memory (Amazon search).

Short answer: Not with Claude’s own models: Anthropic’s pricing page lists Claude Code as not included in the Free plan. You can point the Claude Code app at a free open model running on your own computer through Ollama, which documents the setup, but Anthropic doesn’t support that route, and local models are smaller than Claude.

Diagram of the two places Claude Code can send its requests: by default to Anthropic's servers and Claude models, which need a Pro, Max, Ultra, Team or Enterprise plan or a Claude Console account, or, through the ANTHROPIC_BASE_URL setting, to Ollama at localhost port 11434, where a free open-source AI model runs on your own graphics card or Mac.
Claude Code is the app. Where the thinking happens depends on one setting.

The two routes in plain text:

Two ways to run Claude Code. Compiled by How To With Claude AI from claude.com/pricing, Anthropic’s Claude Code docs and Ollama’s docs, November 7, 2026.
QuestionRoute A: Claude modelsRoute B: an open model through Ollama
Where the model runsAnthropic’s serversYour own GPU or Mac
What you needA Pro, Max, Ultra, Team or Enterprise plan, or a Claude Console accountOllama, a downloaded open model and enough memory
Free planClaude Code not includedNo subscription for local models
LimitsUsage limits every 5 hours and every weekYour hardware’s memory and speed
Who supports itAnthropicOllama’s documentation; Anthropic doesn’t support it

Is Claude Code free with a Claude account?

Claude Code isn’t included in Claude’s Free plan. The comparison table on claude.com/pricing shows Claude Code as “No” for Free and “Yes” for Pro, Max, Ultra, Team and Enterprise. Anthropic’s Claude Code quickstart agrees, listing A Claude subscription (Pro, Max, Ultra, Team, or Enterprise), Claude Console account, or access through a supported cloud provider.

Paid plans still have limits. The pricing page describes Pro as More usage than Free, every 5 hours and every week, and Claude Help Center’s Pro and Max article adds: These limits are shared across Claude and Claude Code, meaning all activity in both tools counts against the same limits. So no Claude plan is “unlimited” in the way the video titles suggest.

What can you do with Claude for free?

The Free Claude plan is a chat, not Claude Code, and the chat can still help with code. The Free plan’s list on claude.com/pricing includes Chat on web, desktop, and mobile and Search the web, create files, and run code, with Limited usage every 5 hours and every week. You can paste a short piece of your own code into the Claude chat, ask what it does or why it breaks, and copy the fix back yourself. What the Free plan doesn’t give you is the Claude Code app working inside your project folder.

What about the Claude Console and the API?

A Claude Console account is the pay-as-you-go way to use Claude Code. The quickstart describes it as API access with pre-paid credits, and Anthropic’s Claude Code costs page says Claude Code charges by API token consumption. That suits someone who codes now and then, but it isn’t free: you top up credits before you use them.

What does running Claude Code on your own computer really mean?

Running Claude Code “locally” means the Claude Code app talks to an open-source AI model on your computer instead of to Claude. The Claude Code app always runs on your computer. The model that does the thinking normally runs on Anthropic’s servers. Anthropic’s environment variables page describes the setting that changes this, ANTHROPIC_BASE_URL, as a way to Override the API endpoint to route requests through a proxy or gateway.

Ollama, a free app for running open models, uses exactly that setting. Ollama’s Claude Code page says Ollama connects Claude Code to local and cloud models through its Anthropic-compatible API. The model answering you is then an open model such as Qwen, OpenAI’s gpt-oss or Mistral’s Devstral, not Claude. Claude Code’s tools, prompts and file editing stay the same; the brain behind them changes.

Does Anthropic support using Claude Code with other models?

No. Anthropic’s LLM gateway page says it plainly:

Any gateway that exposes a supported API format works. Anthropic doesn’t endorse, maintain, or audit third-party gateway products, and doesn’t support routing Claude Code to non-Claude models through any gateway.

In everyday terms, the Ollama route is documented by Ollama, and if something breaks, Ollama’s docs are where you look, not Anthropic’s support team. If you use Claude Code at work, ask whoever looks after your tools before you change where it sends requests.

Are Ollama’s cloud models free and local too?

Ollama’s cloud models run on Ollama’s servers, not on your computer, so only the local models are truly local. A model name ending in :cloud, such as gpt-oss:20b-cloud, is a cloud model. Ollama’s pricing page describes its no-subscription plan as Pay per token for every cloud model and also says Running models on your own hardware is always unlimited. So the free, unlimited part is the model you download and run on your own machine.

How much GPU memory does each model size need?

A model runs well when its whole download fits in your graphics card’s memory (VRAM), or in a Mac’s memory, with a few gigabytes to spare for the conversation. A model that doesn’t fit spills into ordinary system memory and slows down a lot. The ladder below matches common memory sizes with models from the Ollama library.

Ladder chart matching GPU video memory or Mac unified memory to open-source AI models that fit, from Ollama download sizes: 4 GB fits qwen3.5 2b or qwen2.5-coder 3b, 8 GB fits qwen3.5 4b, 12 GB fits qwen3.5 9b, 16 GB fits gpt-oss 20b, 24 GB fits qwen3-coder 30b or qwen3.5 27b, 32 GB on a GeForce RTX 5090 fits qwen3.5 35b, 96 to 128 GB on an RTX PRO 6000 or Mac Studio M5 Max fits gpt-oss 120b or qwen3.5 122b, and 256 GB or more on a Mac Studio M5 Ultra fits qwen3-coder 480b.
Pick the row that matches your memory, then leave a little room for the chat itself.

Here’s the full list behind the ladder, with each model’s download size and context window as the Ollama library shows them:

Open models and the memory they need. Compiled by How To With Claude AI from the Ollama library pages for qwen2.5-coder, qwen3.5, gpt-oss, devstral-small-2 and qwen3-coder, November 7, 2026. “Comfortable memory” is our rule of thumb (download size plus room for a 64k context), not a maker figure.
Model (Ollama tag)Download sizeContext windowComfortable memoryMaker’s note
qwen2.5-coder:3b1.9 GB32K4 GBContext below the 64k Ollama asks for with Claude Code
qwen3.5:4b3.3-4.0 GB256K8 GB-
qwen3.5:9b (qwen3.5)6.6-7.6 GB256K12 GBThe model in Ollama’s Claude Code example
qwen2.5-coder:14b9.0 GB32K12 GBContext below 64k
gpt-oss:20b14 GB128K16 GBRuns on systems with as little as 16GB memory
devstral-small-2:24b15 GB384K24 GBNeeds Ollama 0.13.3 or later
qwen3.5:27b17-20 GB256K24 GB-
qwen3-coder:30b19 GB256K24 GB-
qwen3.5:35b22 GB256K32 GB-
gpt-oss:120b65 GB128K80-96 GBFits on a single 80GB GPU
qwen3.5:122b81 GB256K96-128 GB-
qwen3-coder:480b290 GB256K512 GBa minimum of 250GB of memory or unified memory

The gpt-oss notes come from OpenAI’s own wording, quoted on Ollama’s gpt-oss page, and the qwen3-coder:480b note is from Ollama’s qwen3-coder page. Two coder models on the list, qwen2.5-coder:3b and qwen2.5-coder:14b, top out at a 32K context window, so they suit chat and small questions better than Claude Code.

Why does the context window need extra memory?

The context window is how much text the model can keep in mind at once, and a bigger window takes more memory on top of the model itself. Ollama’s context length page says Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens. The same page lists Ollama’s defaults by memory: 4k context below 24 GiB of VRAM, 32k from 24 to 48 GiB, and 256k from 48 GiB up. So on most home graphics cards you have to raise the context yourself, and that’s why we leave a few gigabytes free in the table above. Ollama’s FAQ also notes that memory use grows with the context length.

Does a Mac count its memory differently?

A Mac with Apple silicon shares one pool of unified memory between the processor and the graphics, so its total memory is what counts. Ollama’s macOS page lists Apple M series (CPU and GPU support) or x86 (CPU only), so an Intel Mac runs models on the processor alone, which is much slower. macOS and your open apps use part of that unified memory too, so a 16 GB Mac has less than 16 GB free for a model.

How do you find out how much memory your computer has?

On Windows 11, open Task Manager, choose Performance, then GPU, and look at Dedicated GPU memory. On a Mac, open the Apple menu, then About This Mac, and look at Memory. Match the number to a row in the table above.

How do you set up Claude Code with Ollama?

You install Ollama and Claude Code, download a model that fits your memory, raise the context window to 64k, and start Claude Code through Ollama. These steps follow Ollama’s Claude Code page and Anthropic’s quickstart. Do it in a practice folder first, not in your most important project.

I love this bit of the puzzle, I really do. It turns out the whole question of which model can I run? mostly comes down to one number printed on your graphics card’s box.

How do you install Ollama and Claude Code?

Ollama needs MacOS Sonoma (v14) or newer on a Mac, per its macOS page, or Windows 10 22H2 or newer, Home or Pro, per its Windows page, which also asks for NVIDIA driver 551.61 or newer if you have an NVIDIA card. Ollama’s GPU page lists NVIDIA cards with compute capability 5.0 and up, AMD Radeon cards and Apple’s Metal. Install both apps with the commands from their own pages:

# Ollama: macOS or Linux
curl -fsSL https://ollama.com/install.sh | sh

# Ollama: Windows PowerShell
irm https://ollama.com/install.ps1 | iex

# Claude Code: macOS, Linux or WSL
curl -fsSL https://claude.ai/install.sh | bash

# Claude Code: Windows PowerShell
irm https://claude.ai/install.ps1 | iex

Which model should you download first?

Start with the biggest model that fits your memory comfortably, using the table above. Ollama’s own Claude Code example uses qwen3.5, which is the 9b model, a good fit for a 12 GB card. With 16 GB, OpenAI’s gpt-oss:20b is the obvious next step up.

# about 7 GB download, 12 GB comfortable
ollama pull qwen3.5

# about 14 GB download, 16 GB comfortable
ollama pull gpt-oss:20b

How do you set Ollama’s context length to 64k?

Raise the context length before you start Claude Code, because Ollama’s default on cards under 24 GiB is 4k. Ollama’s context length page gives two ways: move the context slider in the Ollama app’s settings, or start the server with a setting:

OLLAMA_CONTEXT_LENGTH=64000 ollama serve

How do you check that the model runs on your GPU?

Run the model once, then run ollama ps and read the Processor column. Ollama’s FAQ explains it: 100% GPU means the model was loaded entirely into the GPU, while a split such as 48%/52% CPU/GPU means part of it landed in system memory. If you see a split, step down one model size or lower the context.

ollama run qwen3.5 "Say hello in five words."
ollama ps

How do you start Claude Code with a local model?

The simplest way is Ollama’s launcher, which sets everything up for you. Open a terminal in your practice folder and run:

ollama launch claude

Ollama’s page also gives the manual way, with three settings and a model name:

export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL=http://localhost:11434
claude --model qwen3.5

Ollama’s Anthropic compatibility page says the token is required but ignored on your own computer, so the word “ollama” is just a placeholder, not a password. Keep Claude Code in Manual mode so it asks before each change; our guide to speeding up an Android TV with Claude Code shows a settings file and house rules you can reuse. And save a copy of your folder, or commit it to Git, before you let any model edit files.

How good is a local model compared with Claude?

A local model is a smaller, simpler helper than Claude, and Ollama’s bridge doesn’t cover every feature Claude Code uses. Ollama’s compatibility page says Ollama supports a subset of the Anthropic Messages API. The same page lists prompt caching, PDF documents, token counting and the tool_choice option as not supported, and Ollama’s Claude Code page adds that Hosted WebSearch and advanced tool controls are not fully supported.

Anthropic doesn’t publish how big Claude’s models are, so there’s no exact size comparison. Treat a model that fits on one home graphics card as a junior helper and give it small, clear jobs: explain one file, write one function, add comments, draft a test. Read every change before you accept it, and don’t hand it a whole messy project in one go.

When is a paid Claude plan worth it?

A paid Claude plan is worth a look when the jobs grow: changes across many files, hard bugs, or a project you depend on. Pro is the first plan that includes Claude Code, per claude.com/pricing, and Max and Ultra add more usage. You can also keep both: a local model for practice and quick questions, and Claude for the work that really matters.

What hardware runs bigger models at home?

More memory runs bigger models, and faster memory makes them answer quicker. These are the top-tier options, with the figures from each maker’s own spec page:

High-memory hardware for local AI. Compiled by How To With Claude AI from NVIDIA’s and Apple’s spec pages, November 7, 2026.
HardwareMemoryMemory bandwidthBiggest row it reaches
NVIDIA GeForce RTX 509032 GB GDDR7-qwen3.5:35b
NVIDIA RTX PRO 6000 Blackwell96 GB GDDR7 with ECC1792 GB/secgpt-oss:120b, qwen3.5:122b
Apple Mac Studio, M5 Max36 GB to 128 GB unified460 GB/s or 614 GB/s, by configurationgpt-oss:120b at 128 GB
Apple Mac Studio, M5 Ultra96 GB to 512 GB unified1.2 TB/sqwen3-coder:480b at 512 GB

What should you try first?

Check your memory tonight, download the one model that fits it comfortably, and run ollama launch claude in an empty practice folder. Ask it to write a tiny script and explain each line, then watch how it does. That ten-minute test tells you more than any video title. When you’re ready for a real project, try our Claude Code video editing tutorial, and the newsletter box below brings new Claude tutorials as we write them.

Go peek at your memory number, pick the model that fits, and enjoy the little thrill of an AI answering from a box under your own desk. Your fans may get chatty.

Sources and further reading

Questions and answers

Is Claude Code free?

No, not with Claude’s own models. Claude’s pricing page shows Claude Code as not included in the Free plan and included in Pro, Max, Ultra, Team and Enterprise. A Claude Console account with pre-paid API credits also works.

Can I use Claude Code with Ollama?

Yes. Ollama documents it: run ollama launch claude, or set ANTHROPIC_BASE_URL to http://localhost:11434 and start claude with a model name. Anthropic’s gateway page says it doesn’t support routing Claude Code to non-Claude models, so Ollama’s docs are your guide.

How much VRAM do I need to run a local LLM for coding?

Enough to hold the model’s download plus a few gigabytes for the context window. From Ollama’s library, qwen3.5 at 9b is about 7 GB and fits a 12 GB card, gpt-oss:20b is 14 GB for 16 GB, and qwen3-coder:30b is 19 GB for 24 GB.

Does Claude Code work offline?

With a local model, the model’s requests go to Ollama on your own computer instead of the internet. You still need the internet to install Claude Code and Ollama and to download the model, and Anthropic doesn’t support this setup, so it may change.

Is the free Claude plan enough for coding?

The Free plan can help with small coding questions in the chat: claude.com/pricing lists searching the web, creating files and running code, with limited usage every 5 hours and every week. It doesn’t include Claude Code working in your project folder.

How this was written: Written from claude.com/pricing, Anthropic’s Claude Code quickstart, LLM gateway, environment variable and data usage pages, Claude Help Center’s Pro and Max article, Ollama’s Claude Code, Anthropic compatibility, context length, FAQ, GPU, macOS, Windows and pricing pages, the Ollama library pages for each model, and NVIDIA’s and Apple’s spec pages, all read November 7, 2026. We have not run these models ourselves, and the memory column is our own rule of thumb built on the makers’ figures. How To With Claude AI is independent and not affiliated with Anthropic, Ollama, OpenAI, NVIDIA or Apple.

Oh, one more thing…

If this helped, you’ll like our free updates: the insights we discover while researching, and the moments worth sharing with other people learning to use Claude — no spam, no promotions.

One short email when there’s something worth your time. Unsubscribe any time.