
Choose per-node proxy routing vs. instance environment variables
n8n supports two distinct ways to send outbound traffic through an HTTP proxy, and mixing them up causes internal webhooks or third-party integrations to break silently.
The first option is per-node routing inside the HTTP Request node. Under Options -> Proxy, n8n lets you enter an HTTP proxy URL for that specific node. Per n8n's HTTP Request documentation, setting Options -> Proxy overrides global settings defined with HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY environment variables.
The second option is instance-wide routing via container or process environment variables (HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY). Note that n8n resolves environment proxy settings through proxy-from-env, where lowercase variables such as http_proxy take precedence over uppercase HTTP_PROXY if both are defined. Always set NO_PROXY for localhost, internal databases, and private webhook hosts so internal calls do not leave over a proxy.
| n8n configuration path | Best fit | Precedence and scope |
|---|---|---|
| HTTP Request node -> Options -> Proxy | Targeted lookups, Rotating Residential, or one node on Static ISP | Overrides global HTTP_PROXY / HTTPS_PROXY / ALL_PROXY for that node only |
| Environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) | Self-hosted workers where outbound integrations share one Static ISP egress | Applies instance-wide; lowercase http_proxy / https_proxy wins over uppercase |
| Separate local script triggered over CLI or REST | SOCKS5 transport or headless browser steps n8n HTTP Request does not handle | Configured directly in Playwright, curl, or Node code outside n8n |
The HTTP Request Options -> Proxy field expects an HTTP proxy URL, matching IPMusk Rotating Residential (http://USERNAME:PASSWORD@gate.ipmusk.com:31212) and HTTP endpoints on Static ISP or Datacenter.
Configure credentials without leaking passwords into node JSON
Every IPMusk proxy uses username and password authentication; IP allowlisting is not supported. Pasting http://USERNAME:PASSWORD@gate.ipmusk.com:31212 verbatim into Options -> Proxy works during quick local testing, but anyone who exports the workflow JSON or inspects shared execution logs can read that password in plaintext.
In production n8n workflows, read your proxy URL from an environment variable injected outside workflow definitions (or inject ephemeral connection items per job without committing secrets). On self-hosted n8n, remember that N8N_BLOCK_ENV_ACCESS_IN_NODE can restrict $env access inside expressions, so verify whether your instance permits {{ $env.IPMUSK_HTTP_PROXY }} or whether container-level HTTP_PROXY / NO_PROXY fits your security policy better.
The placeholder Docker environment block below shows container-level routing alongside NO_PROXY exemptions for internal traffic. Replace USERNAME, PASSWORD, HOST, and PORT with active credentials from your IPMusk workspace; the placeholders below cannot authenticate.
- Rotating Residential uses gate.ipmusk.com on port 31212, encoding country, optional available state, and rotating or sticky (1, 3, 10, or 30 minute) session flags in the generated username.
- Static ISP and Datacenter allocate dedicated host and port entries per IP for 30 or 90 day terms; keep per-IP credentials separate from the residential gateway.
- Before adding a URL to n8n, test the exact host, port, username, and password in IPMusk's free Proxy Checker (/tools/proxy-checker) to rule out typos.
environment:
- HTTP_PROXY=http://USERNAME:PASSWORD@gate.ipmusk.com:31212
- HTTPS_PROXY=http://USERNAME:PASSWORD@gate.ipmusk.com:31212
- NO_PROXY=localhost,127.0.0.1,postgres,redis,.internal
- N8N_BLOCK_ENV_ACCESS_IN_NODE=falseSet strict retry limits on HTTP 403, 407 and 429 responses
Automated workflows turn small network hiccups into expensive retry storms when Retry On Fail is left unconfigured or applied blindly to every failure code.
By default, n8n's HTTP Request node treats only 2xx responses as successful unless you enable Never Error (which returns the response regardless of status code so downstream nodes can inspect headers and status). Combining capped node retries with explicit status branching gives you clear stopping rules for the three status codes proxy workflows see most:
| Status code | Likely owner | Recommended n8n action |
|---|---|---|
| 407 Proxy Authentication Required | Proxy gateway rejected credentials | Do not retry. Fix USERNAME, PASSWORD, or host:port mismatch immediately. |
| 403 Forbidden | Proxy IP blocklist or target site access policy | Stop automatic retries. Log host and timestamp, check authorized access, and route via On Error output. |
| 429 Too Many Requests | Gateway or destination rate limit | Only retry idempotent GET/HEAD reads; honor Retry-After delay or limit Max Tries (for example 2 to 3) with Wait Between Tries. |
| 5xx / transient tunnel reset | Upstream network or destination overload | Allow short bounded retries on read-only steps; hand unresolved failures to an Error Trigger workflow. |
Do not configure automatic retries for state-changing POST requests unless your destination explicitly supports idempotency keys.
Wire Error Trigger and verify configuration shapes cleanly
As documented in n8n's error handling guide, assign a dedicated Error Workflow in Workflow Settings starting with an Error Trigger node. When a scheduled run stops because an IP pack expired or a target denied access, Error Trigger delivers the execution ID, node name, and error payload to your alert channel without blocking the next scheduled run.
For read-only checks that should isolate bad URLs instead of halting the whole batch, switch the HTTP Request node's On Error setting to Continue (using error output) and inspect the status code cleanly downstream. You can also run a quick Node.js syntax check on any helper expression before deploying it, or validate your placeholder URL format locally with the short script below (which performs no network request and stores no real password):
const raw = process.env.IPMUSK_HTTP_PROXY || "http://USERNAME:PASSWORD@gate.ipmusk.com:31212";
const parsed = new URL(raw);
if (!["http:", "https:"].includes(parsed.protocol) || !parsed.username || !parsed.password) {
throw new Error("Provide http(s) proxy URL with username and password");
}
console.log(JSON.stringify({ protocol: parsed.protocol, host: parsed.host, auth: "redacted" }));Sources checked
- n8n HTTP Request node documentation (Options -> Proxy precedence and Never Error behavior): docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest
- n8n Error Handling documentation (Workflow Settings, Error Trigger payload, Stop And Error): docs.n8n.io/build/flow-logic/handle-errors-gracefully
- IPMusk Proxy Error 407, 403 Forbidden, and 429 Too Many Requests troubleshooting guides: ipmusk.com/blog/proxy-error-407, ipmusk.com/blog/proxy-403-forbidden, and ipmusk.com/blog/proxy-429-too-many-requests
- IPMusk Rotating Residential, Static ISP, and free Proxy Checker documentation: ipmusk.com/docs/residential, ipmusk.com/docs/isp, and ipmusk.com/tools/proxy-checker
Documentation checked November 27, 2026. n8n node field labels can change across releases; confirm exact self-hosted env policies on your instance.
