How to bind to 0.0.0.0 instead of localhost for Docker purposes

I am currently trying to wrap the entire Node in a Docker container. However substrate when i run it runs on localhost. I cannot seem to find a way to bind it to 0.0.0.0 since Docker doesn't play too nice binding to localhost due to the nature of VMs being intermediary for a lot of environments.

1

3 Answers

Turns out substrate has two flags needed to bind to that interface. --ws-external and --rpc-external. Both of those will allow that.

Use --ws-external / --rpc-external, you may also need to specify --rpc-cors all if you want to access it from the web

What do you mean by the entire node?

You should be able to bind it like this: --port 0.0.0.0:80:80 or use --network host ()

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like