Why Heroku dynos have no fixed IP
Apps on the Common Runtime share one multi-tenant network per region. Heroku does not publish a fixed outbound address for these dynos, so you cannot reliably allowlist them. Apps in a Private Space use a stable set of outbound IPs.
Check first that the IP rule is really what blocks you: ask the database or API owner for the rejected connection in their firewall log.
Your options
- Heroku Private Spaces: all outbound traffic from apps in the space leaves from a small, stable set of IPs. Available for verified Heroku Teams and Heroku Enterprise.
- A static IP add-on such as QuotaGuard Static or Fixie on Heroku Elements: requests go through the add-on’s fixed IPs. As of November 2026 their cheapest paid plans cost about $5 a month, with usage limits by plan.
- A dedicated-IP proxy you choose: send only the requests that need allowlisting through your own server. Useful when you want an address only you use, the same IP for your team and other platforms, or no request quotas.
Option 1: find your Private Space outbound IPs
- In the Dashboard, open the space and its Network tab, or use the CLI:
heroku spaces:info --space my-space-nameYou should see: a line starting withOutbound IPs:listing the addresses. - Allowlist every address shown. All team members can view them; only team administrators can change the space.
Use your own static IP from a Common Runtime dyno
- Log in to the client area, open My Services and click your server. Scroll to Use your IP from code, n8n, CI or a browser. Under Add a proxy user, type
herokuand click Add.
You should see: a new card namedapp-heroku. Names can use letters and digits only, and MazeVPN adds theapp-prefix. - On that card, click Copy next to HTTPS proxy (marked Encrypted). The copied URL contains the password, so paste it only into a secret or environment variable, never into code.
The card of a new proxy user. The eye icon shows the password; Copy copies the full URL with the password. (Server IP replaced with an example.) You should see: a URL likehttps://app-heroku:…@203.0.113.42:443, where the address is your server’s IP. - In the Heroku Dashboard, open the app and click the Settings tab.
- In the Config Vars section, click Reveal Config Vars.
- Enter
MAZE_PROXY_URLas the Key, paste the URL as the Value and click Add. Heroku restarts the app and creates a new release whenever a config var changes.
You should see: the variable in the list and a new release under Activity. - Or do the same with the Heroku CLI:
heroku config:set MAZE_PROXY_URL='https://app-heroku:PASSWORD@203.0.113.42:443' --app my-app - Pass the proxy only to the calls that reach the allowlisted service. In Python with requests (tested with requests 2.34 through a real MazeVPN HTTPS proxy):
import os, requests PROXY = os.environ["MAZE_PROXY_URL"] def partner_orders(): r = requests.get( "https://api.example.com/v1/orders", proxies={"http": PROXY, "https": PROXY}, timeout=10, ) r.raise_for_status() return r.json()
Test it, then update the allowlist
- Start a one-off dyno and check the IP through the proxy:
heroku run bash --app my-app curl -s --proxy "$MAZE_PROXY_URL" https://ifconfig.me/ip; echoYou should see: your server’s IP. - Make one real read-only request to the partner. Also test worker and scheduler dynos that call the same service, then remove the old entries.
Official references
- Heroku Private Spaces
- Working with Private Spaces
- Heroku config vars
- QuotaGuard Static on Heroku Elements
- Fixie on Heroku Elements
Skip the setup
A dedicated IPv4 in 38 cities, usually ready about 3 minutes after payment. Connect devices with WireGuard and apps with an authenticated HTTPS, HTTP, or SOCKS5 proxy. From $9.99/month.