axios (which n8n uses for web requests) uses the HTTPS_PROXY and/or HTTP_PROXY env variables according to its readme.
According to this it might be worth checking to see if the PORT that you are setting in -e HTTP_PROXY=http://PROXY_IP:PORT is explicitly set to 80. If so, try leaving the port off and letting it use the default http port (which is still port 80) with just -e HTTP_PROXY=http://PROXY_IP
Thank you. I tried that and I got the following error:
{
"errorMessage": "The service refused the connection - perhaps it is offline",
"errorDetails": {
"rawErrorMessage": [
"connect ECONNREFUSED PROXY_IP:80",
"connect ECONNREFUSED PROXY_IP:80"
],
"httpCode": "ECONNREFUSED"
},
"n8nDetails": {
"nodeName": "HTTP Request1",
"nodeType": "n8n-nodes-base.httpRequest",
"nodeVersion": 4.2,
"itemIndex": 0,
"time": "11/04/2025, 10:28:30",
"n8nVersion": "1.86.1 (Self Hosted)",
"binaryDataMode": "default",
"stackTrace": [
"NodeApiError: The service refused the connection - perhaps it is offline",
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:991:19)",
" at processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:1147:20)"
]
}
}
As an additional info, this happens with the OpenAI interface. I’m using for example a Google Mail component to send out some automated emails in my workflow and the connection to my Google API works fine.
Of course My company also uses a socks5 proxy which has solved some connectivity issues in other applications in the past, but I’m not sure if this is supported in n8n? It’s the same IP with a different port.
There is an open feature request for socks5 proxy support that mentions openai specifically. I didn’t see anything that would help you but it might be worth up-voting, and it might confirm your suspicions about what isn’t working.