[GH-ISSUE #3980] Wrong install directory during setup #48975

Closed
opened 2026-04-28 10:22:40 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @jan-oratowski on GitHub (Apr 27, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3980

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

On Windows, when running the installer Ollama will install to the local user folder, instead of asking for a path or installing to a globally accessible directory (the one that can be accessed by every user).

This pattern is incorrect.
The installer should either give the user an option to select where to install (and ask for Admin permission), or by default install to the globally accessible directory and fallback to the user directory if not possible. Some applications will also give you an option of "Standard" and "Custom" install, where "Custom" is just "Standard", but with directory selection.

AppData is like /home/user on Linux and is used for storing application data, not application files.

This behavior leads to a huge user directory that in the end makes backups harder to do.

If nobody wants to spend time on the installer, then I can probably fix it myself and submit PR, just let me know.

OS

Windows

GPU

No response

CPU

No response

Ollama version

current

Originally created by @jan-oratowski on GitHub (Apr 27, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3980 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? On Windows, when running the installer Ollama will install to the local user folder, instead of asking for a path or installing to a globally accessible directory (the one that can be accessed by every user). This pattern is incorrect. The installer should either give the user an option to select where to install (and ask for Admin permission), or by default install to the globally accessible directory and fallback to the user directory if not possible. Some applications will also give you an option of "Standard" and "Custom" install, where "Custom" is just "Standard", but with directory selection. AppData is like /home/user on Linux and is used for storing application data, not application files. This behavior leads to a huge user directory that in the end makes backups harder to do. If nobody wants to spend time on the installer, then I can probably fix it myself and submit PR, just let me know. ### OS Windows ### GPU _No response_ ### CPU _No response_ ### Ollama version current
GiteaMirror added the feature requestwindows labels 2026-04-28 10:23:26 -05:00
Author
Owner

@Alphayellowcat commented on GitHub (Apr 28, 2024):

The current compromise is to modify the environment variables, such as OLLAMA_MODELS

<!-- gh-comment-id:2081312242 --> @Alphayellowcat commented on GitHub (Apr 28, 2024): The current compromise is to modify the environment variables, such as OLLAMA_MODELS
Author
Owner

@jan-oratowski commented on GitHub (Apr 28, 2024):

Thanks for the reply.

I think those are two different things.

Right now there are two directories created in the User directory:

  1. Directory with Ollama - C:\Users\UserName\AppData\Local\Programs\Ollama << this one is created by the installer and there is no way to change it. This is also the directory that is added to PATH (but not OLLAMA_MODELS).
  2. Directory with Ollama user-related stuff - C:\User\UserName\.ollama - this directory contains pub/private key pair, history, and Models.

I understand that OLLAMA_MODELS can prevent Models from being saved to C:\User\UserName\.ollama\models and instead, you can define your own path, I guess this is fine. This will still save pub/priv key pair and history in the User directory, but I think this is how it should work.

I'm complaining about the path from point 1. It should be somewhere in C:\Program Files, in the end, it would allow all the users to use the installation (right now they can't access your User directory) and would not expose any of your previous prompts/settings, as they are saved in the directory from point 2.

What I would like to do is modify the inn file (the one that creates the installer) to require one additional step that would have questions like "How do you want to install Ollama?" with answers:

  • for everyone using this computer (requires Administrator access)
  • just for me (installs in your User directory)
  • let me choose the directory

This way if someone is installing Ollama on a computer without Admin rights, it can still be installed the current way, but if someone wants to install it for everyone, it can be done as well.

I had previous experience with WiX installer, so had to check if it can be done in Inno as well.

I have already looked into Inno Installer and checked out some tutorials, so I can modify the installer file, test it on my own machine, and then submit the PR. Just need confirmation that it's ok with the maintainer of the repo.

<!-- gh-comment-id:2081399886 --> @jan-oratowski commented on GitHub (Apr 28, 2024): Thanks for the reply. I think those are two different things. Right now there are two directories created in the User directory: 1. Directory with Ollama - `C:\Users\UserName\AppData\Local\Programs\Ollama` << this one is created by the installer and there is no way to change it. This is also the directory that is added to PATH (but not OLLAMA_MODELS). 2. Directory with Ollama user-related stuff - `C:\User\UserName\.ollama` - this directory contains pub/private key pair, history, and Models. I understand that OLLAMA_MODELS can prevent Models from being saved to `C:\User\UserName\.ollama\models` and instead, you can define your own path, I guess this is fine. This will still save pub/priv key pair and history in the User directory, but I think this is how it should work. I'm complaining about the path from point 1. It should be somewhere in `C:\Program Files`, in the end, it would allow all the users to use the installation (right now they can't access your User directory) and would not expose any of your previous prompts/settings, as they are saved in the directory from point 2. What I would like to do is modify the inn file (the one that creates the installer) to require one additional step that would have questions like "How do you want to install Ollama?" with answers: - for everyone using this computer (requires Administrator access) - just for me (installs in your User directory) - let me choose the directory This way if someone is installing Ollama on a computer without Admin rights, it can still be installed the current way, but if someone wants to install it for everyone, it can be done as well. I had previous experience with WiX installer, so had to check if it can be done in Inno as well. I have already looked into Inno Installer and checked out some tutorials, so I can modify the installer file, test it on my own machine, and then submit the PR. Just need confirmation that it's ok with the maintainer of the repo.
Author
Owner

@dhiltgen commented on GitHub (May 1, 2024):

Dup of #2776

<!-- gh-comment-id:2088744033 --> @dhiltgen commented on GitHub (May 1, 2024): Dup of #2776
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48975