Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

How to Use Ollama: Install, Run and Customise Local AI (2026)

To use Ollama, install it from ollama.com or its GitHub page, open a terminal and type ollama run followed by a model name, such as gemma4. The model downloads once, then runs on your own computer. Check the size before you pull: the smaller gemma4 tags are listed at about 4.6GB to 9.5GB, so pick one that fits your free memory.

Ollama is the tool I point people to when they ask, 'Can I run my own AI on my laptop?' The answer is yes, and Ollama keeps it to a few steps. You type one command, a model downloads, and you're chatting with an AI that runs on your own machine.

This guide explains what Ollama is, how to install it on Mac, Windows and Linux, the handful of commands you'll use every day, and how a small business might put a local model to work. Every step comes from Ollama's own GitHub page and documentation.

What Ollama is and why people use it

Ollama is a free, open-source tool for running AI models. Its GitHub page invites you to start building with open models and to access the latest releases locally or in the cloud. The README's own first example is Gemma 4, run with ollama run gemma4, and the full range sits in the library at ollama.com/library.

The appeal is control. When a model runs locally, your prompts stay on your computer rather than going to a chatbot company. If you'd rather use a hosted chatbot on a Mac, there's a walkthrough for using ChatGPT on Mac. You can also try lots of open models side by side, and connect them to other apps through Ollama's built-in API.

  • Privacy: useful when you're working with drafts or notes you'd rather not upload.
  • Choice: swap between open models from different makers in seconds.
  • Offline work: once a model is downloaded, it runs on your machine.
  • Building: developers can plug Ollama into their own apps and coding tools.

How to install Ollama on Mac, Windows and Linux

Ollama's GitHub page gives two ways to install on each system: a one-line command or a normal download.

  1. Mac: open Terminal and paste curl -fsSL https://ollama.com/install.sh | sh, or download the Ollama.dmg file and install it like any other app.
  2. Windows: open PowerShell and paste irm https://ollama.com/install.ps1 | iex, or download OllamaSetup.exe and run it.
  3. Linux: paste the same curl install command into a terminal, or follow the manual install guide.
  4. Docker: if you use containers, there's an official ollama/ollama image on Docker Hub.

A quick word of caution I'd give anyone: only run install commands copied from the official site or GitHub page, never from a random forum post or video description.

How to run your first model in Ollama

Once it's installed, you talk to Ollama from the terminal. Typing ollama on its own offers to run a model or connect Ollama to apps. To chat straight away, the docs use this example:

  1. Open your terminal or command prompt.
  2. Type ollama run gemma4 and press Enter.
  3. Wait while the model downloads the first time.
  4. Type your question when the prompt appears, and press Enter to get an answer.
  5. Browse the model library at ollama.com/library to find other models to try.

Size is the thing to check before you pull anything. On the gemma4 library page, the e2b tags are listed at 4.6GB to 7.5GB and the e4b tags at 6.6GB to 9.5GB, both with a 128K context window and text and image input. Larger tags (12b, 26b and 31b) are listed too. On a laptop, start with e2b and only move up if the answers aren't good enough.

Once a model has loaded, run ollama ps and look at the PROCESSOR column. It shows 100% GPU, 100% CPU or a split such as 48%/52% CPU/GPU. A full GPU figure means the model fits; a split or 100% CPU means part or all of it is running on the CPU, so try a smaller tag. If your own machine cannot keep up, renting a remote graphics card is the alternative, and a head-to-head of Vast.ai and RunPod shows how two platforms offer it.

The Ollama commands you'll use most

You only need a few commands. Here's the list, as Ollama's CLI reference describes each one:

Ollama commandWhat it does
ollama run gemma4Starts a chat with a model, downloading it first if needed
ollama pull gemma4Downloads a model without starting a chat
ollama lsLists the models you've downloaded
ollama psShows which models are running right now
ollama stop gemma4Stops a running model
ollama rm gemma4Deletes a model to free up space
ollama create mymodel -f ./ModelfileBuilds your own customised model under the name you give it
ollama show --modelfile gemma4Prints the Modelfile behind any model you've downloaded

