# 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.

[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

Guides · Jul 30, 2026 · Updated Sep 3, 2026 · 5 min read · By [Aldo Morese](https://quanticdata.io/about/), founder of QuanticData

![An n8n HTTP Request node with its URL set to an IP-echo endpoint and the proxy entered under Options as http://USER:PASS@PROXY_HOST:PORT. The card shows the global option with environment variables: HTTPS_PROXY, HTTP_PROXY and NO_PROXY=localhost,127.0.0.1,n8n, set inside the container rather than the host shell.](https://quanticdata.io/blog/how-to-use-a-proxy-in-n8n/hero.webp?v=20261002s)

*An n8n workflow routes its HTTP Request node through a proxy endpoint to reach a target site*

On this page

- [Option 1: per-request in the HTTP Request node](https://quanticdata.io/blog/how-to-use-a-proxy-in-n8n/#option-1-per-request-in-the-http-request-node)
- [Option 2: globally with environment variables](https://quanticdata.io/blog/how-to-use-a-proxy-in-n8n/#option-2-globally-with-environment-variables)
- [The gotchas that actually trip people up](https://quanticdata.io/blog/how-to-use-a-proxy-in-n8n/#the-gotchas-that-actually-trip-people-up)
- [Testing that the proxy actually works](https://quanticdata.io/blog/how-to-use-a-proxy-in-n8n/#testing-that-the-proxy-actually-works)
- [Why you need a proxy in n8n at all](https://quanticdata.io/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](https://quanticdata.io/blog/how-to-use-a-proxy-in-n8n/#beyond-proxying-when-the-http-node-isn-t-enough)

For web search in the n8n Assistant that helps build workflows, follow the [QuanticData search adapter setup guide for Windows, macOS and Linux](https://quanticdata.io/blog/n8n-assistant-web-search-quanticdata/). It connects the Assistant through its SearXNG setting; HTTP Request proxy routing is configured separately below.

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.

**Run it on the free credit.** Every QuanticData account gets $2 of free API usage per month.

[Start free — $2/month included](https://quanticdata.io/signup/?utm_source=blog&utm_medium=website&utm_campaign=blog-lead&utm_content=how-to-use-a-proxy-in-n8n) · [Explore AI Web Scraping Service](https://quanticdata.io/ai-web-scraping-service/)

## 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@PROXY_HOST:PORT
```

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@PROXY_HOST:PORT
HTTPS_PROXY=http://USER:PASS@PROXY_HOST:PORT
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.

**Try it on your own targets.** Every QuanticData account gets $2 of free API usage per month.

[Start free — $2/month included](https://quanticdata.io/signup/?utm_source=blog&utm_medium=website&utm_campaign=blog-inline&utm_content=how-to-use-a-proxy-in-n8n) · [Explore AI Web Scraping Service](https://quanticdata.io/ai-web-scraping-service/)

## 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://quanticdata.io/signup/?utm_source=blog&utm_medium=website&utm_campaign=blog-end&utm_content=how-to-use-a-proxy-in-n8n) · [Explore AI Web Scraping Service](https://quanticdata.io/ai-web-scraping-service/)

## Related reading

- [httpx Proxy: Setup, Auth and the proxies= Fix](https://quanticdata.io/blog/httpx-proxy/): Proxies · The httpx proxy argument changed name, and most tutorials still teach the removed one. A version-by-version matrix, the exact exception text, and what the proxy sees on the wire.
- [Playwright Proxy: Setup, Auth and Bandwidth](https://quanticdata.io/blog/playwright-proxy/): Proxies · Playwright takes a proxy as an object, not a URL, and a browser pays for the whole page rather than the HTML. Per-context exits, the auth rules, the net errors, and measured bytes for seven real pages.
- [Shadowrocket Proxy Setup: The iPhone Guide](https://quanticdata.io/blog/shadowrocket-proxy-setup/): Proxies · Shadowrocket is a routing engine, not a VPN subscription. The add-server screen takes two minutes; the rules decide whether it is worth the money. Setup, config syntax, and measured exits.

---

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