07. Native Ollama on Windows
Ollama publishes a native Windows installer at ollama.com/download. The Windows binary does not require WSL2—it runs as a native Windows service. This has practical advantages: files live in familiar Windows paths, no cross-filesystem navigation, and the service integrates with Windows Task Manager and Services.msc directly.
Install Ollama on Windows:
- Download the installer from
ollama.com/download - Run
OllamaSetup.exe - The service starts automatically and listens on
http://localhost:11434
Verify from PowerShell:
Invoke-WebRequest -Method POST -Body '{"model":"llama3.2:1b","prompt":"2+2=","stream":false}' http://localhost:11434/api/generate
Models are stored in %LOCALAPPDATA%\Ollama\models by default. Check disk usage:
dir "$env:LOCALAPPDATA\Ollama\models" -Recurse | Measure-Object -Property Length -Sum
The Windows installer creates a Windows service named "Ollama". Manage it with:
# Restart the service
Restart-Service Ollama
# Check status
Get-Service Ollama
# View logs
Get-Content "C:\Users\YOUR_USERNAME\AppData\Ollama\logs\ollama.exe.log" -Tail 50 -Wait
If you also run Ollama inside Docker (Chapter 6), both will try to use port 11434. The Windows Ollama will win by default. To use both simultaneously, change the Docker container's port mapping:
docker run -d --name ollama-docker -p 11435:11434 ollama/ollama:latest
Then access the Docker Ollama at http://localhost:11435.
Local verification checkpoint
Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.
Local verification checkpoint
Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.
Install the Windows Ollama installer, start it, run a generation request, check the model storage path with dir $env:LOCALAPPDATA\Ollama\models, then stop the Ollama service and confirm the port is released with netstat -ano | findstr 11434.