The short answer
You cannot install Ollama or download a model on a computer that has no internet, so you do both on a computer that does, then carry the files over. In practice that means two things on a USB drive: the Ollama installer and the models folder that Ollama fills when you pull a model. Install the app on the offline computer, copy the folder to the place Ollama looks for models, and run the model.
One honest limit first. Ollama's documentation says where the app and models live and how to move the models folder, but it has no page about copying models between computers. The only official statement we found is a maintainer's comment on GitHub from March 2024. We did not test the copy step. What we did test is running models with no internet on an 8 GB Mac after they were downloaded, and that part is at the end.
Download the installer on the connected computer
On a Mac, Ollama's macOS page says the preferred method is to mount the ollama.dmg and drag the Ollama application to the system-wide Applications folder. Get the file from the download page at ollama.com/download.
On Windows, the docs call OllamaSetup.exe the easiest way to install. It needs no Administrator rights and installs in your home directory by default.
On Linux, the install script fetches files from the internet, so use the manual install. Ollama's Linux page gives this command for the package:
curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst | sudo tar x -C /usr
That command downloads and unpacks in one go. For an offline computer, our adaptation is to run only the curl part with -o ollama-linux-amd64.tar.zst on the connected machine, copy that file over, and run sudo tar x -C /usr on it there. That split is ours, not Ollama's. Other chips (AMD graphics cards, ARM64) have their own package names on the same page.
Pull the model on the connected computer
Ollama's own wording for this is "download a model before using it", and the command is:
ollama pull llama3.2
That model took 2.0 GB on disk in our test; the other one we used took 3.3 GB. Check a model's size on its page in Ollama's library before you pick a drive.
Copy the models folder to the offline computer
Where Ollama keeps models, per its FAQ:
| System | Models folder |
|---|---|
| macOS | ~/.ollama/models |
| Linux | /usr/share/ollama/.ollama/models |
| Windows | C:\Users\%username%\.ollama\models |
On our Mac that folder holds subfolders named blobs and manifests. Copy the whole models folder, not single files, and quit Ollama on both computers while you do it.
A maintainer answered the question on GitHub in March 2024: you can copy the models to the appropriate location on another system, even cross platform. The one warning is that going from Linux to Windows, the blob filenames may have to be changed. That comment sits in an old, closed issue and is not part of the docs, so treat the cross-platform case as unproven until you try it.
Format the USB drive as exFAT if you use both a Mac and a Windows computer. That is our advice, not Ollama's, and it is there because model files are large.
On Linux with the standard installer, the FAQ says the ollama user needs read and write access to the directory, and gives this command to hand it over:
sudo chown -R ollama:ollama <directory>
Or point Ollama at a different folder
If the models sit on an external drive and you would rather not copy them, set the OLLAMA_MODELS environment variable. The FAQ's wording: set OLLAMA_MODELS to the chosen directory. How you set it depends on the system.
On Windows, you set it in your user account through the environment variables dialog, then quit Ollama and start it again from the Start menu. On a Mac running the Ollama app, the FAQ says to use launchctl, then restart the Ollama application:
launchctl setenv OLLAMA_MODELS "/Volumes/YourDrive/ollama-models"
The OLLAMA_HOST example in the FAQ uses launchctl setenv that way; the path above is ours. On Linux as a systemd service, you add an Environment line with systemctl edit ollama.service, as the FAQ shows for other variables.
Check it works with the network off
Turn Wi-Fi off, open a web page to confirm that it fails, then run ollama run llama3.2 and ask something. In a second terminal, ollama ps lists the models loaded into memory, according to the FAQ. Our longer checklist is in the guide to running AI offline on a Mac.
What fails with no internet
Anything that downloads. Per the FAQ, Ollama pulls models from the Internet, so ollama pull fails offline, and so does the install script on Linux. The Mac and Windows apps download their own updates automatically, which simply will not happen.
Cloud models and web search also need a connection. Ollama can run in local only mode by disabling its cloud features, and the price is that you lose cloud models and web search. The FAQ says to set disable_ollama_cloud in ~/.ollama/server.json, or to use an environment variable called OLLAMA_NO_CLOUD, and then restart Ollama. We have not tried it.
If your model is a GGUF file you downloaded elsewhere, the import page covers that route. You write a Modelfile containing FROM /path/to/file.gguf and run ollama create my-model. The page warns that Ollama does not quantize GGUF models during import, so the file has to be ready to use.
What we saw running models offline
Our test ran Ollama 0.40.7 on an Apple M2 Mac with 8 GB of memory. Two small models ran one at a time, fully offline after download. They were already in ~/.ollama/models from the download step, so we never copied them anywhere.
Llama 3.2 3B answered fast: the first words appeared after about 2.5 seconds and a full answer took about 4 seconds. Its peak memory use was 2.5 GB. Gemma 3 4B peaked at 3.5 GB and was too slow, about 33 seconds before the first word, although the Mac already had 7.5 GB of swap in use from other work. Our conclusion for 8 GB machines was that the 3B model works only if few other apps are open.
Those results say nothing about the transfer steps above. If you try them, check the offline run on the target computer before you rely on it. For what to put next to the model, see our guide to an offline survival library.
Common questions
Can I install Ollama without internet?
Not directly. You download the installer and a model on a computer that is online, then carry both over on a USB drive. On Linux the install script needs the internet, so use the manual package instead.
Where does Ollama store its models?
On macOS the folder is ~/.ollama/models, on Linux /usr/share/ollama/.ollama/models and on Windows C:\Users\%username%\.ollama\models. Inside you find the subfolders blobs and manifests. Copy the whole models folder, not single files.
Can I copy Ollama models to another computer?
A maintainer said on GitHub in March 2024 that you can, even across platforms. It is not in the official docs and we did not test the copy step, so run the model on the target computer before you rely on it.
Can I run Ollama models from a USB drive?
Yes, set the OLLAMA_MODELS variable to the folder on the drive, then restart Ollama. For a drive that both a Mac and a Windows computer will read, we suggest exFAT, because model files are large.
What stops working when Ollama is offline?
Anything that downloads: ollama pull, the Linux install script and the automatic app updates. Cloud models and web search need a connection too, while a model already on the computer keeps running.