[GH-ISSUE #2322] Run Ollama models stored on external disk #63379

Closed
opened 2026-05-03 13:15:47 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @B-Gendron on GitHub (Feb 2, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2322

As I went through the whole documentation, I am still a bit confused about how the model are saved when doing ollama pull and how I can use it. For instance, as I don't have that much storage on my computer I would like to pull several models and then save the whole /.ollama/models/blobs/ directory on an external disk.

Is it possible then to fetch the desired model from my external storage to run the model locally on my computer? More precisely, when the documentation of pullcommand says Pull a model from a registry, is there a way to specify such registry, and can it be a storage place like a hard disk?

Originally created by @B-Gendron on GitHub (Feb 2, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2322 As I went through the whole documentation, I am still a bit confused about how the model are saved when doing `ollama pull` and how I can use it. For instance, as I don't have that much storage on my computer I would like to pull several models and then save the whole `/.ollama/models/blobs/` directory on an external disk. Is it possible then to fetch the desired model from my external storage to run the model locally on my computer? More precisely, when the documentation of `pull`command says `Pull a model from a registry`, is there a way to specify such registry, and can it be a storage place like a hard disk?
Author
Owner

@truatpasteurdotfr commented on GitHub (Feb 2, 2024):

You can set the OLLAMA_MODELS environment value to the path of your external disk folder:

export OLLAMA_MODELS=/path/to/my/disk/models
./ollama serve

ollama pull xxx will create `/path/to/my/disk/models/{blobs,manifests}

<!-- gh-comment-id:1923547789 --> @truatpasteurdotfr commented on GitHub (Feb 2, 2024): You can set the `OLLAMA_MODELS` environment value to the path of your external disk folder: ``` export OLLAMA_MODELS=/path/to/my/disk/models ./ollama serve ``` `ollama pull xxx` will create `/path/to/my/disk/models/{blobs,manifests}
Author
Owner

@easp commented on GitHub (Feb 3, 2024):

Apparently Ollama uses Docker's registry format and in the past devs have suggested that it's possible to set up your own private registry, but I've never seen any details about how to do that.

If you run ollama pull --help it mentions an option to use an insecure registry, which might be a piece of the puzzle.

<!-- gh-comment-id:1925440049 --> @easp commented on GitHub (Feb 3, 2024): Apparently Ollama uses Docker's registry format and in the past devs have suggested that it's possible to set up your own private registry, but I've never seen any details about how to do that. If you run `ollama pull --help` it mentions an option to use an insecure registry, which might be a piece of the puzzle.
Author
Owner

@pdevine commented on GitHub (Feb 5, 2024):

@B-Gendron as mentioned by @truatpasteurdotfr you can use the OLLAMA_MODELS environment variable to set that. Make certain that your external disk is formatted with a file system which supports filenames with a : in them (i.e. NOT exfat or NTFS).

The pull command will also work, but it's probably not what you want. When you go to run the model it will always have to download it and keep a copy of the model on your disk. I'm going to go ahead and close the issue, but feel free to keep commenting if this isn't what you're looking for.

<!-- gh-comment-id:1927875494 --> @pdevine commented on GitHub (Feb 5, 2024): @B-Gendron as mentioned by @truatpasteurdotfr you can use the `OLLAMA_MODELS` environment variable to set that. Make certain that your external disk is formatted with a file system which supports filenames with a `:` in them (i.e. *NOT* exfat or NTFS). The `pull` command will also work, but it's probably not what you want. When you go to run the model it will always have to download it and keep a copy of the model on your disk. I'm going to go ahead and close the issue, but feel free to keep commenting if this isn't what you're looking for.
Author
Owner

@xXWarMachineRoXx commented on GitHub (May 31, 2024):

What would one do for windows?

<!-- gh-comment-id:2141951587 --> @xXWarMachineRoXx commented on GitHub (May 31, 2024): What would one do for windows?
Author
Owner

@pdevine commented on GitHub (May 31, 2024):

@xXWarMachineRoXx We've made it work now w/ both exfat and NTFS. You can see instructions in the FAQ

<!-- gh-comment-id:2142584128 --> @pdevine commented on GitHub (May 31, 2024): @xXWarMachineRoXx We've made it work now w/ both exfat and NTFS. You can see instructions in the [FAQ](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-windows)
Author
Owner

@xXWarMachineRoXx commented on GitHub (May 31, 2024):

@pdevine thanks !

<!-- gh-comment-id:2142606806 --> @xXWarMachineRoXx commented on GitHub (May 31, 2024): @pdevine thanks !
Author
Owner

@thebadking commented on GitHub (Oct 10, 2024):

does not work for exfat since we cant set permissions to ollama user for the directory

<!-- gh-comment-id:2405775326 --> @thebadking commented on GitHub (Oct 10, 2024): does not work for exfat since we cant set permissions to ollama user for the directory
Author
Owner

@kravenor commented on GitHub (Mar 29, 2026):

@xXWarMachineRoXx We've made it work now w/ both exfat and NTFS. You can see instructions in the FAQ

Link returns 404

<!-- gh-comment-id:4150221524 --> @kravenor commented on GitHub (Mar 29, 2026): > [@xXWarMachineRoXx](https://github.com/xXWarMachineRoXx) We've made it work now w/ both exfat and NTFS. You can see instructions in the [FAQ](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-windows) Link returns 404
Author
Owner

@truatpasteurdotfr commented on GitHub (Mar 30, 2026):

https://docs.ollama.com/faq#how-do-i-set-them-to-a-different-location

<!-- gh-comment-id:4154681572 --> @truatpasteurdotfr commented on GitHub (Mar 30, 2026): https://docs.ollama.com/faq#how-do-i-set-them-to-a-different-location
Author
Owner

@peterpt commented on GitHub (Apr 26, 2026):

guys , in next release use the cli help of ollama to allow user to configure where models will be installed , no matter how many times i set the path for models installations path , ollama always download the models to /user/.ollama without respecting the environment config

<!-- gh-comment-id:4321633535 --> @peterpt commented on GitHub (Apr 26, 2026): guys , in next release use the cli help of ollama to allow user to configure where models will be installed , no matter how many times i set the path for models installations path , ollama always download the models to /user/.ollama without respecting the environment config
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63379