# How to Use a Proxy in n8n

> Use a proxy in n8n two ways: per-request in the HTTP Request node, or globally via HTTP_PROXY env vars. Setup, the common gotchas, and rotating proxies for scraping.

[Home](https://quanticdata.io/)/[Blog](https://quanticdata.io/blog/)/How to Use a Proxy in n8n

# How to use a proxy in n8n: HTTP Request node, env vars and rotation

GuidesJul 30, 2026·5 min read·QuanticData Team

On this page [Option 1: per-request in the HTTP Request node](/blog/how-to-use-a-proxy-in-n8n/#option-1-per-request-in-the-http-request-node) [Option 2: globally with environment variables](/blog/how-to-use-a-proxy-in-n8n/#option-2-globally-with-environment-variables) [The gotchas that actually trip people up](/blog/how-to-use-a-proxy-in-n8n/#the-gotchas-that-actually-trip-people-up) [Testing that the proxy actually works](/blog/how-to-use-a-proxy-in-n8n/#testing-that-the-proxy-actually-works) [Why you need a proxy in n8n at all](/blog/how-to-use-a-proxy-in-n8n/#why-you-need-a-proxy-in-n8n-at-all) [Beyond proxying: when the HTTP node isn't enough](/blog/how-to-use-a-proxy-in-n8n/#beyond-proxying-when-the-http-node-isn-t-enough)

n8n has two ways to route traffic through a proxy: set it per-request inside the HTTP Request node's options, or set it globally for the whole instance with the standard `HTTP_PROXY` / `HTTPS_PROXY` environment variables. Per-node is right when only some workflows need a proxy; global is right when everything should route through one. Both take about a minute once you know the gotchas.

## Option 1: per-request in the HTTP Request node

This is the usual choice — you proxy the specific requests that need it (usually scraping or geo-restricted calls) and leave the rest direct. In the HTTP Request node, open **Options → Proxy** and enter your proxy URL with credentials inline:

```
http://USER:PASS@pr.quanticdata.io:7777
```

That is the whole configuration for that node. Every request the node makes now exits through the proxy. If your provider gives a rotating endpoint, each request automatically gets a fresh IP; if you need the same IP across a multi-step workflow, use a sticky-session endpoint instead. Duplicate the node or set the proxy on each HTTP Request node that needs it.

## Option 2: globally with environment variables

To route the entire n8n instance through a proxy, set standard proxy environment variables where n8n runs — in your Docker Compose, systemd unit or shell:

```
HTTP_PROXY=http://USER:PASS@pr.quanticdata.io:7777
HTTPS_PROXY=http://USER:PASS@pr.quanticdata.io:7777
NO_PROXY=localhost,127.0.0.1
```

Restart n8n and every outbound HTTP request — from every node — routes through the proxy. The `NO_PROXY` line matters: without it, n8n's own internal and localhost calls also try to go through the proxy, which breaks webhooks and local integrations. This global approach is cleaner for a scraping-focused instance where you want everything proxied by default.

## The gotchas that actually trip people up

The n8n community forum is full of "my proxy config doesn't work" threads, and the causes are almost always one of these:

| Symptom | Cause | Fix |
| --- | --- | --- |
| Proxy ignored entirely | Env vars set in the wrong place (shell vs container) | Set them where the n8n process actually runs — inside the Docker container's environment, not the host shell |
| Webhooks break after adding proxy | Global proxy catches localhost calls | Add `NO_PROXY=localhost,127.0.0.1,n8n` |
| Auth fails / 407 | Special characters in password not URL-encoded | URL-encode the credentials in the proxy string |
| HTTPS sites fail, HTTP works | Only `HTTP_PROXY` set | Set `HTTPS_PROXY` too — most targets are HTTPS |

The single most common one is the first: in a Dockerized n8n, environment variables have to be passed to the container (in `docker-compose.yml` under `environment:`), not exported in your terminal where they never reach the process.

## Testing that the proxy actually works

Before pointing a proxy at your real target, confirm it is routing as expected — this saves hours of debugging a workflow that silently ignored the config. Add a temporary HTTP Request node (or a manual execution) that calls an IP-echo endpoint like `https://ipinfo.io/ip` through the proxy, and check that the returned IP is the proxy's exit, not your server's. Run it twice: on a rotating endpoint you should see two different IPs, confirming rotation; on a sticky endpoint the same IP twice. If the echoed IP is still your server's address, the proxy is being ignored — recheck where the env vars are set (container vs host) or that the node's proxy field is populated. This two-minute test is the difference between "my scraper works" and "my scraper has been hitting the target from one bare IP the whole time and I just got banned."

## Why you need a proxy in n8n at all

Most people reach for this because an n8n workflow that scrapes or hits an API at volume starts getting blocked or rate-limited — the target sees many requests from your server's single IP and throttles it. Routing through a proxy, especially a [rotating one](https://quanticdata.io/rotating-proxies/), spreads those requests across many IPs so no single address trips a limit. For scraping defended sites you want [residential IPs](https://quanticdata.io/residential-proxies/) that look like real users; for high-volume calls to tolerant targets, cheaper datacenter IPs are fine. Match the network to how hard the target blocks — we break down the choice in [what is a rotating proxy](https://quanticdata.io/blog/what-is-a-rotating-proxy/).

## Beyond proxying: when the HTTP node isn't enough

A proxy fixes the IP problem, but the HTTP Request node still only sees raw HTML — it can't render JavaScript or parse messy pages into clean data. When your n8n scraping workflow hits a JS-heavy site or you're tired of writing HTML-parsing expressions, point the HTTP Request node at a [scraping API](https://quanticdata.io/web-scraping-api/) instead of the target directly: you get back clean Markdown or structured JSON, with the proxy, rendering and anti-block handled server-side. One HTTP Request node, a JSON body with the URL, and the response is ready-to-use data — no proxy config, no parsing. For workflows that discover and collect across whole sites, the same endpoint offers [crawl and map](https://quanticdata.io/crawl-map/), and AI-driven n8n flows can call the [web-data API](https://quanticdata.io/web-data-api-for-ai/) as a tool. That turns a fragile scraping workflow into a reliable one, which is usually why people were fighting the proxy config in the first place.

### Sources & further reading

- [n8n Community — How can I use proxy in HTTP Request](https://community.n8n.io/t/how-can-i-use-proxy-in-http-request/)

- [n8n docs — HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)

## FAQ

Quick answers on how to use proxy in n8n.

[Something else? Ask us →](mailto:hello@quanticdata.io)

### How do I set a proxy for a single node in n8n?

Open the HTTP Request node, go to Options → Proxy, and enter your proxy URL with credentials inline, like http://user:pass@host:port. Only that node's requests route through the proxy; other nodes stay direct. Add the proxy to each HTTP Request node that needs it, or use env vars to proxy everything.

### Why doesn't my n8n proxy environment variable work?

Almost always because it's set in the wrong place. In a Dockerized n8n, HTTP_PROXY and HTTPS_PROXY must be passed to the container (in docker-compose.yml under environment:), not exported in your host shell where the n8n process never sees them. Also set both HTTP and HTTPS versions, and add NO_PROXY for localhost.

### How do I stop a global n8n proxy from breaking webhooks?

Set NO_PROXY=localhost,127.0.0.1,n8n so n8n's internal and localhost calls bypass the proxy. Without it, a global HTTP_PROXY/HTTPS_PROXY also routes webhook and local-integration traffic through the proxy, which breaks them. NO_PROXY carves out the hosts that must stay direct.

### Do I need a rotating proxy for n8n web scraping?

If your workflow sends many requests to one target, yes — a rotating proxy spreads them across many IPs so the target doesn't rate-limit or ban your server's single address. For a few requests it's overkill. Use residential IPs for defended sites and datacenter for tolerant, high-volume targets.

### Can n8n scrape JavaScript-heavy websites?

The HTTP Request node only fetches raw HTML, so client-side-rendered content is invisible to it. Point the node at a scraping API that renders JavaScript and returns clean Markdown or JSON instead of hitting the target directly — you get usable data with proxy, rendering and anti-block handled server-side, and no parsing in n8n.

## Turn a fragile n8n scrape into a reliable one

Point your HTTP Request node at the scraping API: clean Markdown or JSON back, with proxy, rendering and anti-block handled. Pay per success, $2 of free usage every month — no proxy config needed.

[Start free — $2/month included](https://app.quanticdata.io/register)[Explore AI Web Scraping Service](https://quanticdata.io/ai-web-scraping-service/)

## Related reading

[Web scraping Is Web Scraping Legal in Europe? The EU has no anti-scraping law, but four layers draw the lines: the GDPR, the database right, the DSM text-and-data-mining exception, and unfair-competition rules. Read →](https://quanticdata.io/blog/is-web-scraping-legal-in-europe/) [MCP & agents How to Create an MCP Server Pick the SDK, define tools with clear schemas, choose a transport, test in a client — plus the tool-description rules that decide whether a model actually calls it. Read →](https://quanticdata.io/blog/how-to-create-an-mcp-server/) [Data for AI How to Feed Data to an LLM Context window, RAG, tool calls or fine-tuning — the four ways to give an LLM your data, how each works, when to pick it, and how to keep the source fresh. Read →](https://quanticdata.io/blog/how-to-feed-data-to-an-llm/)

---

Source: https://quanticdata.io/blog/how-to-use-a-proxy-in-n8n/ · Site index for AI: https://quanticdata.io/llms.txt
