How to properly configure HTTP proxy for Dify in Docker container (e.g., for OpenAI access in restricted regions)General Discussion #20173
zhihaoyang30
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
Issue Summary
I am trying to run Dify via Docker in a region where direct access to OpenAI, Hugging Face, and similar services is blocked. I’ve set up an HTTP proxy (e.g., Clash running on
127.0.0.1:7890
) on the host and confirmed that it works from the host machine.However, I’m unable to get Dify’s Docker container to route traffic through the proxy despite trying:
HTTP_PROXY
andHTTPS_PROXY
in the container environmentdocker-compose.yml
/etc/environment
or theDockerfile
Steps to Reproduce
docker-compose
with a working proxy on the hostExpected Behavior
Dify components inside the Docker container should route their outbound HTTP requests through the configured proxy (e.g., via
HTTP_PROXY
).Actual Behavior
All outbound connections fail with errors like:
'HTTPSConnectionPool(host=\'maps.googleapis.com\', port=443): Max retries exceeded with url 'xxx''
Request
Could you please provide:
Thanks in advance!
Environment:
Beta Was this translation helpful? Give feedback.
All reactions