[GH-ISSUE #1750] [Feature] set Download directory for models while pulling/downloading from ollama #1001

Closed
opened 2026-04-12 10:42:48 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @tikendraw on GitHub (Dec 31, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1750

Hey,

In Ubuntu 23.10,
Previously, Ollama used to download the models into the root directory.
Now, it is downloading in the Home directory. How do you control this?

I suggest a directory flag to let the user decide in which folder the model is supposed to go.

Originally created by @tikendraw on GitHub (Dec 31, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1750 Hey, In Ubuntu 23.10, Previously, Ollama used to download the models into the root directory. Now, it is downloading in the Home directory. How do you control this? I suggest a directory flag to let the user decide in which folder the model is supposed to go.
Author
Owner

@BruceMacD commented on GitHub (Jan 2, 2024):

Hi @tikendraw thanks for opening the issue, you should be able to set the directory that models are stored in using the OLLAMA_MODELS environment variable. There's a bit more detail on that here:
https://github.com/jmorganca/ollama/blob/main/docs/faq.md#how-do-i-set-them-to-a-different-location

Let me know if you have any more follow up questions, I'm gonna resolve this one for now as it seems to be covered. n

<!-- gh-comment-id:1873907146 --> @BruceMacD commented on GitHub (Jan 2, 2024): Hi @tikendraw thanks for opening the issue, you should be able to set the directory that models are stored in using the `OLLAMA_MODELS` environment variable. There's a bit more detail on that here: https://github.com/jmorganca/ollama/blob/main/docs/faq.md#how-do-i-set-them-to-a-different-location Let me know if you have any more follow up questions, I'm gonna resolve this one for now as it seems to be covered. n
Author
Owner

@marianoarga commented on GitHub (Jan 8, 2024):

Setting the env variable, globally, permanently, and on the service itself, doesnt take effect, it keeps looking for space on /usr/share, is there something I could check?

<!-- gh-comment-id:1881392712 --> @marianoarga commented on GitHub (Jan 8, 2024): Setting the env variable, globally, permanently, and on the service itself, doesnt take effect, it keeps looking for space on /usr/share, is there something I could check?
Author
Owner

@tikendraw commented on GitHub (Jan 8, 2024):

Setting the env variable, globally, permanently, and on the service itself, doesnt take effect, it keeps looking for space on /usr/share, is there something I could check?

Here is what i did that worked for me. Try this if you have not.

in a etc/systemd/system/ollama.service.d/environment.conf file (if doesn't exist, then make one) and
write this or adjust accordingly

[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
Environment="OLLAMA_MODELS=/usr/share/ollama/.ollama/models"

restart maybe.

<!-- gh-comment-id:1881428685 --> @tikendraw commented on GitHub (Jan 8, 2024): > Setting the env variable, globally, permanently, and on the service itself, doesnt take effect, it keeps looking for space on /usr/share, is there something I could check? Here is what i did that worked for me. Try this if you have not. in a `etc/systemd/system/ollama.service.d/environment.conf` file (if doesn't exist, then make one) and write this or adjust accordingly ``` [Service] Environment="OLLAMA_HOST=0.0.0.0:11434" Environment="OLLAMA_MODELS=/usr/share/ollama/.ollama/models" ``` restart maybe.
Author
Owner

@marianoarga commented on GitHub (Jan 8, 2024):

It works, thanks

<!-- gh-comment-id:1881516447 --> @marianoarga commented on GitHub (Jan 8, 2024): It works, thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1001