How to get the server ip address?

Cowboy does bind to 0.0.0.0 (aka all interfaces) per default and cowboy is the web server used by phoenix.

As I already mentioned in How to bind phoenix app to specific ip address? you can of course change the IP to bind to. And as you can set a config, you can ask for its value as well.

2 Likes