[GH-ISSUE #3585] Models being saved to /home/myUser/.ollama instead of $OLLAMA_MODELS #64253

Closed
opened 2026-05-03 16:47:00 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @vrdeeznuts on GitHub (Apr 10, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3585

What is the issue?

I've followed the instructions at https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored on Linux to change the path where models get stored. However, the model storage path changed from /usr/share/ollama/.ollama/models in the initial install to ~/.ollama/models. The absolute path I want to save the models to is /data/models.

What did you expect to see?

I expected to see the blobs/ and manifests/ directories moved to /data/models, not to ~/.ollama/models.

Steps to reproduce

  1. sudo mkdir -p /data/models #new path to store models 2. sudo chown myUser:myUser /data/models 3. sudo systemctl edit ollama.service
  2. Enter Environment="OLLAMA_MODELS=/data/models" 5. Save and close systemd service file (saves to /etc/systemd/system/ollama.service.d/override.conf)
  3. Ctrl+C in the terminal running ollama serve
  4. sudo systemctl daemon-reload
  5. sudo systemctl restart ollama
  6. ollama serve in separate terminal
  7. ollama show stablelm2:latest #new models/ path is /home/myUser/.ollama/models

Are there any recent changes that introduced the issue?

N/A, I tested this out with a fresh install of Ollama using curl -fsSL https://ollama.com/install.sh | sh.

OS

Linux

Architecture

No response

Platform

No response

Ollama version

0.1.31

GPU

Nvidia

GPU info

NVIDIA RTX A6000 (48GB)

CPU

No response

Other software

N/A

Originally created by @vrdeeznuts on GitHub (Apr 10, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3585 ### What is the issue? I've followed the instructions at https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored on Linux to change the path where models get stored. However, the model storage path changed from /usr/share/ollama/.ollama/models in the initial install to ~/.ollama/models. The absolute path I want to save the models to is /data/models. ### What did you expect to see? I expected to see the blobs/ and manifests/ directories moved to /data/models, not to ~/.ollama/models. ### Steps to reproduce 1. `sudo mkdir -p /data/models #new path to store models `2. `sudo chown myUser:myUser /data/models `3. `sudo systemctl edit ollama.service` 4. Enter `Environment="OLLAMA_MODELS=/data/models" `5. Save and close systemd service file (saves to `/etc/systemd/system/ollama.service.d/override.conf`) 6. Ctrl+C in the terminal running `ollama serve` 7. `sudo systemctl daemon-reload` 8. `sudo systemctl restart ollama` 9. `ollama serve` in separate terminal 10. `ollama show stablelm2:latest #new models/ path is /home/myUser/.ollama/models` ### Are there any recent changes that introduced the issue? N/A, I tested this out with a fresh install of Ollama using `curl -fsSL https://ollama.com/install.sh | sh`. ### OS Linux ### Architecture _No response_ ### Platform _No response_ ### Ollama version 0.1.31 ### GPU Nvidia ### GPU info NVIDIA RTX A6000 (48GB) ### CPU _No response_ ### Other software N/A
GiteaMirror added the bug label 2026-05-03 16:47:00 -05:00
Author
Owner

@dims commented on GitHub (Apr 11, 2024):

if you already did sudo systemctl restart ollama in step 5, Do you really need the ollama serve in step 6? (curious! feels like you had to do that because the service startup failed?)

<!-- gh-comment-id:2049582966 --> @dims commented on GitHub (Apr 11, 2024): if you already did `sudo systemctl restart ollama` in step 5, Do you really need the `ollama serve` in step 6? (curious! feels like you had to do that because the service startup failed?)
Author
Owner

@vrdeeznuts commented on GitHub (Apr 11, 2024):

feels like you had to do that because the service startup failed?

Hmm, looks like you are right! Not sure if it's a permissions issue or what, but groups shows that my user is in the ollama group...

image

image

<!-- gh-comment-id:2049825978 --> @vrdeeznuts commented on GitHub (Apr 11, 2024): > feels like you had to do that because the service startup failed? Hmm, looks like you are right! Not sure if it's a permissions issue or what, but `groups` shows that my user is in the `ollama` group... ![image](https://github.com/ollama/ollama/assets/105958445/4807e05f-3f8a-47b0-98ed-5a833b26635c) ![image](https://github.com/ollama/ollama/assets/105958445/5db5283c-4b48-432f-8b4c-72e20bec4472)
Author
Owner

@vrdeeznuts commented on GitHub (Apr 11, 2024):

looks like it was a simple permissions issue with $OLLAMA_MODELS after all. The path was owned by root:root so I just needed to give it access to ollama:ollama and it started working.

Thank you.

<!-- gh-comment-id:2049879660 --> @vrdeeznuts commented on GitHub (Apr 11, 2024): looks like it was a simple permissions issue with $OLLAMA_MODELS after all. The path was owned by root:root so I just needed to give it access to ollama:ollama and it started working. Thank you.
Author
Owner

@dims commented on GitHub (Apr 11, 2024):

welcome!

<!-- gh-comment-id:2049890327 --> @dims commented on GitHub (Apr 11, 2024): welcome!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#64253