How to Use a Proxy in the n8n HTTP Request Node
By the ProxyV4 Engineering Team · Updated:
There are two ways to send n8n HTTP Request traffic through a proxy: add the Proxy option to an individual HTTP Request node, or, on a self-hosted instance, set the HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables so node traffic goes through it by default. The node option overrides the environment variables. A static proxy gives your workflows one fixed exit IP that partner APIs and firewalls can allow.
Set a proxy in the n8n HTTP Request node
Use the node option when only some requests should leave through the proxy, for example calls to one partner API that only accepts traffic from a registered IP. Everything else in the workflow keeps using your server's normal connection.
Add the Proxy option
Open the HTTP Request node and, under the node's options, choose Add Option, then Proxy. n8n's documentation describes this option as the way to specify an HTTP proxy for the request, and states that it takes precedence over any proxy set through environment variables. Exact labels and their position in the panel vary by version.
Enter the proxy as a URL: http://IP:PORT. The n8n docs do not show an example value, so after saving, run the node against an IP echo endpoint (shown below) to confirm the request really goes through the proxy. You can also put the URL in an environment variable and reference it with an expression such as {{ $env.PROXY_URL }}, provided your instance allows workflows to read environment variables.
Username and password in the proxy URL
ProxyV4 proxies use username and password login and are delivered as ip:port:user:pass. Rearrange that line into a URL with the credentials before the host:
http://USER:[email protected]:8080If the username or password contains characters such as @, :, / or #, percent-encode them (@ becomes %40, : becomes %3A), otherwise the URL is split in the wrong place and the proxy answers with 407 Proxy Authentication Required. Use the http:// scheme even when the target is an https:// URL: the HTTPS request is tunneled through the HTTP proxy.
n8n proxy settings for a whole self-hosted instance
If most outbound traffic should use the proxy, set it once in the environment instead of on every node. n8n's deployment environment variables include HTTP_PROXY (for plain HTTP requests), HTTPS_PROXY (for TLS requests), ALL_PROXY (a fallback for both when the specific ones are not set) and NO_PROXY, a comma-separated list of hosts that should be reached directly. According to the docs, these apply to HTTP traffic from nodes. If both lowercase and uppercase forms are set, the lowercase form (http_proxy) wins, so check for stray lowercase variables on the host when a setting seems to be ignored.
Community and third-party nodes may use their own HTTP clients, so test any node you depend on rather than assuming it follows these variables. On n8n Cloud you do not manage the instance environment, so use the per-node option there.
Docker Compose
Add the variables to the n8n service. List every internal service name in NO_PROXY so calls to your database, queue or other containers do not go out through the proxy. General container proxy notes are in the Docker proxy setup guide.
services:
n8n:
image: docker.n8n.io/n8nio/n8n
restart: unless-stopped
ports:
- "5678:5678"
environment:
- HTTP_PROXY=http://USER:[email protected]:8080
- HTTPS_PROXY=http://USER:[email protected]:8080
- NO_PROXY=localhost,127.0.0.1,postgres,redis
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:Restart the container after changing the environment (docker compose up -d). Keep the credentials out of version control, for example in an .env file that Compose reads.
npm install or systemd
For an npm installation, export the variables in the shell that starts n8n, or put them in the Environment= lines of your systemd unit:
export HTTP_PROXY="http://USER:[email protected]:8080"
export HTTPS_PROXY="http://USER:[email protected]:8080"
export NO_PROXY="localhost,127.0.0.1"
n8n startVerify the exit IP inside a workflow
Add a test HTTP Request node with these settings and run it manually:
Method: GET
URL: https://proxyv4.com/api/my-ip
Options > Proxy: http://USER:[email protected]:8080
Options > Timeout: 15000The endpoint returns JSON with the caller's ip and country code. The ip should be your proxy's address, not your n8n server's. If you see the server's IP, the option was not saved on that node or the environment variables did not reach the n8n process. You can compare against the my IP tool opened from your own machine. The Timeout option is in milliseconds and limits how long the node waits for the response to begin.
Common errors and what they mean
A 407 means the proxy rejected the credentials: check spelling and percent-encoding. ECONNREFUSED usually means the port is wrong or the proxy is not listening on it; if you switched the proxy between HTTP and SOCKS5 modes in the ProxyV4 dashboard, the port can change, so copy the line again. ETIMEDOUT points to a firewall between your n8n host and the proxy, or an unreachable proxy; the proxy timeout guide lists the checks.
For transient failures, the node's settings include retry options (labeled along the lines of Retry On Fail, Max Tries and Wait Between Tries; labels vary by version) and an On Error setting that lets the workflow continue. Use a sensible wait between tries, and do not retry a 429 faster than the API's Retry-After allows.
Why workflow automation needs a static IP
Many business APIs, payment gateways, ERPs and databases only accept connections from IP addresses you register with them. If your n8n instance runs on a cloud host whose outbound address can change, or behind a shared address, those integrations break when the IP moves. Routing just those calls through a static proxy gives them one address to register, independent of where n8n runs.
A fixed exit IP also helps when a workflow must see a service as it appears in a specific country, and when you want each client's automations to leave from a separate address.
Where a private IPv4 proxy fits n8n, and where it does not
For API calls to partners that allow-list your IP, a private datacenter IPv4 proxy is a straightforward fit. ProxyV4 sells them in seven countries (United States, Vietnam, Japan, South Korea, Singapore, United Kingdom and Hong Kong), one tenant per IP for the whole term. The IP stays the same while the proxy is active and when you renew before expiry, so the address you registered keeps working. Static ISP proxies in the United States and Vietnam are available where a consumer ISP address is needed. Traffic on both is unmetered.
Every proxy supports HTTP(S) and SOCKS5 with username and password; per order you choose HTTP only, SOCKS5 only or both on the same port. The n8n option and environment variables are documented for HTTP proxies, so use HTTP mode for n8n. Access to the proxy itself is by username and password; if you have a question about other login methods, ask support through a ticket.
It is not a fit if a workflow needs a new IP on every request (rotating proxies are waitlist only), mobile carrier IPs, or IPv6, which is sold separately as IPv6 proxies. Check live prices and start with a single IP for the integration that needs it.
Frequently asked questions
Can different HTTP Request nodes use different proxies?
Yes. The Proxy option is set per node, so each node can use its own proxy, or none. The node setting takes precedence over the instance's environment variables.
Does the n8n HTTP Request node support SOCKS5 proxies?
n8n documents the option as an HTTP proxy and does not mention SOCKS5, so use the proxy's HTTP mode. ProxyV4 lets you run HTTP and SOCKS5 on the same port if other tools need SOCKS5.
Why is my HTTPS_PROXY variable ignored?
Common causes are a lowercase https_proxy set on the host, which takes precedence, a container that was not restarted, or a node that uses its own HTTP client. Check the exit IP with a test node.
Will my exit IP change when I renew the proxy?
No. Renewing before the proxy expires keeps the same IP, so the address your partners allow-listed keeps working.
What if the proxy cannot connect after I buy it?
A proxy that fails for a technical reason, such as not connecting or showing the wrong location, is covered by the refund policy and credited to your account balance.
Give automations an allow-listable exit IP
A private IPv4 proxy gives selected n8n requests one fixed exit address, the same IP on renewal and unmetered traffic. Order a single IP for the integration that needs it.
Get a static IP