Behind a corporate proxy, ollama pull can fail even though the browser works, because the proxy has to be set in the server environment, not in your terminal. There is also a version trap: before Ollama 0.40.6 the model files themselves skipped the proxy, so pulls failed on networks where only the proxy could reach the internet.
What you need
- Ollama installed behind a proxy
- The proxy address from your network administrator
- Permission to edit the Ollama service settings on Linux, or to restart the app
Step 1: Set the proxy in the server environment
Set HTTPS_PROXY to the proxy address in the Ollama server environment, for example HTTPS_PROXY=https://proxy.example.com. On Linux, set it with systemctl edit for the ollama service rather than export in a terminal, because the service does not read your shell. Install the proxy certificate as a system certificate if the proxy requires one.
Step 2: Update Ollama if the pull stalls after pulling manifest
Check the version with ollama -v. Up to 0.40.5, GGUF model files bypassed the proxy and the pull failed with a resolving error; since 0.40.6 the files go through the proxy as well, so updating fixes that failure.
Step 3: Retry the pull and confirm
Run ollama pull for a small model and confirm it completes, then run ollama list to check the model is installed.
Worked example: synthetic proxy pull
The table below is a synthetic example. It shows the expected result of fixing a proxy pull; no pull was run.
| Check | Before | After fix |
|---|---|---|
| Proxy in server env | Not set | HTTPS_PROXY set |
| Ollama version | 0.40.5 | 0.40.6 or later |
| ollama pull llama3.2 | Fails after pulling manifest | Completes |
| ollama list | Model missing | Model listed |
Expected result (UNTESTED). with the proxy in the server environment and Ollama updated past 0.40.6, the pull completes and the model appears in ollama list. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- Use the proxy address your network administrator gives you; a guessed proxy address will not work.
- The proxy certificate must be installed as a system certificate, or downloads will fail on certificate checks.
- In Docker, pass the proxy with -e HTTPS_PROXY when you start the container.
