[GH-ISSUE #8581] Model Location #5545

Closed
opened 2026-04-12 16:48:17 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @JohnnyLeuthard on GitHub (Jan 25, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8581

Why is it so difficult and unreliable to move the models folder,. I have a Mac mini and it worked for about a day. Nothing has changed and I have even gone through and reinstalled and set it all up again, rebooted, verified permissions. heck I even went as far as grad everyone read/write just to eliminate that. Yet STILL it writes to the default location rather than where my environment variable is defining it. Why is it not just a config file where you can put the path in? Why can this just be a setting rather than have to rely on hacking things up by using something like a symbolic link? That is a last resort kind of configuration for when all else fails. These are the kinds of things that make me question the overall product and trusting it's reliability and that it won't start dumping all kinds of files god knows where consuming and wasting space. Why is this so difficult?!

Originally created by @JohnnyLeuthard on GitHub (Jan 25, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8581 Why is it so difficult and unreliable to move the models folder,. I have a Mac mini and it worked for about a day. Nothing has changed and I have even gone through and reinstalled and set it all up again, rebooted, verified permissions. heck I even went as far as grad everyone read/write just to eliminate that. Yet STILL it writes to the default location rather than where my environment variable is defining it. Why is it not just a config file where you can put the path in? Why can this just be a setting rather than have to rely on hacking things up by using something like a symbolic link? That is a last resort kind of configuration for when all else fails. These are the kinds of things that make me question the overall product and trusting it's reliability and that it won't start dumping all kinds of files god knows where consuming and wasting space. Why is this so difficult?!
GiteaMirror added the feature request label 2026-04-12 16:48:17 -05:00
Author
Owner

@rick-github commented on GitHub (Jan 25, 2025):

How are you setting OLLAMA_MODELS? It's not an environment variable you put in your .zshrc, it goes in to the launch environment. What does the following show:

launchctl getenv OLLAMA_MODELS

Post server logs if you are still having difficulties.

<!-- gh-comment-id:2614015953 --> @rick-github commented on GitHub (Jan 25, 2025): How are you setting `OLLAMA_MODELS`? It's not an environment variable you put in your .zshrc, it goes in to the launch environment. What does the following show: ``` launchctl getenv OLLAMA_MODELS ``` Post [server logs](https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#how-to-troubleshoot-issues) if you are still having difficulties.
Author
Owner

@JohnnyLeuthard commented on GitHub (Jan 25, 2025):

Originally set at the command line with the command

export OLLAMA_MODELS="/Volumes/X10Pro/Ollama/models"

That worked once then stopped for whatever reason. I found an article that said put it in your profile so it loads every time you reboot or launch a new terminal so I put it in the
".zprofile", file. I also trued the ".bash_profile" file

If I run that command I see nothing if I just run
env I see it or if I run
echo $OLLAMA_MODELS
It also spits out the correct path.

<!-- gh-comment-id:2614050348 --> @JohnnyLeuthard commented on GitHub (Jan 25, 2025): Originally set at the command line with the command export OLLAMA_MODELS="/Volumes/X10Pro/Ollama/models" That worked once then stopped for whatever reason. I found an article that said put it in your profile so it loads every time you reboot or launch a new terminal so I put it in the ".zprofile", file. I also trued the ".bash_profile" file If I run that command I see nothing if I just run env I see it or if I run echo $OLLAMA_MODELS It also spits out the correct path.
Author
Owner

@JohnnyLeuthard commented on GitHub (Jan 25, 2025):

I just set it that way and It looks like that worked. THJANKS!
Hopefully that sticks.

<!-- gh-comment-id:2614051504 --> @JohnnyLeuthard commented on GitHub (Jan 25, 2025): I just set it that way and It looks like that worked. THJANKS! Hopefully that sticks.
Author
Owner

@rick-github commented on GitHub (Jan 25, 2025):

Your shell environment is the wrong place to set this variable, it needs to set in the launch environment.

launchctl setenv OLLAMA_MODELS /Volumes/X10Pro/Ollama/models
<!-- gh-comment-id:2614051530 --> @rick-github commented on GitHub (Jan 25, 2025): Your shell environment is the wrong place to set this variable, it needs to set in the [launch environment](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-mac). ``` launchctl setenv OLLAMA_MODELS /Volumes/X10Pro/Ollama/models ```
Author
Owner

@danielithomas commented on GitHub (Jan 26, 2025):

Unsure if this is related or not, but I have experienced a similar behavior on Windows. I set the environment variable OLLAMA_MODELS at the system level and at the user level (just in case it was skipping one location for the other). In powershell, when I request the environment variable (by typing $env:OLLAMA_MODELS the correct location is displayed. However, when I request a model (e.g. ollama run phi4:14b and the model was still being pulled to the <user_home_dir>\.ollama directory.

Given this experience, the noted problem here with a mac, and I think issue #8572 - could this be a bug rather than config? Happy to be shown otherwise.

<!-- gh-comment-id:2614244488 --> @danielithomas commented on GitHub (Jan 26, 2025): Unsure if this is related or not, but I have experienced a similar behavior on Windows. I set the environment variable `OLLAMA_MODELS` at the system level _and_ at the user level (just in case it was skipping one location for the other). In powershell, when I request the environment variable (by typing `$env:OLLAMA_MODELS` the correct location is displayed. However, when I request a model (e.g. `ollama run phi4:14b` and the model was still being pulled to the `<user_home_dir>\.ollama` directory. Given this experience, the noted problem here with a mac, and I _think_ issue #8572 - could this be a bug rather than config? Happy to be shown otherwise.
Author
Owner

@rick-github commented on GitHub (Jan 26, 2025):

Did you restart the server? What's in the server logs?

<!-- gh-comment-id:2614262003 --> @rick-github commented on GitHub (Jan 26, 2025): Did you restart the server? What's in the server logs?
Author
Owner

@JohnnyLeuthard commented on GitHub (Jan 26, 2025):

The launchctl command you provided worked on my Mac. I even did a reboot to make sure it sticks. So far it has been working. I don't trust it 100% yet. The method I was using before worked for a while then stopped, after fighting with it it started working again. then stopped and nothing I did made it work again. Up until the different method you gave.

<!-- gh-comment-id:2614486553 --> @JohnnyLeuthard commented on GitHub (Jan 26, 2025): The launchctl command you provided worked on my Mac. I even did a reboot to make sure it sticks. So far it has been working. I don't trust it 100% yet. The method I was using before worked for a while then stopped, after fighting with it it started working again. then stopped and nothing I did made it work again. Up until the different method you gave.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5545