Static IP guide
Making API requests with a static IP from a Node app on Heroku
Heroku cycles dynos at least once a day, and every restart can land your app on a new outbound IP — which breaks integrations with payment processors, banking APIs, and any partner that allowlists callers by address. The Fixie HTTP/S add-on gives your Node app two IPs that never change, exposed through the FIXIE_URL config var that axios can use directly.
Recommended setup
Use Fixie HTTP/S Heroku add-on for HTTP and HTTPS requests to an API, webhook provider, or service that allowlists outbound IP addresses. Store the proxy value in FIXIE_URL, then configure Node.js to route outbound traffic through Fixie before connecting to API allowlisting.
Set up Fixie on Heroku
Heroku is a native Fixie marketplace flow. Install the Fixie HTTP/S Heroku add-on or attach it from the Heroku CLI. Heroku will create FIXIE_URL as a config var for the app.
Attach fixie to your Heroku app
Implementation
The example below shows the core application-side change. Keep credentials in environment variables and avoid committing proxy, database, or API secrets.
Make an HTTP request through FIXIE_URL
Good to know
- Attaching the add-on sets FIXIE_URL and restarts your dynos automatically, so no code deploy is needed to pick up the variable.
- HTTPS requests tunnel through the proxy with the CONNECT method, so TLS stays end-to-end and Fixie never sees request contents.
- If you use fetch instead of axios, wrap FIXIE_URL in an https-proxy-agent as shown in the JavaScript docs — Node's built-in fetch ignores proxy environment variables.
Allowlist and test the static IPs
- Open the Fixie dashboard and copy the outbound IP addresses for this proxy.
- Add both IPs to the API provider.
- Deploy the updated Node.js app on Heroku.
- Run a small connection test before sending production traffic.
Related guides
- Connecting to Postgres with a static IP from a Node app on Heroku
- Making API requests with a static IP from a Node app on Vercel
- Making API requests with a static IP from a Ruby app on Heroku
- Connecting to MySQL with a static IP from a Node app on Heroku
- Making API requests with a static IP from a Node app on Render
- Making API requests with a static IP from a Python app on Heroku
Related docs
Is this guide useful?