Ollama installs with a single command on macOS, Linux, and Windows, and a first local model can be running within minutes. On macOS and Linux the installer is curl -fsSL https://ollama.com/install.sh | sh; in Windows PowerShell it is irm https://ollama.com/install.ps1 | iex. From there you either open the Ollama desktop app and follow the setup prompts, or work from the terminal and choose a local model, as described in the Ollama quickstart.
This guide is for a technically curious beginner who wants a working local model and a reliable way to confirm it is actually running. It covers prerequisites, installation on each platform, the first run, verification, the local-versus-cloud decision, and the failures that most often interrupt a first attempt.
Before you install: hardware, OS, and the local-versus-cloud decision
Ollama ships builds for macOS, Windows, and Linux, so the operating system is rarely the blocker. Hardware usually is. The Ollama download page states the tradeoff plainly: local models run on the computer and their speed depends on the hardware, and large models are slow on a machine without a strong GPU. Cloud models instead run on Ollama’s servers, are fast on any computer, and need no download.
Two practical checks are worth doing before you commit to a large model:
- Compare your GPU and memory against the documented requirements. The project maintains a GPU and memory reference at
https://docs.ollama.com/gpu.md, which the download page recommends reading before choosing a model. - Budget more memory than the model file size. Model weights are only part of the footprint; the context window (KV cache) and runtime overhead add to it, and the total grows as a conversation gets longer. Treat weight size as a floor, not a total.
Decide early whether you want local inference, cloud inference, or both, because the model name you use later depends on it. Local models keep prompts and outputs on your machine. Cloud models send requests to Ollama’s servers, which is why they perform consistently regardless of your hardware — and why cloud requests do not require an Ollama installation at all.
Install Ollama on your platform
Windows
Run the installer script in PowerShell:
irm https://ollama.com/install.ps1 | iexmacOS and Linux
Run the install script in a terminal:
curl -fsSL https://ollama.com/install.sh | shOr start from the desktop app
You can also download Ollama for macOS, Windows, or Linux from the download page, open the app, and follow the setup prompts. If you prefer the terminal, running ollama with no arguments starts the same guided flow. During setup you sign in to use cloud models, or choose a local model.
Expected result: the ollama command is available in a new terminal session, and running it produces the setup prompts rather than a “command not found” error.
Run your first local model
The CLI follows a simple pattern: you name a model, Ollama fetches it if it is not already present, then opens an interactive session.
- Check what you already have.
ollama listprints the models stored on the machine. On a fresh install the list is empty. - Pick a model. If you launched the guided flow, Ollama prompts you to choose one. Model names come from the Ollama library, and the tag matters: a name ending in
:cloudis a cloud model that runs on Ollama’s servers, not on your computer. - Run it.
ollama run <model>starts the session. The first run downloads the weights, so expect a pause proportional to model size and connection speed. - Ask something. Type a prompt and press Enter. Output streams into the terminal as it is generated.
- Exit. Type
/byeto leave the interactive session. The model stays on disk and can be started again without another download.
Expected result: you type a question and get a generated answer in the terminal, with no request to a third-party hosted API. If the answer is slow but correct, that is normal on modest hardware. If it never arrives or the process dies, see the troubleshooting section below.
Verify the installation properly
A single successful answer is good evidence, but two checks make the result reproducible.
First, confirm what is on disk and what is currently loaded:
ollama list
ollama psSecond, confirm the local API responds. Ollama exposes an HTTP API locally, by default on 127.0.0.1:11434, using the same request shape documented for the cloud endpoint at https://ollama.com/api/chat. A minimal check:
curl http://localhost:11434/api/chat -d '{
"model": "your-model-name",
"messages": [{"role": "user", "content": "Reply with one short sentence."}]
}'If that returns JSON containing a message, your installation works end to end and any application that can speak HTTP can talk to it. The full API surface, including OpenAI- and Anthropic-compatible endpoints, is documented at https://docs.ollama.com/api/introduction.md.
Local or cloud? How the model name tells you
Ollama deliberately makes the distinction visible in the name.
- Local model names carry no special suffix. They run on your hardware, and speed depends on your GPU and memory.
- Cloud model names end in
:cloud, for examplegemma4:cloud. They run on Ollama’s servers, are fast on any computer, and require no download. The free plan includesgemma4:cloud; most other cloud models need a paid plan or purchased credits.
If you call Ollama from code against cloud models, requests go to https://ollama.com and need an API key:
export OLLAMA_API_KEY="your_api_key"On Windows PowerShell the equivalent is $env:OLLAMA_API_KEY = "your_api_key". Keep the key on your application’s server, outside browser code and source control — the documentation is explicit on this point.
The decision usually comes down to three questions: does the data need to stay on your machine, is your hardware fast enough for the model size you want, and would you rather pay per request or per credit? Because cloud requests do not require an Ollama installation, the cloud path is also the quickest way to evaluate a model before committing disk space to it.
Connect a desktop app or coding agent
Once a local model runs, the next step is usually wiring it into a tool you already use.
On macOS, open Ollama and select Apps. From there you can connect Claude or ChatGPT Desktop, then choose your Ollama models in Settings → Apps. Claude Desktop uses Ollama models inside Claude; ChatGPT Desktop uses them in Codex mode, while regular chat and voice keep the usual ChatGPT connection.
For coding agents, launch from your project directory:
ollama launch claude
ollama launch codex
ollama launch opencodeOllama offers to install Claude Code or OpenCode if they are missing. Codex CLI must be installed first. Once an agent is running, a reasonable first prompt is Explain how this repository is organized.
Troubleshooting the first run
These are the failures most likely to interrupt a first attempt. Treat each cause as a hypothesis and confirm it before changing anything.
The ollama command is not found
The installer may have finished without the binary reaching your shell’s PATH, or the terminal session may predate the install. Open a new terminal and try again. If it still fails, re-run the platform installer and read its output for errors.
The model is downloading for a very long time
First runs download weights, and size varies widely by model. Check the download progress and your available disk space. Choosing a smaller model is the fastest fix if the download is impractical on your connection.
Generation is extremely slow
This is usually hardware rather than configuration. Ollama’s own guidance is that large models are slow on a computer without a strong GPU. Compare your machine against https://docs.ollama.com/gpu.md, then either drop to a smaller model or switch to a :cloud model for that workload.
The process crashes or the system becomes unresponsive
Likely memory exhaustion. Remember that weights, the context/KV cache, and runtime overhead all consume memory, so a model that fits on paper may not fit in practice. Reduce the model size, shorten the context, or close other memory-heavy applications.
Requests fail against the local API
Confirm the model name in your request exactly matches a name from ollama list, including the tag. If nothing is listening on the default port, start the service again by reopening the app or running ollama serve, and check whether another process has taken the port.
You cannot tell whether a model is local or cloud
Look at the name. A :cloud suffix means the request leaves your machine. That distinction also determines whether an API key is required.
Where to go next
With one model running and verified, the useful next moves are to pick a model size that matches your hardware honestly, connect the runtime to an editor or agent, and read the API documentation before writing code against it. The project’s own reading list is a good starting point: the docs index at https://docs.ollama.com/llms.txt, the quickstart at https://docs.ollama.com/quickstart.md, the cloud guide at https://docs.ollama.com/cloud.md, and the GPU reference at https://docs.ollama.com/gpu.md. If you already use the OpenAI or Anthropic SDKs, the compatibility pages at https://docs.ollama.com/api/openai-compatibility.md and https://docs.ollama.com/api/anthropic-compatibility.md explain how to point them at Ollama.
If you hit an error that is not covered here, share your operating system, GPU, the exact model name you used, and the exact error text with the Ai-Forum community. That combination is usually enough for someone else to reproduce the problem and suggest a fix.
FAQ
Do I need an account or API key to run a local model?
No. Local models run on your own computer without an API key. Signing in is for cloud models, and code that calls cloud models at https://ollama.com needs OLLAMA_API_KEY set on your server.
How do I know whether my computer can run a model locally?
Compare your GPU and memory against the reference at https://docs.ollama.com/gpu.md. Ollama notes that large models are slow on a computer without a strong GPU; cloud models run on Ollama's servers and are fast on any computer.
What does the :cloud suffix mean in a model name?
It means the model runs on Ollama's servers rather than on your machine. Cloud models need no download and are fast regardless of your hardware, but the request leaves your computer.
Can I use Ollama with the OpenAI or Anthropic SDKs?
Yes. Ollama documents OpenAI- and Anthropic-compatible endpoints at https://docs.ollama.com/api/openai-compatibility.md and https://docs.ollama.com/api/anthropic-compatibility.md, so existing SDK-based code can be pointed at the runtime.