IP-address of app instance

I’m wondering how I can get the IP-address of the instance of my app?

When I look in the control panel I see IPv4 address 66.51.XX.XX
When I SSH into my app and I do a curl (curl -v https://mijnip.net) I see IPv4 address 185.178.XX.XX.

My app connects to external API’s with IP whitelisting, it also connects to different services that are behind firewalls.

What is the correct way and the fastest way to get the IP of my app instance?

In addition to this, the IP changes every deployment.
Would definitely be great to see the IP of the instance in the CP.

As far as I know there haven’t been any further developments on adding this feature:

For now the closest thing you can do is get an IP range from Fly. Since (as you point out) the IP changes. e.g for ams

1 Like

Thank you for your reply.

Unfortunately whitelisting a range isn’t a option, I’m afraid my app won’t be compatible with Fly just yet then.

Hopefully this is something that will be possible in the future, I’ll be waiting patiently :slight_smile:


I don’t change my code and deploy again, it don’t change ip for app.

my problem is the ip assigned is blocked by GFW and it is strange my app’s server is located at Hongkong, but its ip come from Netherland

For anyone still wanting this, it’s added:
Announcement: Shared Anycast IPv4 - Fresh Produce - Fly.io