How do I find the IP address for the actual instance my app is deployed on? Use case: I am connecting to an external database and for security i need to only open the firewall port to a specific IP or range. Keeping the database port wide open is a security risk. I already tried the hostname IP and that is not it since the db connection doesnt work with it. it works when i keep the firewall wide open so the issue is not the connection.
From what I can see in the screenshots, there’s a straightforward solution. While there might be more elegant methods, I found that adding:
&& curl "https://api.ipify.org?format=json"
to the end of your build command allows you to see the IP address in the logs.
Screenshot 2 confirms this works, showing the IP address (35.223.152.63) displayed in the logs.
You’re the boss!
I hope the IP doesn’t change after deployment though. Replit needs to make this a bit easier or suggest an approach if they don’t publicize IPs of the deployed instances. Many apps will need to access outside services that may be behind a firewall
The IP does change with new deployments. Have you found a workaround to this?
Unfortunately no…the IP changes. So although I built on replit I had to move the applications and host them elsewhere.


