Skip to content

How to Install Ollama on Windows, Mac and Linux (2026) + Fix Ollama Not Using GPU

11โ€“16 minutes

This is a complete, up-to-date guide to installing Ollama on Windows, macOS and Linux in 2026. It covers the system requirements, the exact install commands for each platform, where your models are stored and how to move them to another drive, the three settings worth changing straight after installing, and, because it is the most common problem new users hit, a step-by-step fix for Ollama not using your GPU. My own PC runs Windows with two RTX 5080 cards, so the Windows and NVIDIA parts are the most detailed, but every platform is covered.

TL;DR

  • Windows: run irm https://ollama.com/install.ps1 | iex in PowerShell, or download OllamaSetup.exe. No admin rights needed. Windows 10 22H2+ and NVIDIA driver 551.61+.
  • macOS: download the app and drag it to Applications (macOS 14 Sonoma+; Apple silicon gets GPU, Intel Macs are CPU only).
  • Linux: curl -fsSL https://ollama.com/install.sh | sh. It installs a systemd service.
  • First model: ollama run gemma4:e4b on 8 GB GPUs, ollama run qwen3.8:27b on 24 GB.
  • Check the GPU: run ollama ps. The PROCESSOR column should say 100% GPU. If it says CPU, follow the GPU fix section.

System Requirements

Platform Minimum OS GPU support Driver needed
Windows Windows 10 22H2 or Windows 11 (Home or Pro) NVIDIA, AMD Radeon (ROCm 7 or Vulkan) NVIDIA 551.61 or newer; AMD driver with ROCm 7/HIP 7 or Vulkan
macOS macOS 14 Sonoma Apple silicon (M1 and newer) via Metal and MLX; Intel Macs CPU only None
Linux Any modern x86-64 or ARM64 distro with systemd NVIDIA (CUDA), AMD (ROCm 7), Vulkan NVIDIA driver 550+ (570+ for older 5.x-6.x cards); ROCm v7 for AMD

For NVIDIA, Ollama needs a GPU with compute capability 5.0 or higher, which covers everything from the GTX 900 series up to the RTX 50 series and data-center cards. For RAM and disk, plan for at least the size of the model you want to run: a 4B model is about 3-4 GB, a 27B model at Q4 about 18 GB. If you are unsure which file size fits, my GGUF quantization guide explains it.

Install Ollama on Windows

Option 1: PowerShell one-liner

irm https://ollama.com/install.ps1 | iex

Option 2: the installer

  1. Download OllamaSetup.exe from ollama.com/download.
  2. Run it. It does not need administrator rights and installs into your user profile.
  3. Ollama starts in the system tray and opens its desktop app. The background server is now running on http://localhost:11434.

Open a new PowerShell or Command Prompt window and check it:

ollama -v
ollama run gemma4:e4b

Install to another drive

To install the program somewhere other than your C: drive, run the installer from a terminal with the /DIR flag:

OllamaSetup.exe /DIR="D:\Ollama"

Store models on another drive

Models go to C:\Users\<you>\.ollama\models by default, which fills a small SSD fast. To move them:

  1. Quit Ollama from the tray icon.
  2. Open Settings > System > About > Advanced system settings > Environment Variables, or run this in a terminal:
setx OLLAMA_MODELS "D:\ollama-models"
  1. Move the existing models folder there if you want to keep what you downloaded.
  2. Start Ollama again from the Start menu and open a new terminal.

The newer Ollama desktop app also has a model location setting in its Settings screen, which does the same thing.

Run Ollama as a service without the tray app

For a headless PC or server, Ollama publishes a standalone ollama-windows-amd64.zip with the CLI and NVIDIA libraries (add ollama-windows-amd64-rocm.zip for AMD). Extract it and run ollama serve, or register it as a Windows service with a tool such as NSSM.

Install Ollama on macOS

  1. Download Ollama.dmg from ollama.com/download.
  2. Open it and drag Ollama into Applications.
  3. Launch it. On first run it asks to create the ollama command in /usr/local/bin; allow it.

Or with Homebrew:

brew install ollama
ollama serve   # if you installed the CLI only

Models are stored in ~/.ollama. On Apple silicon, Ollama 0.40 and newer use Apple’s MLX engine by default, which is usually faster than the older Metal path. Intel Macs are supported but run on the CPU only.

Install Ollama on Linux

One-line install

curl -fsSL https://ollama.com/install.sh | sh

The script installs the binary to /usr, creates an ollama user and a systemd service, and starts it. Check it:

ollama -v
systemctl status ollama
ollama run gemma4:e4b

Manual install

# main package (x86-64)
curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst | sudo tar x -C /usr

# AMD GPUs: also extract the ROCm package
curl -fsSL https://ollama.com/download/ollama-linux-amd64-rocm.tar.zst | sudo tar x -C /usr

