windows.md 3.52 KB
Newer Older
1
# Ollama Windows
Michael Yang's avatar
Michael Yang committed
2

3
Welcome to Ollama for Windows.
Michael Yang's avatar
Michael Yang committed
4
5
6
7

No more WSL required!

Ollama now runs as a native Windows application, including NVIDIA and AMD Radeon GPU support.
8
After installing Ollama for Windows, Ollama will run in the background and
Michael Yang's avatar
Michael Yang committed
9
10
11
12
13
14
the `ollama` command line is available in `cmd`, `powershell` or your favorite
terminal application. As usual the Ollama [api](./api.md) will be served on
`http://localhost:11434`.

## System Requirements

15
* Windows 10 22H2 or newer, Home or Pro
Michael Yang's avatar
Michael Yang committed
16
17
18
* NVIDIA 452.39 or newer Drivers if you have an NVIDIA card
* AMD Radeon Driver https://www.amd.com/en/support if you have a Radeon card

19
20
Ollama uses unicode characters for progress indication, which may render as unknown squares in some older terminal fonts in Windows 10. If you see this, try changing your terminal font settings.

21
22
23
24
25
26
27
28
29
30
31
32
## Filesystem Requirements

The Ollama install does not require Administrator, and installs in your home directory by default.  You'll need at least 4GB of space for the binary install.  Once you've installed Ollama, you'll need additional space for storing the Large Language models, which can be tens to hundreds of GB in size.  If your home directory doesn't have enough space, you can change where the binaries are installed, and where the models are stored.

### Changing Install Location

To install the Ollama application in a location different than your home directory, start the installer with the following flag

```powershell
OllamaSetup.exe /DIR="d:\some\location"
```

Michael Yang's avatar
Michael Yang committed
33
34
35
## API Access

Here's a quick example showing API access from `powershell`
36

Michael Yang's avatar
Michael Yang committed
37
```powershell
38
(Invoke-WebRequest -method POST -Body '{"model":"llama3.2", "prompt":"Why is the sky blue?", "stream": false}' -uri http://localhost:11434/api/generate ).Content | ConvertFrom-json
Michael Yang's avatar
Michael Yang committed
39
40
41
42
43
```

## Troubleshooting

Ollama on Windows stores files in a few different locations.  You can view them in
44
the explorer window by hitting `<Ctrl>+R` and type in:
Michael Yang's avatar
Michael Yang committed
45
- `explorer %LOCALAPPDATA%\Ollama` contains logs, and downloaded updates
46
47
    - *app.log* contains most resent logs from the GUI application
    - *server.log* contains the most recent server logs
Michael Yang's avatar
Michael Yang committed
48
49
50
    - *upgrade.log* contains log output for upgrades
- `explorer %LOCALAPPDATA%\Programs\Ollama` contains the binaries (The installer adds this to your user PATH)
- `explorer %HOMEPATH%\.ollama` contains models and configuration
51

52
53
54
## Uninstall

The Ollama Windows installer registers an Uninstaller application.  Under `Add or remove programs` in Windows Settings, you can uninstall Ollama.
55

56
57
58
59
> [!NOTE]
> If you have [changed the OLLAMA_MODELS location](#changing-model-location), the installer will not remove your downloaded models


60
61
62
63
64
65
66
67
68
## Standalone CLI

The easiest way to install Ollama on Windows is to use the `OllamaSetup.exe`
installer. It installs in your account without requiring Administrator rights.
We update Ollama regularly to support the latest models, and this installer will
help you keep up to date.

If you'd like to install or integrate Ollama as a service, a standalone
`ollama-windows-amd64.zip` zip file is available containing only the Ollama CLI
69
70
and GPU library dependencies for Nvidia.  If you have an AMD GPU, also download
and extract the additional ROCm package `ollama-windows-amd64-rocm.zip` into the
71
72
73
same directory.  Both zip files are necessary for a complete AMD installation.
This allows for embedding Ollama in existing applications, or running it as a
system service via `ollama serve` with tools such as [NSSM](https://nssm.cc/). 
74
75
76

> [!NOTE]  
> If you are upgrading from a prior version, you should remove the old directories first.