What does binding a Rails Server to 0.0.0.0 buy you?

Binding to 0.0.0.0 tells the service to bind to all IP addresses on your machine. Rails server used to do this by default, but with 4.2 changed to binding only to localhost.

Basically if it’s only bound to localhost then it will only respond locally to either localhost or 127.0.0.1 which can’t work through a DNS service because it’s not a public IP address.

When you use 0.0.0.0 it will bind to localhost and to your routable IP address.

Leave a Comment