ollama - ✅(Solved) Fix Use NSIS for Windows installer to support custom installation directory and advanced setup options [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15038Fetched 2026-04-08 01:21:46
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
commented ×2cross-referenced ×1labeled ×1

PR fix notes

PR #15117: Windows installer options

Description (problem / solution / changelog)

This pull request improves the Windows installer user experience and addresses the main pain points from issue #15038.

It makes two key changes. First, it re-enables the installer directory selection page so that users can choose a custom installation path through the GUI, instead of being forced to use the default path or rely on the /DIR command-line flag. Second, it adds a new “Model storage location” wizard page that allows users to choose where downloaded models are stored. The selected models directory is wired to the OLLAMA_MODELS environment variable for the current user. If OLLAMA_MODELS was already set and the user keeps that value, it is preserved. If OLLAMA_MODELS was not set and the user keeps the default path (%USERPROFILE%.ollama\models), no environment variable is written and behavior remains unchanged. If the user chooses a custom path, OLLAMA_MODELS is set to that directory. If OLLAMA_MODELS previously existed but the user reverts to the built-in default path, the override is removed.

This pull request keeps the existing Inno Setup–based installer and focuses on adding the requested configuration options and a more typical Windows GUI experience, rather than migrating to NSIS.

Changed files

  • api/types.go (modified, +1/-0)
  • app/ollama.iss (modified, +59/-1)
  • server/routes.go (modified, +55/-1)
  • server/routes_create_test.go (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

The current Windows installer for Ollama (the .exe package) does not allow users to select an installation directory or configure other options such as environment variables during setup. The installation process silently installs to a fixed default path. This causes inconvenience for users who prefer to install on a different drive or specific location, and is particularly limiting in multi-user or enterprise environments.

I suggest switching the Windows installer to NSIS (Nullsoft Scriptable Install System). NSIS is a well-established installer tool that offers several advantages:

Allows users to choose the installation directory during setup;

Supports advanced configurations like environment variable setup and shortcut creation;

Has a rich plugin ecosystem for extended functionality;

I especially recommend the NsisMultiUser plugin, which provides better support for multi-user installation scenarios (e.g., install for current user or all users).

NSIS official website: https://nsis.sourceforge.io/

Adopting NSIS would significantly improve the Windows installation experience without adding excessive complexity, and would align with common practices for Windows applications. I hope the team will consider this improvement.

Thank you!

extent analysis

Fix Plan

To address the issue, we will switch to using NSIS (Nullsoft Scriptable Install System) for the Windows installer. Here are the steps:

  • Download and install NSIS from the official website: https://nsis.sourceforge.io/
  • Create a new NSIS script (.nsi file) to define the installation process
  • Use the NsisMultiUser plugin to support multi-user installation scenarios

Example NSIS script:

; Define the installation directory
Var InstallDir

; Request the installation directory from the user
Page directory
Page instfiles

; Set the installation directory
Section "Install"
  SetOutPath $InstallDir
  File /r *.*
SectionEnd

To support environment variable setup, add the following code:

; Set environment variable
Section "Environment Variables"
  WriteEnvStr "OLLAMA_HOME" "$InstallDir"
SectionEnd

To support shortcut creation, add the following code:

; Create shortcut
Section "Shortcuts"
  CreateShortcut "$DESKTOP\Ollama.lnk" "$InstallDir\ollama.exe"
SectionEnd

Verification

To verify that the fix worked, test the new installer by running the NSIS script and checking that:

  • The user can select the installation directory during setup
  • Environment variables are set correctly
  • Shortcuts are created correctly

Extra Tips

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING