[GH-ISSUE #432] Which files to copy in order to use model with Ollama on other computer? #201

Closed
opened 2026-04-12 09:43:37 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @ctsrc on GitHub (Aug 27, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/432

I have two computers with Ollama 0.0.16 installed on both.

I downloaded many gigabytes of models on one of them, and then I copied my ~/.ollama/ directory with all of its data from one computer to the other

However, Ollama on the other computer still wants to connect to the internet when I try to run one of the models I copied.

What other files do I need to copy from one computer to the other, in order for Ollama on the other computer to find the models?

Originally created by @ctsrc on GitHub (Aug 27, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/432 I have two computers with Ollama 0.0.16 installed on both. I downloaded many gigabytes of models on one of them, and then I copied my `~/.ollama/` directory with all of its data from one computer to the other However, Ollama on the other computer still wants to connect to the internet when I try to run one of the models I copied. What other files do I need to copy from one computer to the other, in order for Ollama on the other computer to find the models?
GiteaMirror added the question label 2026-04-12 09:43:37 -05:00
Author
Owner

@ctsrc commented on GitHub (Aug 27, 2023):

PS: Both computers are running the same version of Ollama, but installed in different ways.

The first computer is running Ollama 0.0.16 installed via Homebrew

The second computer is running Ollama 0.0.16 downloaded from the zip file from the website.

<!-- gh-comment-id:1694670884 --> @ctsrc commented on GitHub (Aug 27, 2023): PS: Both computers are running the same version of Ollama, but installed in different ways. The first computer is running Ollama 0.0.16 installed via Homebrew The second computer is running Ollama 0.0.16 downloaded from the zip file from the website.
Author
Owner

@mxyng commented on GitHub (Aug 28, 2023):

Copying ~/.ollama/models should be sufficient.

  • What does ollama list output on the second computer?
  • How did you copy the directory? Over the network with scp/rsync or using an intermediary?
  • Is there content in ~/.ollama? You can check with du -h ~/.ollama.
<!-- gh-comment-id:1695817393 --> @mxyng commented on GitHub (Aug 28, 2023): Copying `~/.ollama/models` should be sufficient. - What does `ollama list` output on the second computer? - How did you copy the directory? Over the network with `scp`/`rsync` or using an intermediary? - Is there content in `~/.ollama`? You can check with `du -h ~/.ollama`.
Author
Owner

@ctsrc commented on GitHub (Aug 29, 2023):

Hi @mxyng

Second computer lists no models when I run ollama list.

ollama list
NAME	SIZE	MODIFIED 

Contents of ~/.ollama/ on second computer:

tree ~/.ollama/
/Users/user/.ollama/
├── history
├── id_ed25519
├── id_ed25519.pub
├── logs
│   └── server.log
└── models
    └── blobs
        ├── sha256:00a38ba21b68558208d171baa04e31c981d0d5d22ebf95446e5e5f9573dc2559
        ├── sha256:404e21afdc6a34316cb23740018284bff1d16a480db6f8f59f4d5626dfb73376
        ├── sha256:4351ca328c595edc24c4a5d5481c8645897c17488c2ef8880bcef8abe6a7136e
        ├── sha256:55b9a442394835eeb1356edb4f97e892369dee1dd60dcf1869a7e1e08ccecd42
        ├── sha256:578a2e81f7064c5118b93336dbe53dff6049bbeb4a8cee6c32a87579022e1aba
        ├── sha256:6dadd83719cf42ff86f49f5002995a1cddadbc1795335bc32a8d6d7ca105d088
        ├── sha256:796806e39a8fbeeeb1001d61138dad6019d1b42c3d352eaa739e2614c58c622a
        ├── sha256:7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d
        ├── sha256:8268242df6f07932d5e6ef3ea276dd61a1420f0515a5f0ecdc7f11cbbf6ddb7c
        ├── sha256:8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b
        ├── sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8
        ├── sha256:96862bb35d7760e607f893b81ddef58a0288de62aaf66200b3a0e99c3e4956e5
        ├── sha256:e35ab70a78c78ebbbc4d2e2eaec8259938a6a60c34ebd9fd2e0c8b20f2cdcfc5
        ├── sha256:e707461b94861228bb81092f6c60898eaf86719f5c1849a4c4d0cecea7c18f75
        └── sha256:fb3e48e5f845c9c420fe62210316d700f3171ea3d3fc6185b2e620e735e6c320

4 directories, 19 files

I used scp to begin the transfer, and because of a network interruption I used rsync to resume the transfer.
I then checked all of the sha256 hashsums of all of the transferred model files, and used scp to re-transfer one file that was bad.

When I execute ollama run llama2, I get the following.

ollama run llama2
pulling manifest
Error: pull model manifest: Get "https://registry.ollama.ai/v2/library/llama2/manifests/latest": dial tcp: lookup registry.ollama.ai: no such host

This is why I think that in addtion to ~/.ollama/ there is somewhere that ollama keeps a local copy of a list of models.

<!-- gh-comment-id:1698292519 --> @ctsrc commented on GitHub (Aug 29, 2023): Hi @mxyng Second computer lists no models when I run `ollama list`. ```zsh ollama list ``` ```text NAME SIZE MODIFIED ``` Contents of `~/.ollama/` on second computer: ```zsh tree ~/.ollama/ ``` ```text /Users/user/.ollama/ ├── history ├── id_ed25519 ├── id_ed25519.pub ├── logs │   └── server.log └── models └── blobs ├── sha256:00a38ba21b68558208d171baa04e31c981d0d5d22ebf95446e5e5f9573dc2559 ├── sha256:404e21afdc6a34316cb23740018284bff1d16a480db6f8f59f4d5626dfb73376 ├── sha256:4351ca328c595edc24c4a5d5481c8645897c17488c2ef8880bcef8abe6a7136e ├── sha256:55b9a442394835eeb1356edb4f97e892369dee1dd60dcf1869a7e1e08ccecd42 ├── sha256:578a2e81f7064c5118b93336dbe53dff6049bbeb4a8cee6c32a87579022e1aba ├── sha256:6dadd83719cf42ff86f49f5002995a1cddadbc1795335bc32a8d6d7ca105d088 ├── sha256:796806e39a8fbeeeb1001d61138dad6019d1b42c3d352eaa739e2614c58c622a ├── sha256:7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d ├── sha256:8268242df6f07932d5e6ef3ea276dd61a1420f0515a5f0ecdc7f11cbbf6ddb7c ├── sha256:8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b ├── sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8 ├── sha256:96862bb35d7760e607f893b81ddef58a0288de62aaf66200b3a0e99c3e4956e5 ├── sha256:e35ab70a78c78ebbbc4d2e2eaec8259938a6a60c34ebd9fd2e0c8b20f2cdcfc5 ├── sha256:e707461b94861228bb81092f6c60898eaf86719f5c1849a4c4d0cecea7c18f75 └── sha256:fb3e48e5f845c9c420fe62210316d700f3171ea3d3fc6185b2e620e735e6c320 4 directories, 19 files ``` I used scp to begin the transfer, and because of a network interruption I used rsync to resume the transfer. I then checked all of the sha256 hashsums of all of the transferred model files, and used scp to re-transfer one file that was bad. When I execute `ollama run llama2`, I get the following. ```zsh ollama run llama2 ``` ```text pulling manifest Error: pull model manifest: Get "https://registry.ollama.ai/v2/library/llama2/manifests/latest": dial tcp: lookup registry.ollama.ai: no such host ``` This is why I think that in addtion to `~/.ollama/` there is somewhere that ollama keeps a local copy of a list of models.
Author
Owner

@ctsrc commented on GitHub (Aug 29, 2023):

And here you can see that all of the sha256 sums of the model blob files are correct on the second computer

shasum -a 256 ~/.ollama/models/blobs/*
00a38ba21b68558208d171baa04e31c981d0d5d22ebf95446e5e5f9573dc2559  /Users/user/.ollama/models/blobs/sha256:00a38ba21b68558208d171baa04e31c981d0d5d22ebf95446e5e5f9573dc2559
404e21afdc6a34316cb23740018284bff1d16a480db6f8f59f4d5626dfb73376  /Users/user/.ollama/models/blobs/sha256:404e21afdc6a34316cb23740018284bff1d16a480db6f8f59f4d5626dfb73376
4351ca328c595edc24c4a5d5481c8645897c17488c2ef8880bcef8abe6a7136e  /Users/user/.ollama/models/blobs/sha256:4351ca328c595edc24c4a5d5481c8645897c17488c2ef8880bcef8abe6a7136e
55b9a442394835eeb1356edb4f97e892369dee1dd60dcf1869a7e1e08ccecd42  /Users/user/.ollama/models/blobs/sha256:55b9a442394835eeb1356edb4f97e892369dee1dd60dcf1869a7e1e08ccecd42
578a2e81f7064c5118b93336dbe53dff6049bbeb4a8cee6c32a87579022e1aba  /Users/user/.ollama/models/blobs/sha256:578a2e81f7064c5118b93336dbe53dff6049bbeb4a8cee6c32a87579022e1aba
6dadd83719cf42ff86f49f5002995a1cddadbc1795335bc32a8d6d7ca105d088  /Users/user/.ollama/models/blobs/sha256:6dadd83719cf42ff86f49f5002995a1cddadbc1795335bc32a8d6d7ca105d088
796806e39a8fbeeeb1001d61138dad6019d1b42c3d352eaa739e2614c58c622a  /Users/user/.ollama/models/blobs/sha256:796806e39a8fbeeeb1001d61138dad6019d1b42c3d352eaa739e2614c58c622a
7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d  /Users/user/.ollama/models/blobs/sha256:7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d
8268242df6f07932d5e6ef3ea276dd61a1420f0515a5f0ecdc7f11cbbf6ddb7c  /Users/user/.ollama/models/blobs/sha256:8268242df6f07932d5e6ef3ea276dd61a1420f0515a5f0ecdc7f11cbbf6ddb7c
8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b  /Users/user/.ollama/models/blobs/sha256:8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b
8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8  /Users/user/.ollama/models/blobs/sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8
96862bb35d7760e607f893b81ddef58a0288de62aaf66200b3a0e99c3e4956e5  /Users/user/.ollama/models/blobs/sha256:96862bb35d7760e607f893b81ddef58a0288de62aaf66200b3a0e99c3e4956e5
e35ab70a78c78ebbbc4d2e2eaec8259938a6a60c34ebd9fd2e0c8b20f2cdcfc5  /Users/user/.ollama/models/blobs/sha256:e35ab70a78c78ebbbc4d2e2eaec8259938a6a60c34ebd9fd2e0c8b20f2cdcfc5
e707461b94861228bb81092f6c60898eaf86719f5c1849a4c4d0cecea7c18f75  /Users/user/.ollama/models/blobs/sha256:e707461b94861228bb81092f6c60898eaf86719f5c1849a4c4d0cecea7c18f75
fb3e48e5f845c9c420fe62210316d700f3171ea3d3fc6185b2e620e735e6c320  /Users/user/.ollama/models/blobs/sha256:fb3e48e5f845c9c420fe62210316d700f3171ea3d3fc6185b2e620e735e6c320
<!-- gh-comment-id:1698295654 --> @ctsrc commented on GitHub (Aug 29, 2023): And here you can see that all of the sha256 sums of the model blob files are correct on the second computer ```zsh shasum -a 256 ~/.ollama/models/blobs/* ``` ```text 00a38ba21b68558208d171baa04e31c981d0d5d22ebf95446e5e5f9573dc2559 /Users/user/.ollama/models/blobs/sha256:00a38ba21b68558208d171baa04e31c981d0d5d22ebf95446e5e5f9573dc2559 404e21afdc6a34316cb23740018284bff1d16a480db6f8f59f4d5626dfb73376 /Users/user/.ollama/models/blobs/sha256:404e21afdc6a34316cb23740018284bff1d16a480db6f8f59f4d5626dfb73376 4351ca328c595edc24c4a5d5481c8645897c17488c2ef8880bcef8abe6a7136e /Users/user/.ollama/models/blobs/sha256:4351ca328c595edc24c4a5d5481c8645897c17488c2ef8880bcef8abe6a7136e 55b9a442394835eeb1356edb4f97e892369dee1dd60dcf1869a7e1e08ccecd42 /Users/user/.ollama/models/blobs/sha256:55b9a442394835eeb1356edb4f97e892369dee1dd60dcf1869a7e1e08ccecd42 578a2e81f7064c5118b93336dbe53dff6049bbeb4a8cee6c32a87579022e1aba /Users/user/.ollama/models/blobs/sha256:578a2e81f7064c5118b93336dbe53dff6049bbeb4a8cee6c32a87579022e1aba 6dadd83719cf42ff86f49f5002995a1cddadbc1795335bc32a8d6d7ca105d088 /Users/user/.ollama/models/blobs/sha256:6dadd83719cf42ff86f49f5002995a1cddadbc1795335bc32a8d6d7ca105d088 796806e39a8fbeeeb1001d61138dad6019d1b42c3d352eaa739e2614c58c622a /Users/user/.ollama/models/blobs/sha256:796806e39a8fbeeeb1001d61138dad6019d1b42c3d352eaa739e2614c58c622a 7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d /Users/user/.ollama/models/blobs/sha256:7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d 8268242df6f07932d5e6ef3ea276dd61a1420f0515a5f0ecdc7f11cbbf6ddb7c /Users/user/.ollama/models/blobs/sha256:8268242df6f07932d5e6ef3ea276dd61a1420f0515a5f0ecdc7f11cbbf6ddb7c 8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b /Users/user/.ollama/models/blobs/sha256:8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b 8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8 /Users/user/.ollama/models/blobs/sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8 96862bb35d7760e607f893b81ddef58a0288de62aaf66200b3a0e99c3e4956e5 /Users/user/.ollama/models/blobs/sha256:96862bb35d7760e607f893b81ddef58a0288de62aaf66200b3a0e99c3e4956e5 e35ab70a78c78ebbbc4d2e2eaec8259938a6a60c34ebd9fd2e0c8b20f2cdcfc5 /Users/user/.ollama/models/blobs/sha256:e35ab70a78c78ebbbc4d2e2eaec8259938a6a60c34ebd9fd2e0c8b20f2cdcfc5 e707461b94861228bb81092f6c60898eaf86719f5c1849a4c4d0cecea7c18f75 /Users/user/.ollama/models/blobs/sha256:e707461b94861228bb81092f6c60898eaf86719f5c1849a4c4d0cecea7c18f75 fb3e48e5f845c9c420fe62210316d700f3171ea3d3fc6185b2e620e735e6c320 /Users/user/.ollama/models/blobs/sha256:fb3e48e5f845c9c420fe62210316d700f3171ea3d3fc6185b2e620e735e6c320 ```
Author
Owner

@ctsrc commented on GitHub (Aug 30, 2023):

Looking again at the ~/.ollama/ directory of the original computer I see that in addition to the model blobs dir, there is also a model manifest dir, but that one was not transferred. So to fix it I just have to transfer the manifest files. (And also there is one model blob file I had not transferred either.)

Gonna transfer the remaining files and when I see it works I will close this ticket :)

<!-- gh-comment-id:1698310895 --> @ctsrc commented on GitHub (Aug 30, 2023): Looking again at the `~/.ollama/` directory of the original computer I see that in addition to the model blobs dir, there is also a model manifest dir, but that one was not transferred. So to fix it I just have to transfer the manifest files. (And also there is one model blob file I had not transferred either.) Gonna transfer the remaining files and when I see it works I will close this ticket :)
Author
Owner

@ctsrc commented on GitHub (Aug 30, 2023):

Transferred the missing files now. And then it works :)

List models

ollama list
NAME                  	SIZE  	MODIFIED      
codellama:latest      	3.8 GB	2 minutes ago	
llama2:70b            	39 GB 	2 minutes ago	
llama2:latest         	3.8 GB	2 minutes ago	
phind-codellama:latest	19 GB 	2 minutes ago	

Files now in ~/.ollama/

tree ~/.ollama/
/Users/user/.ollama/
├── history
├── id_ed25519
├── id_ed25519.pub
├── logs
│   └── server.log
└── models
    ├── blobs
    │   ├── sha256:00a38ba21b68558208d171baa04e31c981d0d5d22ebf95446e5e5f9573dc2559
    │   ├── sha256:404e21afdc6a34316cb23740018284bff1d16a480db6f8f59f4d5626dfb73376
    │   ├── sha256:4351ca328c595edc24c4a5d5481c8645897c17488c2ef8880bcef8abe6a7136e
    │   ├── sha256:55b9a442394835eeb1356edb4f97e892369dee1dd60dcf1869a7e1e08ccecd42
    │   ├── sha256:578a2e81f7064c5118b93336dbe53dff6049bbeb4a8cee6c32a87579022e1aba
    │   ├── sha256:6dadd83719cf42ff86f49f5002995a1cddadbc1795335bc32a8d6d7ca105d088
    │   ├── sha256:796806e39a8fbeeeb1001d61138dad6019d1b42c3d352eaa739e2614c58c622a
    │   ├── sha256:7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d
    │   ├── sha256:8268242df6f07932d5e6ef3ea276dd61a1420f0515a5f0ecdc7f11cbbf6ddb7c
    │   ├── sha256:8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b
    │   ├── sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8
    │   ├── sha256:96862bb35d7760e607f893b81ddef58a0288de62aaf66200b3a0e99c3e4956e5
    │   ├── sha256:cf6f6a8f514a49838cb753d869e8e61a2c68f19e6147f2e45f749da12486ed9e
    │   ├── sha256:e35ab70a78c78ebbbc4d2e2eaec8259938a6a60c34ebd9fd2e0c8b20f2cdcfc5
    │   ├── sha256:e707461b94861228bb81092f6c60898eaf86719f5c1849a4c4d0cecea7c18f75
    │   └── sha256:fb3e48e5f845c9c420fe62210316d700f3171ea3d3fc6185b2e620e735e6c320
    └── manifests
        └── registry.ollama.ai
            └── library
                ├── codellama
                │   └── latest
                ├── llama2
                │   ├── 70b
                │   └── latest
                └── phind-codellama
                    └── latest

And of course, the most important of all:

ollama run phind-codellama "write an efficient sudoku generator in Rust"

And it gave output :)

<!-- gh-comment-id:1698323654 --> @ctsrc commented on GitHub (Aug 30, 2023): Transferred the missing files now. And then it works :) List models ```zsh ollama list ``` ```text NAME SIZE MODIFIED codellama:latest 3.8 GB 2 minutes ago llama2:70b 39 GB 2 minutes ago llama2:latest 3.8 GB 2 minutes ago phind-codellama:latest 19 GB 2 minutes ago ``` Files now in `~/.ollama/` ```zsh tree ~/.ollama/ ``` ```text /Users/user/.ollama/ ├── history ├── id_ed25519 ├── id_ed25519.pub ├── logs │   └── server.log └── models ├── blobs │   ├── sha256:00a38ba21b68558208d171baa04e31c981d0d5d22ebf95446e5e5f9573dc2559 │   ├── sha256:404e21afdc6a34316cb23740018284bff1d16a480db6f8f59f4d5626dfb73376 │   ├── sha256:4351ca328c595edc24c4a5d5481c8645897c17488c2ef8880bcef8abe6a7136e │   ├── sha256:55b9a442394835eeb1356edb4f97e892369dee1dd60dcf1869a7e1e08ccecd42 │   ├── sha256:578a2e81f7064c5118b93336dbe53dff6049bbeb4a8cee6c32a87579022e1aba │   ├── sha256:6dadd83719cf42ff86f49f5002995a1cddadbc1795335bc32a8d6d7ca105d088 │   ├── sha256:796806e39a8fbeeeb1001d61138dad6019d1b42c3d352eaa739e2614c58c622a │   ├── sha256:7c23fb36d80141c4ab8cdbb61ee4790102ebd2bf7aeff414453177d4f2110e5d │   ├── sha256:8268242df6f07932d5e6ef3ea276dd61a1420f0515a5f0ecdc7f11cbbf6ddb7c │   ├── sha256:8c17c2ebb0ea011be9981cc3922db8ca8fa61e828c5d3f44cb6ae342bf80460b │   ├── sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8 │   ├── sha256:96862bb35d7760e607f893b81ddef58a0288de62aaf66200b3a0e99c3e4956e5 │   ├── sha256:cf6f6a8f514a49838cb753d869e8e61a2c68f19e6147f2e45f749da12486ed9e │   ├── sha256:e35ab70a78c78ebbbc4d2e2eaec8259938a6a60c34ebd9fd2e0c8b20f2cdcfc5 │   ├── sha256:e707461b94861228bb81092f6c60898eaf86719f5c1849a4c4d0cecea7c18f75 │   └── sha256:fb3e48e5f845c9c420fe62210316d700f3171ea3d3fc6185b2e620e735e6c320 └── manifests └── registry.ollama.ai └── library ├── codellama │   └── latest ├── llama2 │   ├── 70b │   └── latest └── phind-codellama └── latest ``` And of course, the most important of all: ```zsh ollama run phind-codellama "write an efficient sudoku generator in Rust" ``` And it gave output :)
Author
Owner

@tehlers320 commented on GitHub (Jan 7, 2024):

i still dont get this, ive done rsync -vatz ~/.ollama 10.0.0.101:/home/me/.ollama
to multiple PCs. I can never get this to show up. It never works.

<!-- gh-comment-id:1880142404 --> @tehlers320 commented on GitHub (Jan 7, 2024): i still dont get this, ive done ``` rsync -vatz ~/.ollama 10.0.0.101:/home/me/.ollama``` to multiple PCs. I can never get this to show up. It never works.
Author
Owner

@tehlers320 commented on GitHub (Jan 7, 2024):

Nevermind i got it, linux uses the shared folder not your local folder.

/usr/share/ollama/.ollama
<!-- gh-comment-id:1880149779 --> @tehlers320 commented on GitHub (Jan 7, 2024): Nevermind i got it, linux uses the shared folder not your local folder. ``` /usr/share/ollama/.ollama ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#201