# OpenClaw Proxy Settings: Set proxy.proxyUrl

> OpenClaw proxy settings: proxy.proxyUrl or OPENCLAW_PROXY_URL with an HTTP proxy and login, the Gateway service, openclaw proxy validate and the usual errors.

[Home](https://quanticdata.io/) / [Integrations](https://quanticdata.io/integrations/) / OpenClaw

OpenClaw 2026.11 on macOS, Linux and Windows · HTTP · 4 steps

# OpenClaw Proxy Settings: Route the Gateway Through an HTTP Proxy

OpenClaw sends its outbound traffic through a proxy when proxy.proxyUrl is set in its config, or OPENCLAW_PROXY_URL in the environment. The value is an http:// forward proxy URL, and the login can sit inside it: http://USER: PASS@HOST: PORT. Set it, reinstall the Gateway service, then run openclaw proxy validate.

[Create an account](https://app.quanticdata.io/register?utm_source=integrations-openclaw&utm_medium=ai-twin&utm_campaign=site&utm_content=integrations-openclaw-hero) · [Jump to the steps](https://quanticdata.io/integrations/openclaw/#steps)

By [Aldo Morese](https://quanticdata.io/about/), founder of QuanticData · Published Dec 1, 2026

## Where the proxy goes in OpenClaw

The proxy.proxyUrl key of the OpenClaw config, set with openclaw config set, or the OPENCLAW_PROXY_URL environment variable

- **Proxy type**: HTTP: the URL starts with http://
- **Host**: proxy.proxyUrl, after the @
- **Port**: proxy.proxyUrl, after the host: 8080
- **Username**: proxy.proxyUrl, between // and the colon
- **Password**: proxy.proxyUrl, between the colon and the @

The dashboard line host: port: user: pass becomes http://user: pass@host: port: move the login in front and join it with an @.

## Set up the proxy in OpenClaw

Four commands on the machine that runs the OpenClaw Gateway. The key names and commands are the ones in the OpenClaw documentation; the values come from one line of the QuanticData dashboard.

1. 01

   ### Copy a sticky HTTP line

   In the QuanticData dashboard open your Residential Premium or Mobile plan, choose the country, Sticky and HTTP, and copy one line: HOST, PORT (8080), USER and PASS. A sticky line keeps one exit IP for its session, up to 24 hours: the session id and the length are part of the username, for example `USER-country-us-sid-k3f9a1b2c4-ttl-60m`.
2. 02

   ### Write the proxy URL into the config

   Run `openclaw config set` with the line written as one URL. The scheme describes the hop from OpenClaw to the proxy, so it is `http://` even for https:// sites: OpenClaw asks the proxy for a CONNECT tunnel and starts TLS to the site through it. The config value wins over the environment variable.

   ```
   openclaw config set proxy.proxyUrl "http://USER-country-us-sid-k3f9a1b2c4-ttl-60m:PASS@HOST:8080"
   ```

   OpenClaw treats credentials inside the URL as sensitive and redacts them from snapshots and logs. If PASS contains @, : or /, percent-encode those characters in the URL.
3. 03

   ### Reinstall and start the Gateway service

   For a Gateway installed as a service, the OpenClaw documentation reinstalls the service after the change and starts it again. For a one-off foreground run, the environment variable is enough.

   ```
   openclaw gateway install --force
   openclaw gateway start

   # or, for a foreground run only:
   OPENCLAW_PROXY_URL="http://USER-country-us-sid-k3f9a1b2c4-ttl-60m:PASS@HOST:8080" openclaw gateway run
   ```
4. 04

   ### Validate the route

   Run the built-in check from the same machine and user account that runs OpenClaw. Without options it fetches https://example.com/ through the proxy and makes sure the proxy does not reach a local test server; `--allowed-url` adds a page of your choice, here one that prints the exit IP.

   ```
   openclaw proxy validate --allowed-url https://ipinfo.io/json
   ```

   The command exits with code 1 when a check fails, and prints the proxy URL with the credentials redacted. Add --json for machine-readable output.

### Check it

Before and after, compare the exit IP from the Gateway machine: `curl https://ipinfo.io/json` shows your own address, `curl -x http://HOST:8080 -U "USER:PASS" https://ipinfo.io/json` shows the address, city and network of the QuanticData exit. If the second command fails, the line is the problem, not OpenClaw.

The config keys, commands and limits on this page are those of the OpenClaw documentation for version 2026.11.13, read on 1 December 2026; the sources are listed at the end of the page.

## What goes through the proxy, and what does not

With a proxy URL set, the processes that do the work route their normal HTTP and WebSocket traffic through it: `openclaw gateway run`, `openclaw node run`, `openclaw agent --local` and the local terminal UI. The routing covers fetch, node:http, node:https and the common WebSocket clients, including libraries that bring their own HTTP agent.

That means every outbound call of the runtime uses the line, the calls to the model provider included. On a plan billed by the gigabyte, that traffic counts towards the plan, and the provider sees the exit IP of the line.

- Local traffic stays direct: with the default `proxy.loopbackMode` value `gateway-only`, requests to localhost and 127.0.0.1 skip the proxy, so the Gateway control plane and the browser control port keep working.
- Do not switch `proxy.loopbackMode` to `proxy` with a remote proxy: the proxy would resolve 127.0.0.1 against itself and the local listeners would break.
- IRC is raw TCP and is not routed by the HTTP proxy. Raw sockets, native add-ons and programs that are not OpenClaw may bypass it unless they read the proxy environment variables themselves.
- Telegram uses its own HTTP client and reads the process proxy variables and `OPENCLAW_PROXY_URL` on its own.

## Installed service, .env file and containers

For a Gateway installed as a service (launchd, systemd or Scheduled Tasks), keep the URL in the config with `openclaw config set`, so it survives a reinstall. If you prefer the environment variable, put `OPENCLAW_PROXY_URL` in the service environment file, `~/.openclaw/.env` by default, and reinstall the service so it picks it up.

With `openclaw --container`, OpenClaw forwards `OPENCLAW_PROXY_URL` into the container. The URL must be reachable from inside the container: the QuanticData host is a public name, so the same line works there unchanged.

To keep the URL stored but stop using it, set `proxy.enabled` to `false`; removing the URL from the config and the environment turns proxy routing off.

## Which line to use with OpenClaw

An agent that logs in to sites or keeps a conversation with one service needs one address for the whole session: use a sticky line with a session length that covers the job, up to 24 hours, and a new session id when you want a new IP. The country is part of the username, so generate a line for the country the agent should appear from.

Residential Premium suits most agent work, from $4 for 1 GB (valid 30 days). Mobile, on 4G and 5G carrier IPs, suits sites that trust mobile networks more, from $5 for 1 GB (valid 90 days). Both use port 8080 for HTTP.

## OpenClaw proxy errors and fixes

The problems people report with OpenClaw and a proxy, and what to change.

- `openclaw proxy validate` reports a config problem: no URL is set in the config or the environment of that shell. Pass `--proxy-url "http://USER:PASS@HOST:8080"` for a one-off check, or set `proxy.proxyUrl` first.
- The allowed check fails with 407: the proxy refused the login. Copy USER and PASS again from the dashboard and percent-encode any @, : or / in the password.
- Nothing changes after setting HTTP_PROXY: older OpenClaw versions ignored HTTP_PROXY for most traffic (GitHub issue #2102). Use `proxy.proxyUrl` or `OPENCLAW_PROXY_URL`, which the current versions route through.
- WebChat or Codex fails after an upgrade with 502 Bad Gateway or "Handshake not finished": a restrictive loopback mode is forwarding local hops to the proxy. Run `openclaw doctor`, then `openclaw config set proxy.loopbackMode gateway-only` and `openclaw gateway restart`.
- A SOCKS5 address does not work: OpenClaw takes an http:// or https:// proxy URL. Use the HTTP port of the line, 8080.
- The exit IP changes during a task: the line is rotating. Generate a sticky line and reinstall the Gateway service with the new URL.
- Still failing: log in and ask Quantic AI in the dashboard. It tests your line from our side with your own login and tells you what the gateway answered.

## What to type: ports and the username

Copy the line from the dashboard (Proxies, your plan, the generator) rather than typing it: it already carries the host, the country, the session id and the session length. The table shows what each field holds.

| Plan | Copy it from | HTTP port | SOCKS5 port | Username shape |
| --- | --- | --- | --- | --- |
| Residential Premium | the generator | 8080 | 1080 | USER-country-us-sid-k3f9a1b2-ttl-30m |
| Mobile | the generator | 8080 | 1080 | USER-country-us-type-mobile-sid-a1b2c3-ttl-30m |
| Residential Basic | the generator | in the line | in the line | USER-country-us plus a session for sticky |
| Datacenter (per GB) | the generator | 9999 | 10000 | the line's username |
| IPv6 | the generator | 1001 | in the line | the line's username |
| ISP (dedicated IP) | the plan page, one line per IP | in the line | in the line | the line's own login |

The host and the password are in the same line. Pick HTTP or SOCKS5 in the tool and use the port of that column; a port from the other column is the most common reason a check fails. On Premium ISP city plans one port serves both types. USER and the session id stand for your own values.

[![QuanticData residential plan generator with country United States, Max pool, Sticky session of 30 minutes, HTTP, 10 sessions and the host:port:user:pass output format](https://quanticdata.io/integrations/img/buy/generator.webp?v=20261030a)](https://quanticdata.io/integrations/img/buy/generator.webp?v=20261030a)

*The plan page has the generator: country, pool, Sticky session with its TTL, HTTP or SOCKS5, then one line per profile in host:port:user:pass.*

The whole buying flow is on the [integrations page](https://quanticdata.io/integrations/#buy); to create lines from code, use the generate endpoint in the [API documentation](https://quanticdata.io/docs/).

## OpenClaw proxy questions

What people ask when they put a proxy into OpenClaw.

[Something else? Ask us](https://quanticdata.io/integrations/openclaw/#ask)

### How do I set a proxy in OpenClaw?

Run openclaw config set proxy.proxyUrl "http://USER: PASS@HOST: PORT", then openclaw gateway install --force and openclaw gateway start. For a foreground run you can set OPENCLAW_PROXY_URL instead; the config value takes precedence over the variable.

### Does OpenClaw support SOCKS5 proxies?

The proxy.proxyUrl setting takes an http:// or https:// forward proxy URL; the documentation does not list socks5://. With QuanticData, use the HTTP port 8080 of the same line.

### Does OpenClaw use HTTP_PROXY and HTTPS_PROXY?

The supported setting is proxy.proxyUrl or OPENCLAW_PROXY_URL. Older versions ignored HTTP_PROXY for most traffic; some parts, such as the Telegram client, also read the process proxy variables.

### How do I check that OpenClaw uses the proxy?

Run openclaw proxy validate --allowed-url https://ipinfo.io/json on the Gateway machine. It exits with code 1 if a check fails. Compare with curl -x to the same page: the exit IP should be the proxy, not your own address.

### Does the model provider traffic go through the proxy too?

Yes. With a proxy URL set, OpenClaw routes the outbound HTTP and WebSocket traffic of the runtime through it, model calls included; only localhost traffic stays direct in the default loopback mode.

### Which QuanticData plan works best with OpenClaw?

Residential Premium for most agent work, from $4 for 1 GB (valid 30 days); Mobile for sites that trust mobile carriers more, from $5 for 1 GB (valid 90 days). Use a sticky HTTP line so a task keeps one IP.

## More setup guides

- [Claude Code proxy settings](https://quanticdata.io/claude-code-proxy-settings/)
- [Proxies for AI agents](https://quanticdata.io/proxies-for-ai-agents/)
- [Proxy settings on Ubuntu](https://quanticdata.io/integrations/ubuntu/)
- [Fix 407 Proxy Authentication Required](https://quanticdata.io/blog/how-to-fix-407-proxy-authentication-required/)
- [All proxy integration guides](https://quanticdata.io/integrations/)
- [Residential proxies with sticky sessions](https://quanticdata.io/residential-proxies/)
- [Mobile proxies on carrier IPs](https://quanticdata.io/mobile-proxies/)

OpenClaw is an open-source project of its maintainers and is named to identify the tool only; QuanticData is not affiliated with it. The settings follow the OpenClaw documentation for version 2026.11.13, read on 1 December 2026.

Sources: [Network proxy, OpenClaw Docs](https://docs.openclaw.ai/security/network-proxy), [openclaw proxy CLI reference, OpenClaw Docs](https://docs.openclaw.ai/cli/proxy), [HTTP_PROXY is ignored, OpenClaw issue #2102](https://github.com/openclaw/openclaw/issues/2102).

## Give OpenClaw a residential IP

Create an account, buy Residential Premium from $4 for 1 GB or Mobile from $5 for 1 GB, copy a sticky HTTP line and set it as proxy.proxyUrl.

[Create an account](https://app.quanticdata.io/register?utm_source=integrations-openclaw&utm_medium=ai-twin&utm_campaign=site&utm_content=integrations-openclaw-closing) · [See the prices](https://quanticdata.io/residential-proxies/volume-pricing/)

Balance, crypto, card or PayPal · no VAT from the balance or crypto

---

Source: https://quanticdata.io/integrations/openclaw/ · Site index for AI: https://quanticdata.io/llms.txt
