Access Phoenix Dev in local network


I have started a phoenix app in developement mode via mix phx.server on my ubuntu machine and can access my app via localhost:4000.

Shouldn’t I be able to access it from my smartphone as well (as long as it is in the same local network) out of the box by using the ip of my ubuntu machine? gives me an ERR_CONNECTION_REFUSED.

When I open I get a page titled “Apache2 Ubuntu Default Page”.

The default config starts the server on when run in dev.
Just check you dev.exs and change http: [ip: {127, 0, 0, 1}, port: 4000] to http: [ip: {0, 0, 0, 0}, port: 4000].


That’s great, thank you.