2024-10-30 09:24:59 -07:00
# Ollama Windows
2024-05-02 14:52:21 -07:00
2024-10-30 09:24:59 -07:00
Welcome to Ollama for Windows.
2024-05-02 14:52:21 -07:00
No more WSL required!
Ollama now runs as a native Windows application, including NVIDIA and AMD Radeon GPU support.
2024-10-30 09:24:59 -07:00
After installing Ollama for Windows, Ollama will run in the background and
2024-05-02 14:52:21 -07:00
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
2024-05-13 15:08:29 -07:00
* Windows 10 22H2 or newer, Home or Pro
2024-05-02 14:52:21 -07:00
* 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
2024-07-24 15:22:00 -07:00
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.
2024-10-30 09:24:31 -07:00
## 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"
```
### Changing Model Location
To change where Ollama stores the downloaded models instead of using your home directory, set the environment variable `OLLAMA_MODELS` in your user account.
1. Start the Settings (Windows 11) or Control Panel (Windows 10) application and search for _environment variables_ .
2. Click on _Edit environment variables for your account_ .
3. Edit or create a new variable for your user account for `OLLAMA_MODELS` where you want the models stored
4. Click OK/Apply to save.
If Ollama is already running, Quit the tray application and relaunch it from the Start menu, or a new terminal started after you saved the environment variables.
2024-05-02 14:52:21 -07:00
## API Access
Here's a quick example showing API access from `powershell`
2025-02-08 00:55:07 +07:00
2024-05-02 14:52:21 -07:00
```powershell
2024-09-25 11:11:22 -07:00
(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
2024-05-02 14:52:21 -07:00
```
## Troubleshooting
Ollama on Windows stores files in a few different locations. You can view them in
2025-02-15 12:38:24 -08:00
the explorer window by hitting `<Ctrl>+R` and type in:
2024-05-02 14:52:21 -07:00
- `explorer %LOCALAPPDATA%\Ollama` contains logs, and downloaded updates
2024-06-15 16:30:37 -07:00
- *app.log* contains most resent logs from the GUI application
- *server.log* contains the most recent server logs
2024-05-02 14:52:21 -07:00
- *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
- `explorer %TEMP%` contains temporary executable files in one or more `ollama*` directories
2024-05-03 14:07:38 -07:00
2024-09-05 15:57:38 -07:00
## Uninstall
The Ollama Windows installer registers an Uninstaller application. Under `Add or remove programs` in Windows Settings, you can uninstall Ollama.
2024-05-03 14:07:38 -07:00
2024-10-30 09:24:31 -07:00
> [!NOTE]
> If you have [changed the OLLAMA_MODELS location](#changing-model-location), the installer will not remove your downloaded models
2024-05-03 14:07:38 -07:00
## 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
2025-03-05 14:11:21 -08:00
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
same directory. 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/ ).
build: Make target improvements (#7499)
* llama: wire up builtin runner
This adds a new entrypoint into the ollama CLI to run the cgo built runner.
On Mac arm64, this will have GPU support, but on all other platforms it will
be the lowest common denominator CPU build. After we fully transition
to the new Go runners more tech-debt can be removed and we can stop building
the "default" runner via make and rely on the builtin always.
* build: Make target improvements
Add a few new targets and help for building locally.
This also adjusts the runner lookup to favor local builds, then
runners relative to the executable, and finally payloads.
* Support customized CPU flags for runners
This implements a simplified custom CPU flags pattern for the runners.
When built without overrides, the runner name contains the vector flag
we check for (AVX) to ensure we don't try to run on unsupported systems
and crash. If the user builds a customized set, we omit the naming
scheme and don't check for compatibility. This avoids checking
requirements at runtime, so that logic has been removed as well. This
can be used to build GPU runners with no vector flags, or CPU/GPU
runners with additional flags (e.g. AVX512) enabled.
* Use relative paths
If the user checks out the repo in a path that contains spaces, make gets
really confused so use relative paths for everything in-repo to avoid breakage.
* Remove payloads from main binary
* install: clean up prior libraries
This removes support for v0.3.6 and older versions (before the tar bundle)
and ensures we clean up prior libraries before extracting the bundle(s).
Without this change, runners and dependent libraries could leak when we
update and lead to subtle runtime errors.
2024-12-10 09:47:19 -08:00
> [!NOTE]
> If you are upgrading from a prior version, you should remove the old directories first.