🇪🇺 Fixed outbound IP for Node.js apps

🇪🇺 Static IP for Node.js

Your Node.js app's API calls keep getting blocked because your cloud platform rotates IPs and breaks the whitelist. Route fetch, axios, and got through two fixed EU IPs with one HTTPS_PROXY env var.

server.js

// .env

HTTPS_PROXY=https://user:pass@eu-01.outboundgateway.com:8443

const { HttpsProxyAgent } = require('https-proxy-agent');

const agent = new HttpsProxyAgent(process.env.HTTPS_PROXY);

const res = await fetch('https://api.partner.eu/data', {

  headers: { 'Authorization': 'Bearer ..' }, agent

});

The Problem

Node.js apps deployed on cloud platforms get dynamic outbound IPs. When your app calls a partner API that enforces IP whitelisting, those rotating IPs get blocked.

Partner APIs enforce IP allowlisting

Payment providers, CRMs, and enterprise APIs require IP whitelisting. When your Node.js app's cloud deployment gets a new outbound IP on every deploy, the whitelist breaks and API calls fail silently.

Cloud platforms rotate IPs

Whether you deploy Node.js on Heroku, Kubernetes, AWS, Vercel, or Railway, the outbound IP changes with every deploy or scale event. You can't predict what IP your app will call from.

Dev, staging, and prod all differ

Your Node.js project has multiple environments, each with its own dynamic IP. Managing separate whitelists for dev, staging, and production is a maintenance nightmare.

No native static IP in Node.js

Node.js itself doesn't provide a static outbound IP feature. The IP depends entirely on where you deploy it. You need an external proxy to give your app a predictable egress.

The Solution

Set one env var. All outbound calls route through your static EU IP.

Node.js fetch (Node 18+), axios, and got all support HTTPS proxy via https-proxy-agent. Set HTTPS_PROXY once and every outbound call leaves through your fixed EU IPs.

No code rewrite. Set HTTPS_PROXY and wire https-proxy-agent into your HTTP client.
Two fixed EU IPs with automatic failover. If one goes down, the other takes over.
TLS passthrough. The proxy never sees your traffic. API keys and payloads stay encrypted.

Implementation

Wire https-proxy-agent into your HTTP client. One line, done.

Node.js fetch (Node 18+)

Node's native fetch doesn't read HTTPS_PROXY by default. Pass the proxy explicitly with https-proxy-agent.

// npm install https-proxy-agent
// .env: HTTPS_PROXY=https://user:pass@eu-01.outboundgateway.com:8443

const { HttpsProxyAgent } = require('https-proxy-agent');

const agent = new HttpsProxyAgent(process.env.HTTPS_PROXY);

// Every fetch call routes through your fixed EU IP
const res = await fetch('https://api.partner.eu/data', {
  headers: { 'Authorization': 'Bearer ..' },
  agent,
});

axios

If you use axios, pass the agent globally so every request is covered.

const axios = require('axios');
const { HttpsProxyAgent } = require('https-proxy-agent');

axios.defaults.httpsAgent = new HttpsProxyAgent(process.env.HTTPS_PROXY);

// All axios calls now route through your fixed EU IP
const { data } = await axios.get('https://api.partner.eu/data', {
  headers: { 'Authorization': 'Bearer ..' },
});

Docker / Kubernetes / env

Set it wherever your Node.js app runs.

# Docker Compose
services:
  node:
    env_file: .env

# Kubernetes: Secret
env:
  - name: HTTPS_PROXY
    valueFrom:
      secretKeyRef:
        name: outboundgateway-proxy
        key: proxy-url

Two IPs, automatic failover

Your account comes with two static IP addresses (for example 51.xx.xx.10 and 51.xx.xx.11). Whitelist both on your partner API. If one proxy node is briefly unavailable, traffic shifts to the other.

📖 Complete Documentation: For detailed examples, error handling, and other JavaScript libraries, see the Node.js SSL Proxy Guide and all other language guides.

Why Node.js developers choose OutboundGateway

A pair of fixed IPs

Two addresses to whitelist, with automatic failover. No rotating cloud pool to chase.

Minimal code changes

Add https-proxy-agent and wire it in. Your existing fetch, axios, and got calls work as-is.

EU-hosted

European data centres and a GDPR-conscious setup, giving your Node.js app a predictable EU address.

Works everywhere

Docker, Kubernetes, Heroku, Vercel, Railway, AWS, GCP. One env var covers every deployment.

Encrypted end to end

TLS passthrough means the proxy can't read your traffic. API keys and payloads stay private.

Flexible plans

Starting from €19/month. Flexible plans for every scale. Cancel anytime.

Give your Node.js app a static EU IP

Stop letting dynamic IPs break your partner API integrations. Set one env var and your outbound calls route through two fixed EU IPs.

€19/month starter plan • 7-day refund policy • Direct founder support

Frequently Asked Questions

Does Node.js native fetch (Node 18+) support HTTPS_PROXY?

Node's built-in fetch (powered by undici) does not read HTTPS_PROXY by default. You need to pass a HttpsProxyAgent as the agent option to each fetch call. Alternatively, you can configure undici's global dispatcher. With https-proxy-agent, one line covers every request.

Does this work with axios and got too?

Yes. For axios, set axios.defaults.httpsAgent to your HttpsProxyAgent once, and every request is covered. For got, pass the agent in the options. Both libraries support the standard agent pattern.

What if my Node.js app runs behind Express or Fastify?

The proxy works at the HTTP client level, not the web server level. Whether you run Node.js with Express, Fastify, Koa, or NestJS, as long as your outbound HTTP calls use fetch, axios, or got with the proxy agent, they route through your fixed EU IPs.

Still deciding?

Happy to talk through how a two-IP EU egress fits your Node.js project.

Contact Our Founders →