How to customise a model with an Ollama Modelfile

A Modelfile is a small text file that tells Ollama how to set up your own version of a model. The docs show an example that starts with a line saying which model to build from, followed by a SYSTEM line giving it standing instructions.

Here's Ollama's own working example, word for word:

FROM llama3.2
PARAMETER temperature 1
PARAMETER num_ctx 4096
SYSTEM You are Mario from super mario bros, acting as an assistant.

FROM picks the base model. The temperature line sets how adventurous the answers are, and num_ctx sets the context window, which is how much text the model can hold in mind at once. SYSTEM is the standing instruction it follows in every chat.

For a small business, that's a neat trick. You could create a model that always writes in British English, keeps answers short, and follows your house style, then run it with one command. Swap the SYSTEM line for something like "You write in British English, keep answers under 150 words and use our house style." Save the file as Modelfile, then run ollama create housestyle -f ./Modelfile followed by ollama run housestyle. The new model appears in ollama ls like any other.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

Connecting Ollama to other apps and coding tools

Ollama runs a local server on your machine, at port 11434 on localhost, which other apps can talk to. It offers a REST API, including a chat endpoint, plus libraries for Python and JavaScript. That's how chat apps and automation tools can use your local models.

To test the server, the README gives this call, which asks gemma4 a question and returns the whole answer in one go:

curl http://localhost:11434/api/chat -d '{"model":"gemma4","messages":[{"role":"user","content":"Why is the sky blue?"}],"stream":false}'

For code, install the Python library with pip install ollama or the JavaScript one with npm i ollama. One distinction matters for privacy: Ollama's quickstart says cloud models need an API key and a sign-in, while local models need neither. The privacy and offline points on this page apply to local models only.

The newer ollama launch command sets up supported apps such as OpenCode, Claude Code, Codex and VS Code to use Ollama models. If you're exploring AI for development work, my guide to speeding up coding work with AI prompts has ideas that work with local models too.

Ollama tips for privacy and safety

  • Download models from Ollama's library or other sources you trust.
  • Check each model's licence before using it for commercial work.
  • Remember that any app you connect to Ollama may have its own data rules.
  • Review AI-written code before running it, and never paste passwords or API keys into prompts.
  • Keep your computer and Ollama updated.
  • Free disk space with ollama rm when you've finished with a model; downloaded models add up quickly at several gigabytes each.

Running locally is one way to keep things private, but it isn't the only one. My guide on whether ChatGPT is private explains the settings to check if you use a hosted chatbot too.

Is Ollama right for your business?

Ollama suits people who are comfortable with a terminal, care about privacy, or want to experiment with open models. If you'd rather click than type, a desktop app might suit you better. And if you're not sure whether local AI is worth it for your business at all, that's exactly the kind of question I help with as an AI consultant.

I run AI training and workshops for teams, and help businesses with AI enablement and workflow automation, so the busywork runs itself and people get time back. Most of that work is with SaaS marketing teams and small businesses. Here's how we can work together.

Frequently asked questions

Where does Ollama store models?

On macOS in ~/.ollama/models, on Linux in /usr/share/ollama/.ollama/models and on Windows in C:\Users\%username%\.ollama\models, according to Ollama's FAQ. That's the folder to watch if your disk fills up.

Do I need an account to use Ollama?

Not for local models. Ollama's quickstart says cloud models need an API key and a sign-in, but models you download and run on your own machine need neither.

What is Ollama's default context window?

4096 tokens. You can raise it for the whole server with OLLAMA_CONTEXT_LENGTH=8192 ollama serve, or inside a chat with /set parameter num_ctx followed by the number.

How long does Ollama keep a model in memory?

Five minutes after the last request, by default. Run ollama stop with the model's name to unload it straight away, or set OLLAMA_KEEP_ALIVE (or keep_alive in the API): -1 keeps it loaded and 0 unloads it at once.

How do I update Ollama?

On Mac and Windows, Ollama downloads updates automatically; click the menubar or taskbar item, then Restart to update. On Linux, re-run the install script.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.