Running LLMs locally with Ollama and Claude Code
The invention of AI tools has greatly changed the way we work, and this trend will only continue. To keep up with the hype, it is good to have the ability to familiarize yourself with the most popular tools. One of them is definitely Claude Code. It provides you with almost unlimited capabilities to boost […]
Technologies
The invention of AI tools has greatly changed the way we work, and this trend will only continue. To keep up with the hype, it is good to have the ability to familiarize yourself with the most popular tools. One of them is definitely Claude Code.
It provides you with almost unlimited capabilities to boost your productivity in any area you are involved in. But the downside is the price. However, there is a way to use it completely free, of course with some limitations. Another positive aspect of having a local setup is that you can use it with your private information without fear of a security breach, since everything runs only on your machine.
This approach uses Ollama and its free models. In this article, I will give you a guide on how to set up all the necessary components to run an LLM locally on your computer.
Step 1. Install Ollama
First, you need to install Ollama – a tool for managing and running LLMs locally. Go to https://ollama.com and run the terminal command provided there. You can choose different options based on your operating system:
curl -fsSL https://ollama.com/install.sh | sh
Step 2. Install Claude Code

Ollama works with various tools. At the bottom of its main page there is a list of supported tools. By choosing Claude Code, you will be redirected to the appropriate page where you can find the installation command:
curl -fsSL https://claude.ai/install.sh | bash
That page also lists recommended models to download.
Step 3. Download a Model
On the Ollama website there is a tab with a list of all available models. Pick a model and run:
ollama pull <model name>:<model version>
To verify the installation, use the following command:
ollama list
Please note that larger models require more RAM on your machine.
Running Claude Locally
With all components installed, run the following command to start Claude in your terminal using the local model:
ollama launch claude
Note: using just the claude command will prompt you to log in or register a Claude account, which is not what we want here.
If you have several models downloaded, you can use the following command to select which model to use:
ollama launch claude –config
And that is it – you now have a complete setup to run Claude Code locally. It will work slower than the regular cloud version, but on the other hand it is completely free and secure.
At Swan Software Solutions, we always work to expand our knowledge so we can better help our clients. To find out more about how we could help with your technology needs, schedule a free assessment.