# ARM64 instead
curl -fsSL https://ollama.com/download/ollama-linux-arm64.tar.zst | sudo tar x -C /usr

ollama serve

If you are upgrading a manual install, delete the old libraries first with sudo rm -rf /usr/lib/ollama.

Set environment variables on Linux

With the systemd service, environment variables go in an override file, not your shell profile:

sudo systemctl edit ollama

# add these lines, then save
[Service]
Environment="OLLAMA_CONTEXT_LENGTH=32768"
Environment="OLLAMA_MODELS=/data/ollama-models"

sudo systemctl daemon-reload
sudo systemctl restart ollama

If you move OLLAMA_MODELS, make sure the ollama user can write to that folder (sudo chown -R ollama:ollama /data/ollama-models). Logs are in journalctl -e -u ollama.

GPU drivers on Linux

  • NVIDIA: install the proprietary driver (550 or newer) and check that nvidia-smi lists your GPU. Ollama ships its own CUDA libraries, so you do not need a separate CUDA toolkit just for Ollama.
  • AMD: install ROCm v7 from AMD and add your user to the video and render groups.

Install Ollama With Docker

# NVIDIA (needs the NVIDIA Container Toolkit)
docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

# AMD
docker run -d --device /dev/kfd --device /dev/dri -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama:rocm

# run a model inside the container
docker exec -it ollama ollama run gemma4:e4b

If the container starts but uses the CPU, test the GPU passthrough with docker run --gpus all ubuntu nvidia-smi first.

Run Your First Model (Which One for Your VRAM)

Your GPU VRAM Good first model Command
No GPU / 4 GB Llama 3.2 3B ollama run llama3.2:3b
6-8 GB Gemma 4 E4B ollama run gemma4:e4b
12-16 GB gpt-oss 20B ollama run gpt-oss:20b
24 GB+ Qwen3.8 27B (vision, Apache 2.0) ollama run qwen3.8:27b

You can also run almost any GGUF on Hugging Face directly, for example ollama run hf.co/unsloth/Qwen3.8-27B-GGUF:Q4_K_M. Type /bye to leave the chat, and see my Ollama commands cheat sheet for everything else (pull, list, rm, ps, Modelfiles and the API).

3 Settings to Change Right After Installing

1. Context length

Ollama picks the context size from your VRAM: only 4K tokens on GPUs under 24 GB, 32K on 24-48 GB and 256K on 48 GB or more. That is too small for coding tools and long documents. Raise it in the app’s Settings slider, or:

# Windows
setx OLLAMA_CONTEXT_LENGTH 32768

# macOS / Linux (manual serve)
OLLAMA_CONTEXT_LENGTH=32768 ollama serve

More context uses more VRAM, so on an 8 GB card try 8K-16K first.

2. Model folder

Move models off your system drive with OLLAMA_MODELS, as shown in the Windows and Linux sections above.

3. Network access (only if you need it)

Ollama only listens on 127.0.0.1. To use it from another PC or from Docker containers such as Open WebUI, set OLLAMA_HOST=0.0.0.0:11434 and allow port 11434 in your firewall. Do not expose it to the internet without a reverse proxy and authentication.

After changing any environment variable, quit Ollama from the tray (or restart the service) so it picks up the new value.

How to Check Ollama Is Using Your GPU

Load a model, then run ollama ps in a second terminal:

ollama run gemma4:e4b "hello"
ollama ps

Look at the PROCESSOR column:

  • 100% GPU: everything is on the GPU. This is what you want.
  • 48%/52% CPU/GPU: the model or its context did not fit, so part of it runs on the CPU. It works, just slower.
  • 100% CPU: the GPU is not being used at all.

On NVIDIA you can also watch nvidia-smi (or Task Manager > Performance > GPU on Windows) while the model answers. The server log confirms what Ollama detected at startup: look for lines containing inference compute with library=cuda, rocm or vulkan.

OS Server log location
Windows %LOCALAPPDATA%\Ollama\server.log
macOS ~/.ollama/logs/server.log
Linux journalctl -u ollama
Docker docker logs ollama

Ollama Not Using GPU: 9 Fixes

Work through these in order. Most people are fixed by the first three.

1. The model is too big for your VRAM

This is the number one cause of “Ollama is using my CPU”. If the model plus its context does not fit, Ollama puts some layers on the CPU, and if very little fits it may run almost entirely on the CPU. ollama ps shows the split. Fix it by using a smaller model or quant (for example :q4_K_M instead of :q8_0), lowering the context length, or closing other GPU apps such as ComfyUI or games that hold VRAM.

2. Your NVIDIA driver is too old

On Windows you need driver 551.61 or newer; on Linux 550 or newer (570+ for older Maxwell and Pascal cards). Update from NVIDIA’s site or the NVIDIA App, reboot, and restart Ollama.

3. Ollama started before the GPU was ready

