
Overview
- 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.
Why Egress IPs Matter
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.
Static Egress IPs (App-Scoped)
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.Allocate an App-scoped Static Egress IP
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.
View and Manage
fly ips release-egress. They persist across Machine destruction and deployments.
Billing
Each app-scoped IPv4 static egress address costs $3.60/mo, billed hourly. IPv6 addresses are allocated alongside IPv4 and are not billed separately.Caveats
- 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.
We do not expect this to be a concern for most apps. However, feel free to talk to us if this limits your use case!
- When you have multiple static egress IPs assigned in one region, there is currently no way to specify exactly which IP each machine will use.
- There may be delays when egress IPs are applied to Machines:
- Right after allocating a new egress IP, it will be applied to all existing Machines in the region after a short delay. Allocating multiple pairs of static egress IPs will not help in this case.
- When creating a new Machine in an app that already has an egress IP assigned, there may be a delay before the Machine can use the egress IP. This delay may be more noticeable with more Machines or during bluegreen deployments. Allocating multiple pairs of static egress IPs can help alleviate this issue.
flyctlsurfaces warnings when these limits are approached during Machine creation, deployments, and IP management.
Best Practices
- Use static egress only when required.
- Test connectivity after assigning egress IPs.
- Monitor for failures during deploy-time migrations.