> ## Documentation Index
> Fetch the complete documentation index at: https://www.agent37.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Static outbound IP

> Give an instance a fixed outbound IP address, so a database, API or firewall that only accepts known addresses lets it in.

An instance's outbound IP address can change. When a database, an API or a company firewall only accepts addresses on its allow list, send the instance's traffic through a proxy that has a static IP. The other side sees the proxy's address, and that is the address you put on the list.

Any proxy provider with static IPs works. [QuotaGuard Static](https://www.quotaguard.com/) is one: you get a proxy URL with a username and password in it, and two static IP addresses to allow.

## Set the proxy on the instance

Put the proxy URL in [`env`](https://www.agent37.com/docs/agents-api/instance-environment) when you create the instance:

```bash theme={null}
curl -X POST https://api.agent37.com/v1/instances \
  -H "Authorization: Bearer $AGENT37_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "env": {
      "HTTPS_PROXY": "http://USER:PASSWORD@proxy.example.com:9293",
      "HTTP_PROXY": "http://USER:PASSWORD@proxy.example.com:9293",
      "NO_PROXY": "localhost,127.0.0.1",
      "NODE_USE_ENV_PROXY": "1"
    }
  }'
```

Programs in the instance read `HTTPS_PROXY` and `HTTP_PROXY` and send their requests through the proxy. `NO_PROXY` lists the hosts that stay direct: the instance's own services, plus any you add, such as `api.agent37.com` for [managed services](https://www.agent37.com/docs/agents-api/managed-services.md). `NODE_USE_ENV_PROXY` makes Node.js follow the same variables, on Node.js 22.21 or 24.5 and later.

Check the address with one [exec](https://www.agent37.com/docs/agents-api/exec.md):

```bash theme={null}
curl -X POST https://sandbox.agent37.app/v1/instances/ab12cd34ef/exec \
  -H "X-Agent37-Key: $AGENT37_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "command": "curl -s https://api.ipify.org" }'
```

`stdout` is one of your proxy's static addresses.

## What goes through the proxy

Each program reads the variables itself, so your scripts need no code change.

| Program | Goes through the proxy |
| - | - |
| curl, git, npm, pip | Yes |
| Python (`requests`, `httpx`, `urllib`) | Yes |
| Node.js (`fetch`, `http`, `https`) | Yes, with `NODE_USE_ENV_PROXY` set |
| `wget`, and curl on an `http://` URL | Only with the lowercase names |
| Browsers | Only when you pass the proxy at launch |
| Databases, SSH, and other connections that are not HTTP | No |

`env` names are uppercase, and `wget` reads only the lowercase ones, as does curl for an `http://` URL. Set them in the command:

```bash theme={null}
export http_proxy=$HTTP_PROXY https_proxy=$HTTPS_PROXY no_proxy=$NO_PROXY
wget -qO- https://api.ipify.org
```

## Browsers

Chromium reads the proxy from the environment but ignores the password in the URL, so pages do not load. Pass the proxy and its login when you launch the browser:

```python Playwright (Python) theme={null}
import os
from urllib.parse import urlsplit
from playwright.sync_api import sync_playwright

proxy = urlsplit(os.environ["HTTPS_PROXY"])

with sync_playwright() as p:
    browser = p.chromium.launch(proxy={
        "server": f"{proxy.scheme}://{proxy.hostname}:{proxy.port}",
        "username": proxy.username,
        "password": proxy.password,
    })
    page = browser.new_page()
    page.goto("https://api.ipify.org")
    print(page.inner_text("body"))
    browser.close()
```

```javascript Playwright (Node.js) theme={null}
import { chromium } from "playwright";

const proxy = new URL(process.env.HTTPS_PROXY);

const browser = await chromium.launch({
  proxy: {
    server: `${proxy.protocol}//${proxy.host}`,
    username: proxy.username,
    password: proxy.password,
  },
});
const page = await browser.newPage();
await page.goto("https://api.ipify.org");
console.log(await page.innerText("body"));
await browser.close();
```

```javascript Puppeteer theme={null}
import puppeteer from "puppeteer";

const proxy = new URL(process.env.HTTPS_PROXY);

const browser = await puppeteer.launch({
  args: [`--proxy-server=${proxy.protocol}//${proxy.host}`],
});
const page = await browser.newPage();
await page.authenticate({ username: proxy.username, password: proxy.password });
await page.goto("https://api.ipify.org");
console.log(await page.evaluate(() => document.body.innerText));
await browser.close();
```

## One command only

To send one program through the proxy and leave the rest of the instance direct, keep the URL in `env` under a name of your own, such as `PROXY_URL`, and set the variables on that command:

```bash theme={null}
HTTPS_PROXY=$PROXY_URL NODE_USE_ENV_PROXY=1 node sync.js
```

## Databases and other connections

A database driver, an SSH client, and anything else that does not speak HTTP opens its own connection and ignores these variables. Those need your provider's SOCKS5 endpoint or its tunnel tool. QuotaGuard's is [QGTunnel](https://www.quotaguard.com/docs/qgtunnel/).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.