After a driver update, or on Linux after suspend and resume, Ollama can lose the GPU. Restart it: quit from the tray on Windows/macOS, or sudo systemctl restart ollama on Linux. If the Linux log shows CUDA errors after a suspend, reload the NVIDIA UVM module and restart:

sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm
sudo systemctl restart ollama

4. A leftover environment variable is hiding the GPU

Check for CUDA_VISIBLE_DEVICES (an invalid value like -1 forces CPU), OLLAMA_LLM_LIBRARY set to a cpu library, or OLLAMA_VULKAN=0. On Windows run set in Command Prompt to list them; remove any you did not mean to set and restart Ollama.

5. Laptop with two GPUs is using the integrated one

On laptops with Intel or AMD integrated graphics plus an NVIDIA GPU, open Settings > System > Display > Graphics, add ollama.exe and ollama app.exe, and set them to High performance. Also make sure the laptop is plugged in, since some power modes disable the dedicated GPU.

6. You have more than one GPU and want to choose

Ollama splits big models across all GPUs automatically. To pin it to specific cards, use UUIDs (the order of numeric IDs can change):

nvidia-smi -L
setx CUDA_VISIBLE_DEVICES "GPU-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

7. AMD Radeon card not detected

  • Install a driver with ROCm 7 / HIP 7 support (Windows) or ROCm v7 (Linux). Older drivers make discovery time out.
  • Cards ROCm does not officially support can often run through Vulkan, which Ollama enables by default on Windows and Linux.
  • On Linux you can try forcing a close supported target, for example HSA_OVERRIDE_GFX_VERSION=10.3.0 for RDNA2 cards, and add your user to the video and render groups.

8. Docker runs on CPU

Start the container with --gpus=all and install the NVIDIA Container Toolkit. If it still falls back to CPU, Ollama’s docs suggest adding "exec-opts": ["native.cgroupdriver=cgroupfs"] to /etc/docker/daemon.json and restarting Docker.

9. Still stuck: turn on debug logging

# Windows PowerShell (quit Ollama from the tray first)
$env:OLLAMA_DEBUG="1"
& "ollama app.exe"

# Linux
sudo systemctl edit ollama   # add Environment="OLLAMA_DEBUG=1"
sudo systemctl restart ollama
journalctl -u ollama -f

The debug log lists every GPU Ollama tried, and why it rejected it (unsupported compute capability, driver too old, not enough free memory). That line usually tells you exactly which of the fixes above you need.

Updating and Uninstalling Ollama

  • Update on Windows and macOS: the app updates itself; click “Restart to update” when it appears.
  • Update on Linux: run the install script again. To install a specific version: curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.40.13 sh.
  • Uninstall on Windows: Settings > Apps > Installed apps > Ollama > Uninstall. Delete C:\Users\<you>\.ollama afterwards to remove models (or your custom OLLAMA_MODELS folder, which the uninstaller leaves in place).
  • Uninstall on macOS: delete /Applications/Ollama.app, /usr/local/bin/ollama and ~/.ollama, plus the Ollama folders in ~/Library.
  • Uninstall on Linux: stop and disable the service, then remove the binary, /usr/lib/ollama, the service file and /usr/share/ollama.

To delete a single model without uninstalling, use ollama rm model-name.

Frequently Asked Questions

Is Ollama free?

Yes. Ollama is free and open source under the MIT license. Running local models costs nothing beyond your electricity. It also offers optional paid cloud models, which you do not need.

Does Ollama need an internet connection?

Only to download Ollama and models. After that, local models run fully offline.

Where does Ollama store models on Windows?

In C:\Users\<you>\.ollama\models, unless you set OLLAMA_MODELS to another folder.

Can I install Ollama without admin rights?

Yes, on Windows the installer runs without administrator rights and installs into your user folder. On Linux the install script needs sudo for the system service.

Why is Ollama using my CPU instead of my GPU?

Usually because the model plus its context does not fit in VRAM, or because the GPU driver is too old. Run ollama ps to see the split, then try a smaller model or update the driver.

Does Ollama work with AMD GPUs?

Yes, through ROCm 7 on supported Radeon cards on Windows and Linux, and through Vulkan on many other Radeon cards.

Should I use Ollama or LM Studio?

Ollama is best as a background server for apps and coding agents; LM Studio is a friendlier desktop app. I compare them, plus llama.cpp, in my Ollama vs LM Studio vs llama.cpp guide.

Final Thoughts

Installing Ollama takes a minute on any platform. The parts that trip people up come after: models filling the C: drive, a 4K context that is too short for real work, and a model that quietly runs on the CPU. Set OLLAMA_MODELS and OLLAMA_CONTEXT_LENGTH once, check ollama ps the first time you load a model, and you will have a fast local AI setup that every major app can talk to.

Where to go next: learn the everyday commands in my Ollama cheat sheet, pick the right model file with the GGUF quantization guide, and find models that fit your GPU in my best local LLMs for consumer GPUs.

Sources