ollama - ✅(Solved) Fix Ollama ignores http_proxy settings, but some models manifests supposed to be downloaded via plain HTTP [1 pull requests, 4 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15358Fetched 2026-04-08 02:52:14
View on GitHub
Comments
4
Participants
2
Timeline
7
Reactions
0
Timeline (top)
commented ×4cross-referenced ×1labeled ×1referenced ×1

Fix Action

Fixed

PR fix notes

PR #15365: server: respect http_proxy environment variables for all requests

Description (problem / solution / changelog)

Fixes: #15358

The HTTP client was created without explicit proxy configuration, causing HTTP requests to bypass proxy settings while HTTPS requests worked correctly. This affected users in corporate/proxied environments.

Add explicit http.ProxyFromEnvironment to the transport to ensure both HTTP and HTTPS requests respect the http_proxy, https_proxy, and no_proxy environment variables.

Changed files

  • server/images.go (modified, +10/-5)
  • server/images_test.go (modified, +65/-0)
RAW_BUFFERClick to expand / collapse

What is the issue?

When ollama is deployed behind proxy it unable to download some models. Example: time=2026-04-05T09:08:08.712-05:00 level=INFO source=images.go:877 msg="request failed: Get "http://registry.ollama.ai/v2/x/z-image-turbo/manifests/latest": dial tcp 172.67.182.229:80: connect: connection refused" It tries to reach destination directly as it uses plain http and ollama ignores http_proxy setting

Models which manifests are published via HTTPS works fine: pull model manifest: Get "https://registry.ollama.ai/v2/library/qwen3.5/manifests/latest"

Relevant log output

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.20.2

extent analysis

TL;DR

  • The issue can likely be resolved by configuring ollama to use the https protocol or setting the http_proxy environment variable to route traffic through the proxy.

Guidance

  • Verify that the http_proxy environment variable is set correctly and that ollama is configured to use it.
  • Check if the proxy server supports both http and https protocols and if there are any specific settings required for ollama to work behind the proxy.
  • Test downloading models using https to confirm that the issue is specific to http requests.
  • Consider setting the https_proxy environment variable as well to ensure that both http and https traffic is routed through the proxy.

Example

  • No specific code snippet is provided as the issue seems to be related to configuration and environment variables rather than code.

Notes

  • The issue seems to be specific to ollama version 0.20.2 and may not be present in other versions.
  • The fact that models published via https work fine suggests that the issue is related to the protocol used rather than the proxy configuration itself.

Recommendation

  • Apply workaround: Set the http_proxy and https_proxy environment variables to route traffic through the proxy, as this is a simpler and more immediate solution than upgrading ollama or modifying its configuration.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING