Ollama provides a runtime and model-management tools for running supported models. This guide starts with a local text model and the command line. Once that works, you can add a browser interface using Open WebUI.

Before downloading a model, use our hardware and model-selection guide to check memory and compatibility. If you prefer an integrated desktop chat application, follow the LM Studio guide.

Allow extra time and disk space for model downloads. The example uses qwen3:4b, a small text model available in the official library. It is a learning example, not a claim that it is the best model for every task. Check its model entry and terms before use.

Before you install

Check your operating system, processor architecture, available RAM or unified memory, GPU memory, and free disk space. The model’s downloaded size is not its total running-memory requirement. Longer context and simultaneous requests can need more memory.

Choose one installation route. Native Windows and macOS installations do not require WSL or Docker. If you choose WSL on Windows, treat it as a separate Linux environment with its own installed models and server.

Windows installation

  1. Open the official Windows download and run the installer for your system.
  2. Launch Ollama from the Start menu. It provides a background server and a command-line tool.
  3. Open a new PowerShell window so it receives the updated PATH.
  4. Verify the CLI and server:
ollama --version
Invoke-RestMethod http://127.0.0.1:11434/api/tags

A new installation can return an empty model list. That is a successful connection. If the command is missing, reopen the terminal and check that the installation completed. Current Windows requirements and GPU-driver guidance are maintained in the Windows documentation.

macOS installation

Download the official macOS application, move it into Applications, and open it. Complete the application’s CLI setup if prompted. Open Terminal and run:

ollama --version
curl http://127.0.0.1:11434/api/tags

The reviewed documentation requires macOS 14 or newer and lists Apple silicon CPU/GPU support; Intel Macs use CPU execution. Check the current macOS requirements before installing on older hardware.

Linux installation

The official installer needs network access and can request elevated privileges to install the binary and service. Download it for inspection, then run it:

curl -fsSL https://ollama.com/install.sh -o ollama-install.sh
less ollama-install.sh
sh ollama-install.sh
ollama --version

On a systemd-based distribution, check and start the service:

sudo systemctl enable --now ollama
systemctl status ollama --no-pager
curl http://127.0.0.1:11434/api/tags

If your system does not use systemd, start ollama serve in a terminal and leave it running while using a second terminal for requests. Do not start a second server if one already owns port 11434. Architecture-specific packages and GPU installation details are in the Linux guide.

For WSL, first install a supported Linux distribution through Microsoft’s WSL instructions, then use the Linux steps inside that distribution. Use wsl --status from Windows to check the environment. GPU support depends on your Windows driver and WSL configuration; do not assume that a GPU visible to Windows is correctly available inside every environment. To avoid networking confusion during this guide, run the Ollama client and server in the same environment.

Download and use your first model

These commands work in PowerShell, macOS Terminal, and a Linux shell:

ollama pull qwen3:4b
ollama run qwen3:4b

Try: “Explain the difference between a task deadline and an estimate in three sentences.” Check the answer yourself. Enter /bye to leave the interactive chat.

The first pull downloads model files. Later runs reuse the local copy. Use a smaller supported model if your machine runs out of memory; increase context only after basic inference works.

Useful commands are:

ollama list
ollama show qwen3:4b
ollama ps
ollama stop qwen3:4b

list shows downloaded models; ps shows loaded models. stop unloads a running model without deleting its files. ollama rm qwen3:4b removes that downloaded model when you no longer need it. See the CLI reference.

Send a local API request

In PowerShell:

$requestBody = @{
  model = 'qwen3:4b'
  messages = @(@{ role = 'user'; content = 'Explain inference in one sentence.' })
  stream = $false
} | ConvertTo-Json -Depth 5
$reply = Invoke-RestMethod -Method Post -Uri 'http://127.0.0.1:11434/api/chat' -ContentType 'application/json' -Body $requestBody
$reply.message.content

In macOS or Linux:

curl http://127.0.0.1:11434/api/chat \
  -H 'Content-Type: application/json' \
  -d '{"model":"qwen3:4b","messages":[{"role":"user","content":"Explain inference in one sentence."}],"stream":false}'

The answer appears in message.content. These examples explicitly target the local server. Ollama also offers cloud features, so check the selected model and endpoint rather than assuming every Ollama request stays local. API quickstart

Configure storage and local-only use

Set OLLAMA_MODELS if you need a different model-storage directory. Create the destination first and ensure the account running the server can write there. Changing the variable does not itself move existing downloads.

For local-only Ollama operation, set OLLAMA_NO_CLOUD=1. Keep the default loopback listening address for this single-machine exercise. The server environment must receive the setting:

Platform Where to set it Apply the change
Windows app User environment variables in Windows settings Quit the tray app and relaunch it
macOS app Run launchctl setenv OLLAMA_NO_CLOUD 1 Quit and reopen the app; reapply after login if needed
Linux systemd service Run sudo systemctl edit ollama and add the override below Reload systemd and restart Ollama
[Service]
Environment="OLLAMA_NO_CLOUD=1"
sudo systemctl daemon-reload
sudo systemctl restart ollama

The same platform-specific method applies to OLLAMA_MODELS. Setting a variable in a terminal does not necessarily change an already-running app or service. External tools connected to Ollama have their own data flows and settings. Configuration and local-only mode

Troubleshooting

Symptom Check next
Connection refused Start the app or service; verify the address and environment
Port already in use Use the existing Ollama server rather than launching another
Model missing Compare the exact model tag with ollama list, then pull it
Very slow response Inspect ollama ps, GPU support, memory pressure, and context size
Out of memory Use a smaller model or context and close other memory-intensive applications
UI cannot see a model Check that the UI connects to this server rather than a different WSL or container instance

For logs, Windows uses %LOCALAPPDATA%\Ollama; macOS uses ~/.ollama/logs. On systemd Linux, run journalctl -u ollama -n 100 --no-pager. Consult the GPU support documentation before changing drivers.

Update and verify

Use the application’s update process on Windows or macOS. On Linux, review and rerun the current official installer. Record ollama --version, check ollama list, and repeat the short API request after updating.

Keep a record of the model tags used for important work. Updating the runtime and pulling an updated model are separate changes. If you remove Ollama, review the platform’s uninstall instructions and decide separately whether to retain downloaded model data.

You are ready for the next guide when a local request returns an answer, you can identify the exact model in use, and you know how to stop or restart your server.