| title | Egress IP addresses |
|---|---|
| description | Allocate static egress IPs on Fly.io for third-party allowlists, with per-region app-scoped IPv4 and IPv6 pairs and their caveats. |
| source_url | https://fly.io/docs/networking/egress-ips/ |
- By default, outbound (egress) IPs from Fly Machines are unstable and may change.
- You can allocate static egress IPs for an app (both IPv4 and IPv6) via
fly ips allocate-egress. - App-scoped static egress IPs are per-region: you need one for each region where you have machines.
- Static egress IPs come with trade-offs: they cost more, and limit how many machines you can run at once.
Some external services—APIs, databases, payment providers—require allowlisting source IPs. Without static egress IPs, outbound IPs from Fly machines may change due to machine lifecycle or infrastructure changes.
- Machines often egress over IPv6 when the destination has an AAAA record and the application prefers it. For example,
curlwill try IPv6 first if available, then fall back to IPv4 if needed. Fly doesn’t force IPv6, but many apps will use it when it's available. - IPv4 traffic is NAT'd and may vary. This means the source IP address is rewritten by the host, and which IP you get can change depending on where the machine runs or is restarted.
- You need static egress if you're allowlisting IPs with third-party services.
App-scoped static egress IPs can be shared between multiple machines in a region belonging to the same app, and will not be deleted when machines are recreated.
fly ips allocate-egress --app <app-name> -r <region>This allocates a pair of static egress addresses, IPv4 and IPv6, for your app in a region.
If your app has Machines in multiple regions, you must allocate at least 1 app-scoped static egress IP address per region. Machines can only use static egress IPs that were allocated in their own region.
You can allocate multiple pairs of IPv4 and IPv6 static egress addresses in the same region. Machines will randomly choose a pair from all static egress IPs available in the region.fly ips list
fly ips release-egress <ip-address>App-scoped egress IPs are only released when you explicitly run fly ips release-egress. They persist across Machine destruction and deployments.
Each app-scoped IPv4 static egress address costs $3.60/mo, billed hourly. IPv6 addresses are allocated alongside IPv4 and are not billed separately.
- Each static egress IP can support up to 64 Machines. If you need more than 64 Machines in one region, you will need to allocate multiple static egress IPs.
- When using app-scoped static egress IPs, a Machine can make up to 1024 concurrent connections to each destination IP address. There is no limit on the total number of concurrent connections.
- Use static egress only when required.
- Test connectivity after assigning egress IPs.
- Monitor for failures during deploy-time migrations.
