[GH-ISSUE #2938] Windows install path #48314

Closed
opened 2026-04-28 07:41:02 -05:00 by GiteaMirror · 21 comments
Owner

Originally created by @pozzo-balbi on GitHub (Mar 5, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2938

Originally assigned to: @bmizerany on GitHub.

Hi,

please add an option to choose an installation path, e.g. c:\program files\ollama during install. Installing under the user's home directory is security wise a bad idea.

Thanks

Originally created by @pozzo-balbi on GitHub (Mar 5, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2938 Originally assigned to: @bmizerany on GitHub. Hi, please add an option to choose an installation path, e.g. c:\program files\ollama during install. Installing under the user's home directory is security wise a bad idea. Thanks
GiteaMirror added the windows label 2026-04-28 07:41:02 -05:00
Author
Owner

@dhiltgen commented on GitHub (Mar 6, 2024):

Installing outside of the users home directory would require elevated privileges, and we're aiming to install without admin.

We might consider adding an option to install as a system service in the future, however we do include the stand-alone windows executable in our releases, so it should be possible to "roll your own" system service.

<!-- gh-comment-id:1981263641 --> @dhiltgen commented on GitHub (Mar 6, 2024): Installing outside of the users home directory would require elevated privileges, and we're aiming to install without admin. We might consider adding an option to install as a system service in the future, however we do include the stand-alone windows executable in our releases, so it should be possible to "roll your own" system service.
Author
Owner

@Ivanmatthew commented on GitHub (Mar 6, 2024):

I think using symlinks for at least moving models to another station. Can somebody confirm?

<!-- gh-comment-id:1981650861 --> @Ivanmatthew commented on GitHub (Mar 6, 2024): I think using symlinks for at least moving models to another station. Can somebody confirm?
Author
Owner

@ayushchinmay commented on GitHub (Mar 9, 2024):

I think it would be really useful to be able to migrate the application files, or at least the downloaded model files to a different location.
For the current release, is there any way to either download the model in a different drive, or move the entire application itself to another drive? I was able to achieve this through WSL.

<!-- gh-comment-id:1986592973 --> @ayushchinmay commented on GitHub (Mar 9, 2024): I think it would be really useful to be able to migrate the application files, or at least the downloaded model files to a different location. For the current release, is there any way to either download the model in a different drive, or move the entire application itself to another drive? I was able to achieve this through WSL.
Author
Owner

@dhiltgen commented on GitHub (Mar 9, 2024):

@ayushchinmay the model storage location can be changed via environment variable. See https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored

<!-- gh-comment-id:1986641146 --> @dhiltgen commented on GitHub (Mar 9, 2024): @ayushchinmay the model storage location can be changed via environment variable. See https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored
Author
Owner

@ayushchinmay commented on GitHub (Mar 9, 2024):

That worked! Thank you so much, that saves my C: drive.

<!-- gh-comment-id:1986741099 --> @ayushchinmay commented on GitHub (Mar 9, 2024): That worked! Thank you so much, that saves my C: drive.
Author
Owner

@dhiltgen commented on GitHub (Mar 21, 2024):

Just noticed we have 2 issues tracking this. Lets use #2776

<!-- gh-comment-id:2012278216 --> @dhiltgen commented on GitHub (Mar 21, 2024): Just noticed we have 2 issues tracking this. Lets use #2776
Author
Owner

@gabenitez commented on GitHub (Apr 29, 2024):

you can also specify custom install dir using the /dir param, just install using command line interface:

ollamasetup.exe  /DIR="d:/ollama"
<!-- gh-comment-id:2083728353 --> @gabenitez commented on GitHub (Apr 29, 2024): you can also specify custom install dir using the /dir param, just install using command line interface: ``` ollamasetup.exe /DIR="d:/ollama" ```
Author
Owner

@leosamuele221 commented on GitHub (May 3, 2024):

you can also specify custom install dir using the /dir param, just install using command line interface:

ollamasetup.exe  /DIR="d:/ollama"

This should be the final answer
Thanks!

<!-- gh-comment-id:2093438320 --> @leosamuele221 commented on GitHub (May 3, 2024): > you can also specify custom install dir using the /dir param, just install using command line interface: > > ``` > ollamasetup.exe /DIR="d:/ollama" > ``` This should be the final answer Thanks!
Author
Owner

@AK-1000 commented on GitHub (May 6, 2024):

you can also specify custom install dir using the /dir param, just install using command line interface:

ollamasetup.exe  /DIR="d:/ollama"

You saved my life ! Straight to the point, thank you.

<!-- gh-comment-id:2095893254 --> @AK-1000 commented on GitHub (May 6, 2024): > you can also specify custom install dir using the /dir param, just install using command line interface: > > ``` > ollamasetup.exe /DIR="d:/ollama" > ``` You saved my life ! Straight to the point, thank you.
Author
Owner

@thezolon commented on GitHub (Jun 16, 2024):

Add a comment

Comment

It also won't take the CLI parameters in powershell I discovered. Works when I use cmd instead. At least this is how it behaves on my system. (Win11)

<!-- gh-comment-id:2171740964 --> @thezolon commented on GitHub (Jun 16, 2024): > #### Add a comment > Comment It also won't take the CLI parameters in powershell I discovered. Works when I use cmd instead. At least this is how it behaves on my system. (Win11)
Author
Owner

@SpoffNinja commented on GitHub (Jul 3, 2024):

you can also specify custom install dir using the /dir param, just install using command line interface:

ollamasetup.exe  /DIR="d:/ollama"

This should be the final answer Thanks!

It's a great temp solution but should be no means be the "final answer". If you want better adoption in the space then they should just add a folder location browse button on the install splash screen where that can be set.

Also would be fantastic to have that custom install location info on the main github page than hidden away in the Issues comment section

<!-- gh-comment-id:2205284255 --> @SpoffNinja commented on GitHub (Jul 3, 2024): > > you can also specify custom install dir using the /dir param, just install using command line interface: > > ``` > > ollamasetup.exe /DIR="d:/ollama" > > ``` > > This should be the final answer Thanks! It's a great temp solution but should be no means be the "final answer". If you want better adoption in the space then they should just add a folder location browse button on the install splash screen where that can be set. Also would be fantastic to have that custom install location info on the main github page than hidden away in the Issues comment section
Author
Owner

@Septemberlemon commented on GitHub (Oct 16, 2024):

you can also specify custom install dir using the /dir param, just install using command line interface:

ollamasetup.exe  /DIR="d:/ollama"

That did work!Thank you.
But how did you find that?

<!-- gh-comment-id:2416651590 --> @Septemberlemon commented on GitHub (Oct 16, 2024): > you can also specify custom install dir using the /dir param, just install using command line interface: > > ``` > ollamasetup.exe /DIR="d:/ollama" > ``` That did work!Thank you. But how did you find that?
Author
Owner

@seoninja13 commented on GitHub (Nov 23, 2024):

ollamasetup.exe /DIR="d:/ollama"

You might have to use '.\ollamasetup.exe /DIR="d:/ollama"', depending on from where you are runnign the command

<!-- gh-comment-id:2495624125 --> @seoninja13 commented on GitHub (Nov 23, 2024): > ollamasetup.exe /DIR="d:/ollama" You might have to use '.\ollamasetup.exe /DIR="d:/ollama"', depending on from where you are runnign the command
Author
Owner

@tushgaurav commented on GitHub (Mar 17, 2025):

ollamasetup.exe /DIR="d:/ollama"

You might have to use '.\ollamasetup.exe /DIR="d:/ollama"', depending on from where you are runnign the command

Thanks for this bro.

<!-- gh-comment-id:2728220332 --> @tushgaurav commented on GitHub (Mar 17, 2025): > > ollamasetup.exe /DIR="d:/ollama" > > You might have to use '.\ollamasetup.exe /DIR="d:/ollama"', depending on from where you are runnign the command Thanks for this bro.
Author
Owner

@maximengineer commented on GitHub (May 4, 2025):

on windows 11 the command is:

Start-Process -FilePath "C:\Users\Max\Downloads\ollamasetup.exe" -ArgumentList "/DIR="C:\Program Files\ollama"" -Verb RunAs -Wait

<!-- gh-comment-id:2849306056 --> @maximengineer commented on GitHub (May 4, 2025): on windows 11 the command is: Start-Process -FilePath "C:\Users\Max\Downloads\ollamasetup.exe" -ArgumentList "/DIR=`"C:\Program Files\ollama`"" -Verb RunAs -Wait
Author
Owner

@lehenshtein commented on GitHub (May 5, 2025):

on windows 11 the command is:

Start-Process -FilePath "C:\Users\Max\Downloads\ollamasetup.exe" -ArgumentList "/DIR="C:\Program Files\ollama"" -Verb RunAs -Wait

or just use cmd and ollamasetup.exe /DIR="d:/ollama" as was commented previously)

<!-- gh-comment-id:2850591543 --> @lehenshtein commented on GitHub (May 5, 2025): > on windows 11 the command is: > > Start-Process -FilePath "C:\Users\Max\Downloads\ollamasetup.exe" -ArgumentList "/DIR=`"C:\Program Files\ollama`"" -Verb RunAs -Wait or just use cmd and ollamasetup.exe /DIR="d:/ollama" as was commented previously)
Author
Owner

@EvgeneKuklin commented on GitHub (May 16, 2025):

Please, add folder choosing to UI, why should user google how to do the essential thing?

<!-- gh-comment-id:2886182411 --> @EvgeneKuklin commented on GitHub (May 16, 2025): Please, add folder choosing to UI, why should user google how to do the essential thing?
Author
Owner

@ufenx commented on GitHub (May 28, 2025):

you can also specify custom install dir using the /dir param, just install using command line interface:

ollamasetup.exe  /DIR="d:/ollama"

Thanks. I've noticed someone saying that D: vol (or other volumes other than C:) requires additional permission. Is it still an issue in practice?

<!-- gh-comment-id:2917769542 --> @ufenx commented on GitHub (May 28, 2025): > you can also specify custom install dir using the /dir param, just install using command line interface: > > ``` > ollamasetup.exe /DIR="d:/ollama" > ``` Thanks. I've noticed someone saying that D: vol (or other volumes other than C:) requires additional permission. Is it still an issue in practice?
Author
Owner

@adamk33n3r commented on GitHub (Jun 21, 2025):

Installing outside of the users home directory would require elevated privileges

Not necessarily. You generally don't need elevated privileges to install to an extra drive/partition.

<!-- gh-comment-id:2993209975 --> @adamk33n3r commented on GitHub (Jun 21, 2025): > Installing outside of the users home directory would require elevated privileges Not necessarily. You generally don't need elevated privileges to install to an extra drive/partition.
Author
Owner

@chasanpro commented on GitHub (Sep 20, 2025):

Start-Process -FilePath "Z:\Downloads\OllamaSetup.exe" -ArgumentList '/DIR="Z:\Ollama"'

This thing worked for me

<!-- gh-comment-id:3314998703 --> @chasanpro commented on GitHub (Sep 20, 2025): Start-Process -FilePath "Z:\Downloads\OllamaSetup.exe" -ArgumentList '/DIR="Z:\Ollama"' This thing worked for me
Author
Owner

@Aqua-Pulco commented on GitHub (Oct 12, 2025):

yes it worked! Adding a folder location browse button would be great ! also

.\OllamaSetup.exe /DIR="D:\ollama"

<!-- gh-comment-id:3394342529 --> @Aqua-Pulco commented on GitHub (Oct 12, 2025): yes it worked! Adding a folder location browse button would be great ! also .\OllamaSetup.exe /DIR="D:\ollama"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48314