Deploy and run
Static outbound IPs
Send an app's outbound requests from fixed IP addresses, for APIs and databases that only accept allow-listed callers.
Some services only accept requests from addresses you've registered with them, like banks, payment APIs and some managed databases. Turn on static outbound IPs and your app's outgoing requests come from fixed addresses you can give them.
How to do it: open the app's Settings, turn on Static outbound IPs, and give the listed addresses to the service you're calling.
It costs a small amount per hour while it's on.
Some services only accept requests from addresses you've told them about: banks and payment APIs, partner APIs, managed databases with IP allow-lists. Apps on shared servers don't have a fixed address of their own. Turn on static outbound IPs and the app's outbound traffic leaves from the operator's fixed addresses instead.
GET /v1/egress
PUT /v1/services/:id/static-egress {"enabled": true}GET /v1/egress lists the addresses and the price. Turning it on restarts the running version (with no downtime) and returns the addresses to add to the other service's allow-list. It's charged per hour while the app runs (sleeping apps aren't charged), from project credit. Owners and admins can turn it on.
Only outbound traffic changes. Requests to the app still arrive at its usual address.
When to use it
- Allow-listed APIs. Payment processors, banks, exchanges and many partner APIs ask for the addresses you'll call them from. Give them every address
GET /v1/egresslists: traffic may leave from any of them. - Databases outside CLI. A managed Postgres or MongoDB elsewhere that only accepts known addresses can allow CLI's instead of being open to the internet.
- Webhooks you send. Some receivers check where a webhook came from. Tell them the same addresses.
You don't need it for calls between services in the same project (they use the private network) or for public APIs that don't check addresses.
Checking it works
Call an address-echo service from the app, for example with cli_exec or the console: curl -s https://api.ipify.org. With static IPs on, it prints one of the addresses above. If it prints something else, the restart may still be in progress; check the service's latest deploy.
For operators
Set CLI_EGRESS_IPS (comma-separated, shown to users) and CLI_EGRESS_NETWORK, a Docker network whose traffic the host sends out from those addresses. For example, on each server:
docker network create --subnet 172.30.0.0/24 cli-egress
iptables -t nat -I POSTROUTING -s 172.30.0.0/24 ! -d 172.30.0.0/24 -j SNAT --to-source 198.51.100.10CLI_EGRESS_PRICE_PER_HOUR sets the price in micro-USDC (default 5,000, about $3.65 a month). Agents use cli_static_ip.