How to Run a Local AI Model with Ollama on Windows, Mac or Linux (Beginner’s Guide)
Install Ollama on Windows, Mac or Linux, run your first local AI model, learn the key commands and use the local API. Checked against Ollama v0.40.16.
Want to use AI on your own computer, without a monthly fee, and without sending your chats or documents to a company in the cloud? That’s what a local AI model is: a program that runs on your machine and answers you there.
This guide shows you how to set that up with Ollama, a free tool that makes local AI much easier.
In this guide you’ll learn:
- How to install Ollama on Windows, Mac or Linux.
- How to download a model and chat with it in a few minutes.
- The handful of commands you’ll actually use, including how to leave the chat.
- How other apps on your computer can talk to the model, through a local address that stays on your machine.
- Where Ollama stores its files, and what to do if something goes wrong.
When you use a local model, your questions stay on your computer. By the end, you’ll have a working chat running on your own machine.
Who this guide is for
- Beginners who want a private, offline-capable AI assistant without a subscription.
- Small business owners who want to try AI on documents without sending them to a cloud service.
- Developers and no-code builders (n8n, scripts) who need a local AI endpoint.
What you need before you start
| Windows | macOS | Linux | |
|---|---|---|---|
| Operating system | Windows 10 22H2 or newer, Home or Pro | macOS Sonoma (14) or newer | 64-bit Linux. systemd is optional and used to run Ollama as a background service. |
| Processor / GPU | Runs on CPU. Optional NVIDIA (driver 551.61+) or supported AMD GPU | Apple M-series (CPU + GPU), or Intel x86 (CPU only) | Runs on CPU. Optional NVIDIA, AMD or Vulkan GPU |
| Disk space | At least 4 GB for Ollama itself, plus space for models | Space for the app plus models | Space for the binaries plus models |
| Admin rights | Not required: installs in your home folder | The app may ask permission to create the CLI link in /usr/local/bin |
sudo/root access for a system-wide install |
Memory: models are large. Ollama’s quickstart says the example model gemma4:e2b is about 7.2 GB to download. It recommends 8 GB of available VRAM (GPU memory), or unified memory on a Mac. With less, Ollama can use system RAM, but responses may be slower. Models can be "tens to hundreds of GB", so check your free disk space first.
You’ll also need a terminal: PowerShell on Windows, Terminal on Mac, or any shell on Linux.
Contents
- Install Ollama on Windows
- Install Ollama on macOS
- Install Ollama on Linux
- Check that Ollama is running
- Download and chat with your first model
- Learn the six commands you’ll use most
- Use the local API from apps and scripts
- Change where models are stored (optional)
- Keep it private and up to date
- Common errors
- Troubleshooting checklist
- Alternatives and limitations
- FAQ
Step 1: Install Ollama on Windows
Option A: Installer (recommended for beginners)
- Go to ollama.com/download, choose Windows and download
OllamaSetup.exe. - Run it. According to Ollama’s docs, it installs in your user account and doesn’t need Administrator rights.
- Ollama starts in the background. It runs from the system tray, and the installer adds the
ollamacommand to your PATH.
Option B: PowerShell one-liner (from Ollama’s download page)
irm https://ollama.com/install.ps1 | iex
This command downloads and runs a script from the internet. That’s normal for this kind of installer, but only run it if you trust the source, and use the exact URL above.
Installing to another drive: Ollama’s docs say you can run OllamaSetup.exe /DIR="d:\some\location" from a terminal.
We have not run these installer steps on Windows. Follow Ollama’s current Windows installer if the screens differ.
Step 2: Install Ollama on macOS
- Download Ollama for macOS from ollama.com/download, then open the downloaded
ollama.dmg. - Drag Ollama into your Applications folder. Ollama’s docs call this the preferred method.
- Open Ollama from Applications. On first start, it checks whether the
ollamacommand-line tool is on your PATH. If it isn’t, it asks permission to create a link in/usr/local/bin. Allow it so the terminal commands in this guide work.
On Intel Macs, Ollama runs on the CPU only. Apple-silicon (M-series) Macs use both CPU and GPU.
Not tested by ConvertCortex on macOS yet.
Step 3: Install Ollama on Linux
Run Ollama’s official install script:
curl -fsSL https://ollama.com/install.sh | sh
This is the install command from Ollama’s Linux docs. If you’d rather not pipe a script into your shell, the same docs describe a manual install from the release archive, plus how to run Ollama as a systemd service named ollama. After installing, check the service with systemctl status ollama. We didn’t test the install script itself.
If the server isn’t running (for example after a manual install), start it in a separate terminal:
ollama serve
Tested (manual archive install, v0.40.16, Debian-based test machine): ollama serve started and logged Listening on 127.0.0.1:11434 (version 0.40.16).
Step 4: Check that Ollama is running
In a terminal, run:
ollama -v
On our Linux test machine, with the server running, this printed:
ollama version is 0.40.16
Before the server was started, the same command printed two warnings instead:
Warning: could not connect to a running Ollama instance
Warning: client version is 0.40.16
If you see those warnings, start the server (open the Ollama app on Windows or Mac, or run ollama serve / sudo systemctl start ollama on Linux) and try again.
You can also open http://localhost:11434/api/version in a browser. Our test returned {"version":"0.40.16"}.
Step 5: Download and chat with your first model
Ollama’s quickstart uses Google’s Gemma 4 model in its small e2b size:
ollama run gemma4:e2b
- The first time, Ollama downloads the model (about 7.2 GB, per Ollama’s quickstart), then starts a chat.
- Type a question and press Enter. The answer appears word by word.
- Type
/byeto exit.
To download a model without starting a chat, use ollama pull gemma4:e2b.
Not tested: our test machine’s network blocked model downloads, so we couldn’t pull gemma4:e2b. To test the commands, we loaded a tiny 135-million-parameter test model from a local file. With it, ollama run streamed a reply in the terminal as expected. Answer quality from such a tiny model is poor, so don’t judge local AI by it.
Picking other models: browse ollama.com/library. Each model page lists its sizes (tags such as e2b, e4b) and download sizes. Start small. A model that doesn’t fit your memory will be slow or fail to load.
Step 6: Learn the six commands you’ll use most
| Command | What it does |
|---|---|
ollama run <model> |
Download if needed, then chat. Add a prompt in quotes for a one-off answer: ollama run <model> "Summarise this…" |
ollama pull <model> |
Download or update a model without chatting |
ollama ls |
List downloaded models and their sizes |
ollama ps |
Show loaded models, their memory use and whether they’re on CPU or GPU |
ollama stop <model> |
Unload a model from memory now |
ollama rm <model> |
Delete a model from disk |
What these looked like in our test (Linux, CPU only, a tiny test model):
$ ollama ls
NAME ID SIZE MODIFIED
smollm2-test:latest 5f8d559adb61 105 MB 15 minutes ago
$ ollama ps
NAME ID SIZE PROCESSOR CONTEXT RUNNER UNTIL
smollm2-test:latest 5f8d559adb61 251 MB 79%/21% CPU/GPU 4096 llamacpp 4 minutes from now
Two things to notice:
- UNTIL shows that models stay loaded in memory for a while after use. Ollama’s FAQ says the default is 5 minutes, and you can change it with the
keep_aliveAPI parameter or theOLLAMA_KEEP_ALIVEenvironment variable.ollama stopfrees the memory straight away. In our test,ollama pswas empty afterwards. - PROCESSOR reported "79%/21% CPU/GPU", even though our test machine has no GPU. The server log showed only the CPU backend. If you’re checking whether your GPU is used, also look at the server log. Our GPU troubleshooting guide covers this.
Step 7: Use the local API from apps and scripts
While Ollama is running, it serves an API on http://localhost:11434. Ollama’s quickstart shows the native chat endpoint:
curl http://localhost:11434/api/chat -d '{
"model": "gemma4:e2b",
"messages": [{"role": "user", "content": "Write a one-line product description for a bamboo toothbrush."}],
"stream": false
}'
The reply text is in message.content. In our test (with the test model), the response also contained timing fields: total_duration, load_duration, prompt_eval_count, prompt_eval_duration, eval_count and eval_duration.
Many tools expect an OpenAI-style API. Ollama provides one at http://localhost:11434/v1/chat/completions, using the same request format (model plus messages). In our test it returned a chat.completion object with the answer in choices[0].message.content. In tools that ask for an "OpenAI base URL", use http://localhost:11434/v1. Some tools require an API key field to be filled in, and Ollama’s local server doesn’t need a real one. We haven’t tested specific third-party tools.
On Windows PowerShell, curl may behave differently from the Linux and Mac versions. If the command fails, use curl.exe or Invoke-RestMethod. Not tested on Windows.
Step 8: Change where models are stored (optional)
Ollama’s default model folders:
| OS | Default model location |
|---|---|
| Windows | C:\Users\%username%\.ollama\models |
| macOS | ~/.ollama/models |
| Linux (service install) | /usr/share/ollama/.ollama/models |
To use another drive, set the OLLAMA_MODELS environment variable:
- Windows: quit Ollama from the taskbar. Open Settings (Windows 11) or Control Panel (Windows 10), search for environment variables, and click Edit environment variables for your account. Create or edit the variable
OLLAMA_MODELSwith the new folder, click OK, then start Ollama again from the Start menu. - macOS: run
launchctl setenv OLLAMA_MODELS "/path/to/models", then restart the Ollama app. - Linux (systemd): run
sudo systemctl edit ollama, add the lines below, then runsudo systemctl daemon-reload && sudo systemctl restart ollama. Theollamauser needs permission to read and write the folder.
[Service]
Environment="OLLAMA_MODELS=/path/to/models"
Environment-variable steps follow Ollama’s FAQ and platform docs. Not hands-on tested.
Step 9: Keep it private and up to date
- Privacy: Ollama’s FAQ says that when you run models locally, Ollama doesn’t see your prompts or data. Ollama also offers optional cloud models. To make sure only local models are used, the FAQ describes setting
OLLAMA_NO_CLOUD=1, or adding"disable_ollama_cloud": trueto~/.ollama/server.json. - Network exposure: by default the server listens on
127.0.0.1:11434, so only your own computer can reach it. Don’t changeOLLAMA_HOSTto expose it on a network unless you understand the security implications. - Updates: on Windows and Mac, Ollama downloads updates automatically. Click the taskbar or menu-bar icon, then Restart to update. On Linux, re-run the install script.
- Start at login: to stop Ollama starting automatically, on Windows open Task Manager → Startup apps, find
ollamaand click Disable. On Mac, open Settings, search for "Login Items", find Ollama under Allow in the Background and switch it off. - Uninstall: on Windows, use Settings → Add or remove programs. If you changed
OLLAMA_MODELS, the uninstaller won’t delete your models. On Mac, delete the app and the/usr/local/bin/ollamalink. On Linux, follow the "Uninstall" section of Ollama’s Linux docs.
Common errors
| Message or symptom | Meaning | Fix |
|---|---|---|
Warning: could not connect to a running Ollama instance (seen in our test) |
The server isn’t running | Open the Ollama app, or run ollama serve / sudo systemctl start ollama |
ollama: command not found / "not recognized" |
The CLI isn’t on your PATH | Windows: open a new terminal after installing. Mac: open the app once and allow the /usr/local/bin link. Linux: check where you installed it. |
Download stuck or failing at pulling manifest |
A network, proxy or firewall is blocking the download | Check your internet connection or proxy settings. Corporate networks may block the storage servers that host model files. |
| Very slow answers | The model is running on CPU, or is too big for your memory | Try a smaller model. Check ollama ps and the server log (see our GPU guide). |
| Model fails to load / out of memory | Not enough RAM or VRAM | Use a smaller model or smaller tag. Close other apps. |
Error: listen tcp 127.0.0.1:11434: bind: address already in use (seen in our test) |
Ollama (or another program) is already using the port | You don’t need a second ollama serve. Use the one that’s already running. |
Troubleshooting checklist
- Run
ollama -v. Do you get a version line without warnings? - Open
http://localhost:11434/api/versionin a browser. Does it return a version? - Run
ollama ls. Is the model downloaded? - Run
ollama pswhile chatting. Is the model loaded, and on which processor? - Read the logs:
- Windows:
%LOCALAPPDATA%\Ollama\server.log - Mac:
~/.ollama/logs/server.log - Linux:
journalctl -e -u ollama
- Windows:
- Restart Ollama (quit the app from the tray or menu bar and reopen it, or run
sudo systemctl restart ollama). - Update to the latest version and try again.
Alternatives and limitations
- LM Studio: a desktop app with a graphical model browser, for people who prefer clicking to commands.
- Open WebUI: a ChatGPT-style browser interface on top of Ollama.
- llama.cpp: the underlying engine family, for advanced users who want full control.
- Cloud AI (ChatGPT, Gemini, Claude): more capable and needs no hardware, but your data goes to the provider.
- Limitations: small local models are less capable than leading cloud models, and big models need a lot of memory. Without a supported GPU, responses can be slow. Check each model’s licence before using it commercially.
FAQ
Is Ollama free?
Ollama is free to download and run locally. Ollama also offers optional cloud features. Check ollama.com for current terms and any pricing.
Does Ollama work without the internet?
You need the internet to download Ollama and models. After that, local models run on your computer. We didn’t run an offline test.
Do I need a graphics card?
No. Ollama runs on CPU (our test machine had no GPU), but a supported GPU or Apple silicon makes responses much faster.
How much RAM do I need?
It depends on the model. Ollama’s quickstart recommends 8 GB of available VRAM or unified memory for gemma4:e2b, and says it can fall back to system RAM more slowly. Start with small models and check ollama ps.
Can other computers on my network use my Ollama?
Not by default, because it listens on 127.0.0.1 only. You can change OLLAMA_HOST, but secure it first.
Official references
- Ollama: Download, Quickstart, Windows, macOS, Linux, CLI reference, FAQ, Troubleshooting, Model library
- GitHub: Ollama releases (v0.40.16 checked on 12 November 2026)
Next step
Once a model runs, check that it’s using your GPU. Then choose the right model size for your computer’s memory, or add a friendly chat interface.
Last updated: 13 November 2026



