Static IP guide
Making API requests with a static IP from a Node app on Railway
Railway's shared NAT means your service's outbound IP isn't fixed, which breaks allowlisting for any API partner that checks the caller's address. Fixie gives your Node service a fixed pair of IPs instead: add FIXIE_URL under the service's Variables tab and route axios through it.
Recommended setup
Use Fixie HTTP/S proxy 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 Railway
Create a Fixie HTTP/S proxy in the Fixie dashboard. Copy the proxy value into Railway Variables as FIXIE_URL, and copy the outbound IPs into the destination allowlist.
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
- If more than one service in the project calls the same allowlisted API, expose FIXIE_URL to them as a Shared Variable instead of pasting the value into each service.
- Changes made in the Variables tab are staged until you deploy;
railway variable set FIXIE_URL=<proxy-url>from the CLI has the same effect.
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 Railway.
- Run a small connection test before sending production traffic.
Related guides
- Making API requests with a static IP from a Node app on Heroku
- Making API requests with a static IP from a Python app on Railway
- Making API requests with a static IP from a Node app on Vercel
- Making API requests with a static IP from a Node app on Render
- Making API requests with a static IP from a Node app on Fly.io
- Making API requests with a static IP from a Node app on Koyeb
Related docs
Is this guide useful?