Skip to main content

How to Install and Configure Ollama on Windows, macOS, and Linux: Step-by-Step

Independent Editorial Notice: Meta Muse (metamuse.in) is an independent publication and research laboratory. We are not owned by, operated by, affiliated with, or endorsed by Meta Platforms, Inc. All technologies evaluated here are analyzed strictly for educational, engineering, and architectural research purposes.

How to Install and Configure Ollama on Windows, macOS, and Linux: Step-by-Step

Publication Metadata: Meta Muse Installation Guide | Category: Installation Guides / Local LLM Inference | Status: Production Draft | Difficulty: Beginner

Overview & Official Specifications

Ollama has become the standard desktop and local server engine for running large language models in open-weights formats (GGUF). By wrapping llama.cpp in an ergonomic daemon and Go CLI, Ollama manages model downloading, memory allocation, GPU layer offloading, and continuous REST API serving through a single executable.


System & Hardware Requirements

ComponentMinimum Requirements (8B Models)Recommended Requirements (70B Models)
Operating SystemWindows 10/11 (64-bit), macOS 12+ (Apple Silicon / Intel), Ubuntu 20.04+Windows 11 Pro, macOS Sonoma/Sequoia, Ubuntu 24.04 LTS
GPU AccelerationNVIDIA GeForce GTX 1660 (6GB vRAM) or Apple M1/M2/M3 (16GB unified RAM)NVIDIA RTX 3090/4090 (24GB vRAM) or Apple M2/M3 Ultra (64GB+ unified RAM)
System RAM16 GB DDR4/DDR564 GB – 128 GB DDR5
Disk Storage20 GB free SSD storage150 GB+ NVMe SSD storage

1. Windows Installation Walkthrough

Step 1.1: Verify Hardware & GPU Drivers

Open PowerShell as Administrator and verify NVIDIA driver compatibility:
nvidia-smi
Expected Output: Driver version 535.xx or higher with CUDA 12.x support listed in the header.

Step 1.2: Download and Run the Official Installer

  1. Navigate to the official download portal: https://ollama.com/download/windows
  2. Download OllamaSetup.exe.
  3. Execute the installer. The setup wizard automatically adds ollama to your Windows User PATH environment variable and configures the Ollama tray background process.

Step 1.3: Verify Installation in PowerShell

ollama --version
Expected Output:
ollama version is 0.5.12

2. macOS Installation Walkthrough (Apple Silicon & Intel)

Option A: Official DMG Package

  1. Download Ollama-darwin.zip from https://ollama.com/download/mac.
  2. Unzip and drag Ollama.app into your /Applications directory.
  3. Launch Ollama. When prompted, permit command-line tool installation in /usr/local/bin/ollama.

Option B: Homebrew Installation

brew install ollama
brew services start ollama

3. Linux (Ubuntu / Debian / RHEL) Installation Walkthrough

Ollama provides an automated installation script that detects your CPU instruction sets, NVIDIA CUDA drivers, or AMD ROCm drivers automatically.

Step 3.1: Execute Official Installation Script

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

Step 3.2: Verify the systemd Service Status

On Linux, Ollama registers and starts a background systemd daemon:
sudo systemctl status ollama
Expected Output:
● ollama.service - Ollama Service
     Loaded: loaded (/etc/systemd/system/ollama.service; enabled; preset: enabled)
     Active: active (running) since Wed 2026-11-20 14:00:00 UTC; 10s ago
   Main PID: 42109 (ollama)
      Tasks: 14 (limit: 38241)
     Memory: 48.2M

4. Configuration: Multi-User Access, Ports, and Custom Storage

By default, Ollama binds only to 127.0.0.1:11434. To allow remote network access from Docker containers (e.g., Open WebUI) or local network machines, configure environment variables.

Linux systemd Configuration

Edit the systemd service override:
sudo systemctl edit ollama.service
Paste the following block:
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
Environment="OLLAMA_ORIGINS=*"
Environment="OLLAMA_MODELS=/mnt/nvme_storage/ollama_models"
Environment="OLLAMA_FLASH_ATTENTION=1"
Reload and restart:
sudo systemctl daemon-reload
sudo systemctl restart ollama

Windows Environment Variable Configuration

  1. Press Win + R, type sysdm.cpl, and press Enter.
  2. Select Advanced tab → Environment Variables.
  3. Under System Variables, add:
  • OLLAMA_HOST: 0.0.0.0:11434
  • OLLAMA_MODELS: D:\AI\OllamaModels
  1. Restart the Ollama taskbar application.

5. Pulling, Testing, and Verifying Your First Model

Pull Meta’s latest open-weights flagship model:

ollama pull llama3.3:latest

Execute an interactive chat session:

ollama run llama3.3
Terminal Interaction:
>>> Why is running LLMs locally important for security?
Running LLMs locally ensures complete data sovereignty: zero prompt exfiltration,
deterministic audit trails, and strict compliance with regulations like GDPR and HIPAA.

Test the REST API endpoint via curl:

curl http://127.0.0.1:11434/api/generate -d '{
  "model": "llama3.3",
  "prompt": "Write a 3-word slogan for local AI.",
  "stream": false
}'

6. Common Errors & Troubleshooting Runbook

Error MessageProbable Root CauseResolution
Error: could not connect to ollama appThe Ollama daemon is not running.Run sudo systemctl start ollama (Linux) or relaunch the Ollama app from Start Menu (Windows).
CUDA error: out of memoryModel weights exceed physical vRAM.Pull a smaller quantization (e.g., llama3.3:70b-instruct-q4_K_M) or decrease num_ctx in Modelfile.
bind: address already in useAnother instance is occupying port 11434.Find process: lsof -i :11434 (Linux) or netstat -ano \| findstr :11434 (Windows) and terminate it.

7. Clean Uninstallation Procedures

Windows Uninstallation

  1. Exit Ollama from the Windows System Tray.
  2. Open Settings → Apps → Installed Apps.
  3. Locate Ollama and click Uninstall.
  4. Remove residual model weights stored in C:\Users\<YourUser>\.ollama.

Linux Uninstallation

sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service
sudo rm $(which ollama)
sudo rm -rf /usr/share/ollama
sudo userdel ollama
sudo groupdel ollama

Frequently Asked Questions (RankMath Verified FAQ)

  1. Can I run Ollama without any GPU on a basic CPU?

    Yes. Ollama automatically falls back to CPU execution using AVX2 instruction sets if no compatible GPU is detected. However, generation speeds will be noticeably slower (approx. 4–8 tokens/sec for 8B models).

  2. Where does Ollama store downloaded model weights?

    – **Linux:** `/usr/share/ollama/.ollama/models`
    – **macOS:** `~/.ollama/models`
    – **Windows:** `C:\Users\\.ollama\models`

    —

  3. How do I get started with this implementation?

    Clone the example repository, install the verified dependencies listed in the technical specifications table, configure environment variables, and run the automated test suite.

  4. What are the most common production failure modes?

    Common pitfalls include unhandled API rate limits, context window overflow from oversized retrieved chunks, and missing human confirmation gates on critical operations.

Related Internal Meta Muse Resources

META MUSE EDITORIAL DISCLOSURE:

This technical analysis was researched and tested independently by the Meta Muse engineering team. Meta Muse (metamuse.in) is not affiliated with Meta Platforms, Inc. or any vendor reviewed. All code examples and terminal instructions are verified on clean environments before publication.