The usual Ollama install needs the internet twice: once to fetch the installer and once to pull a model. A machine with no internet access cannot do either, so both have to happen on a connected machine first and travel over on a USB drive or another local transfer. The official Linux docs document a manual install that fits this exactly: download and extract the package, then start Ollama yourself, with no installer script involved.
Fetch the package on the connected machine
On a machine with internet access, download the official Linux package. The docs give the download and extract commands as the manual install:
curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz
While you are there, also pull the model the offline machine will use, so its files travel with the package:
ollama pull llama3.2
Copy the package file and the model store to the transfer drive. On Linux the models live in /usr/share/ollama/.ollama/models by default, and the air-gap guide copies that whole directory into its bundle. Check the copy arrived intact before you carry it over: the air-gap guide records a SHA-256 hash of each file on the connected machine and checks it again on the offline side.
Install it by hand on the offline machine
On the machine with no internet access, extract the package into /usr. This is the manual-install step from the official docs, minus the download:
sudo tar -C /usr -xzf ollama-linux-amd64.tgz
Then confirm the binary landed and runs:
/usr/bin/ollama --version
The convenience installer (curl -fsSL https://ollama.com/install.sh | sh) cannot work here, because it fetches the script and then the release package from ollama.com. The manual path is the one the air-gap guide uses offline: unpack the release package into /usr and write your own service unit.
Start it and restore the models
Start the server by hand to prove the install works before setting up a service:
ollama serve
Copy the model files you carried over into the Linux model directory, /usr/share/ollama/.ollama/models, and check Ollama sees them:
ollama list
For a machine that should start Ollama at boot, the docs describe adding it as a startup service: create a user and group for Ollama, create a service file in /etc/systemd/system/ollama.service that runs /usr/bin/ollama serve, then load and enable it with sudo systemctl daemon-reload and sudo systemctl enable ollama.
Try it: three checks from package to model
| Check | What you should see | What it means |
|---|---|---|
| Package copied | ollama-linux-amd64.tgz is on the offline machine and its hash matches the connected machine |
The transfer arrived intact |
| Binary runs | /usr/bin/ollama --version prints a version |
The manual install worked |
| Model listed | ollama list shows llama3.2 |
The carried-over model is usable offline |
Expected result. We checked the official Ollama Linux docs, which give the manual download and extract commands and the startup-service steps, and the air-gap guide, which gives the bundle, hash-check, and offline install steps. We did not install Ollama on an offline machine, copy a model store, or run the commands on this machine.
Limits
This guide covers Linux on amd64 only; the docs give a separate ARM64 package, ollama-linux-amd64.tgz replaced by the ARM64 package, for ARM64 machines. The manual install gives you the binary but no background service, so the service unit is a separate step. Updates need a new package carried over the same way; nothing on the offline machine can fetch one itself. We did not test any of this ourselves.
Sources
- Ollama Linux docs — manual install: download and extract the package, start with ollama serve, ARM64 package, adding Ollama as a startup service with a systemd unit
- Local AI Master — Air-Gapped AI Deployment — build a bundle on a connected machine, hash it, install offline by unpacking the release package into /usr and writing your own service unit, copy the model store
