[GH-ISSUE #2859] [Windows] How do I install the model onto a different drive instead of the C drive? #1743

Closed
opened 2026-04-12 11:43:43 -05:00 by GiteaMirror · 12 comments
Owner

Originally created by @hanlose on GitHub (Mar 1, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2859

Originally created by @hanlose on GitHub (Mar 1, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2859
Author
Owner

@amnweb commented on GitHub (Mar 1, 2024):

Simple, go to Environment Variables and add OLLAMA_MODELS an PATH

Screenshot 2024-03-01 121520

Or just open terminal (powershell) and type

[System.Environment]::SetEnvironmentVariable("OLLAMA_MODELS", "NEW_PATH" ,"User")

<!-- gh-comment-id:1973006033 --> @amnweb commented on GitHub (Mar 1, 2024): Simple, go to Environment Variables and add **OLLAMA_MODELS** an **PATH** ![Screenshot 2024-03-01 121520](https://github.com/ollama/ollama/assets/16545063/a17791cc-35f4-4da8-af53-a8717df00348) Or just open terminal (powershell) and type `[System.Environment]::SetEnvironmentVariable("OLLAMA_MODELS", "NEW_PATH" ,"User")`
Author
Owner

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

This doesnt work for me, recreates folder at C:\Users\user.ollama

<!-- gh-comment-id:1980583660 --> @Gatts011 commented on GitHub (Mar 6, 2024): This doesnt work for me, recreates folder at C:\Users\user\.ollama
Author
Owner

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

Yes .ollama folder is there but models is downloaded in defined location. Did you check Environment Variables settings if you used powershell command to check if OLLAMA_MODELS is there ?

In /Users/xxx/.ollama, this dir. contains some files like history and openssh keys as i can see on my PC, but models (big files) is downloaded on new location. Also I have reinstall windows 3 days ago and ollama is detected this models without downloading again.

image

<!-- gh-comment-id:1980706398 --> @amnweb commented on GitHub (Mar 6, 2024): Yes .ollama folder is there but models is downloaded in defined location. Did you check Environment Variables settings if you used powershell command to check if OLLAMA_MODELS is there ? In /Users/xxx/.ollama, this dir. contains some files like history and openssh keys as i can see on my PC, but models (big files) is downloaded on new location. Also I have reinstall windows 3 days ago and ollama is detected this models without downloading again. ![image](https://github.com/ollama/ollama/assets/16545063/fa624175-ff10-46dc-8a85-e19ffc9b8947)
Author
Owner

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

Aaaaah yes, very good.

thank you!

<!-- gh-comment-id:1980858485 --> @Gatts011 commented on GitHub (Mar 6, 2024): Aaaaah yes, very good. thank you!
Author
Owner

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

Sounds like this is resolved. If you're still having trouble setting up the env vars please let us know.

<!-- gh-comment-id:1981368881 --> @dhiltgen commented on GitHub (Mar 6, 2024): Sounds like this is resolved. If you're still having trouble setting up the env vars please let us know.
Author
Owner

@oscarbat commented on GitHub (Mar 25, 2024):

'ollama' is not recognized as an internal or external command or operable program
or batch file.

<!-- gh-comment-id:2017530914 --> @oscarbat commented on GitHub (Mar 25, 2024): 'ollama' is not recognized as an internal or external command or operable program or batch file.
Author
Owner

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

@oscarbat our installer adds the ollama executable to the PATH, but you'll need to start a new shell (powershell, cmd, others) after the install to pick that up.

<!-- gh-comment-id:2017891572 --> @dhiltgen commented on GitHub (Mar 25, 2024): @oscarbat our installer adds the ollama executable to the PATH, but you'll need to start a new shell (powershell, cmd, others) after the install to pick that up.
Author
Owner

@quqiufeng commented on GitHub (May 2, 2024):

works for me, thanks!

<!-- gh-comment-id:2089560834 --> @quqiufeng commented on GitHub (May 2, 2024): works for me, thanks!
Author
Owner

@tomasthedev commented on GitHub (May 4, 2024):

what about linux?

<!-- gh-comment-id:2094207267 --> @tomasthedev commented on GitHub (May 4, 2024): what about linux?
Author
Owner

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

@tommarekCZE we provide an install script which is opinionated on where it installs the linux binary, but you can adjust where the models are stored as described here https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored and we also make the binary itself available if you want ultimate control on where to place it and how to run it.

<!-- gh-comment-id:2094274705 --> @dhiltgen commented on GitHub (May 4, 2024): @tommarekCZE we provide an install script which is opinionated on where it installs the linux binary, but you can adjust where the models are stored as described here https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored and we also make the binary itself available if you want ultimate control on where to place it and how to run it.
Author
Owner

@jiuwenyu commented on GitHub (Jul 30, 2024):

This doesnt work for me, recreates folder at C:\Users\user.ollama

Set it up, restart and try again

<!-- gh-comment-id:2257370444 --> @jiuwenyu commented on GitHub (Jul 30, 2024): > This doesnt work for me, recreates folder at C:\Users\user.ollama Set it up, restart and try again
Author
Owner

@ruirui2021 commented on GitHub (Jan 21, 2025):

my problem is that it seems docker can't find the new file location.
I run /ollama list/ in term, it can find the model , but when i open the openweb UI through docker it can't find any model.
plz help, thx.

<!-- gh-comment-id:2603916408 --> @ruirui2021 commented on GitHub (Jan 21, 2025): my problem is that it seems docker can't find the new file location. I run /ollama list/ in term, it can find the model , but when i open the openweb UI through docker it can't find any model. plz help, thx.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1743