Back to roadmaps ollama Course

Installing Ollama on Windows, macOS, and Linux

Ollama is a lightweight utility designed to package and run open-source models locally. Let us install it on your operating system.


1. Operating System Installations

Windows

  1. Download the installer file from ollama.com/download/OllamaSetup.exe.
  2. Run the executable and follow the setup wizard.
  3. Once completed, Ollama runs in your system tray.

macOS

  1. Download the macOS zip file from the official downloads page.
  2. Unzip it and drag the Ollama.app file into your /Applications directory.
  3. Open Ollama, and click install to place command-line shortcuts.

Linux

Deploy Ollama on Linux using a single setup script:

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

2. Binding Ollama to Remote Hosts

By default, Ollama only listens to requests coming from localhost (127.0.0.1:11434). If you want other computers in your local network to connect to your models, change the binding variables:

Windows System Variable

  • Open System Properties -> Environment Variables.
  • Add a new User Variable named OLLAMA_HOST with value 0.0.0.0.
  • Restart the Ollama system tray application.

macOS Command Binding

Run the application in your terminal passing host parameters:

OLLAMA_HOST=0.0.0.0 ollama serve

Linux systemd Configuration

  1. Edit the systemd service file: sudo systemctl edit ollama.service.
  2. Add these configuration lines:
[Service]
Environment="OLLAMA_HOST=0.0.0.0"
  1. Reload systemd and restart Ollama:
sudo systemctl daemon-reload
sudo systemctl restart ollama
Published on Last updated: