Module 1 — Installing on Windows, macOS and Linux
The law firm's IT lead has one non-negotiable rule: no client data leaves the office. That single rule is why Ollama sits at the center of this course. Before we can pull a model or write a prompt, the runtime has to be installed cleanly on three very different machines — the partner's MacBook, the associates' Windows laptops, and the small Ubuntu server in the closet. This module gets the plumbing right so every later module can assume it.
What Ollama actually is
Ollama is two things bundled together: a local model runtime built on top of llama.cpp, and a background HTTP service that exposes that runtime on http://127.0.0.1:11434. You interact with the runtime through the ollama command-line tool, which is only a thin client that talks to the service. That separation matters — the CLI can be closed while the service keeps loading a model into memory, and any script on the machine (or on the LAN, if you allow it) can call the same endpoint.
Installing on macOS
On the partner's MacBook, the installer is a signed .dmg from ollama.com/download. Drag the app to /Applications and launch it once. The app registers a login item, installs the ollama CLI into /usr/local/bin, and starts the background service. A menu-bar icon confirms the service is up.
Two facts worth knowing on macOS. First, models are stored in ~/.ollama/models by default — that folder can reach tens of gigabytes, so if the machine is short on space, point it elsewhere with OLLAMA_MODELS before the first pull (see below). Second, Metal (Apple Silicon GPU acceleration) is enabled automatically on M-series chips; no toggle to flip.
Installing on Windows
The Windows installer, also from ollama.com/download, is a single .exe. It installs to %LOCALAPPDATA%\Programs\Ollama, adds ollama to the user PATH, and registers a service that starts with the session. The tray icon shows the service state.
The default model store is %USERPROFILE%\.ollama\models. This is on the C: drive, which is often the smallest partition. Redirect the store before the first pull by setting a user environment variable OLLAMA_MODELS=D:\ollama-models in the Windows environment editor, then sign out and back in. WSL2 users should install the Linux build inside WSL rather than reusing the Windows binary; the two do not share the model store.
Installing on Linux
On the office Ubuntu 24.04 server, the one-line installer is the canonical path:
curl -fsSL https://ollama.com/install.sh | sh
The script drops the binary at /usr/local/bin/ollama, creates the ollama system user, writes /etc/systemd/system/ollama.service, and starts it. From then on, systemctl status ollama is the source of truth. Models live under /usr/share/ollama/.ollama/models — owned by the ollama user, not by you. To move them to /data/ollama, edit the service unit and add Environment="OLLAMA_MODELS=/data/ollama" under [Service], then sudo systemctl daemon-reload && sudo systemctl restart ollama.
The environment variables that matter
Four variables cover almost every real deployment. Set them before starting the service.
| Variable | Purpose | Typical value |
|---|---|---|
OLLAMA_MODELS | Where blobs are cached | D:\ollama-models or /data/ollama |
OLLAMA_HOST | Interface and port the service binds to | 127.0.0.1:11434 (default) or 0.0.0.0:11434 |
OLLAMA_KEEP_ALIVE | How long a loaded model stays in RAM after last use | 5m, 1h, -1 for forever |
OLLAMA_NUM_PARALLEL | Concurrent requests served per loaded model | 1 on a laptop, 4 on the server |
OLLAMA_HOST=0.0.0.0:11434 opens the port to the LAN — do it deliberately, with a firewall rule and a reverse proxy (module 8), never as a shrug.
Verifying the install
Three commands close the loop on any machine:
ollama --version # client version
curl http://127.0.0.1:11434 # service reachable
ollama list # empty on first run, that is normal
If the second command returns Ollama is running, the service is up. If the third returns nothing, the store is empty — as it should be before module 2.
Ten gigabytes for a mid-size model is normal; a serious workstation ends up with 60 to 120 GB of blobs. Point OLLAMA_MODELS at your largest, fastest drive on day one. Moving it later means either a manual copy of the models/ tree or re-pulling every tag — both painful, both avoidable in ten seconds today.
Summary
- Ollama installs a CLI plus a background HTTP service on
127.0.0.1:11434; the CLI is a thin client. - Every OS installer is one download away and starts the service automatically; on Linux,
systemctlruns the show. OLLAMA_MODELS,OLLAMA_HOST,OLLAMA_KEEP_ALIVE,OLLAMA_NUM_PARALLELcover almost every real deployment decision.- Verify with
ollama --version, acurlto the port, andollama listbefore moving on to pull a model.
Next module: choosing, pulling and cleaning up models — the first place the disk fills.