0

I run a light node on a windows 10 machine on my network with the command:

geth --syncmode="light" --cache=4096 -http --http.port 8545 --http.corsdomain "*" -http.api "eth,web3,personal" console

The windows 10 machine has the local IP address of 192.168.1.28

When I run a web3 request through the windows machine using the endpoint: http://localhost:8545 it works perfectly. Once I run the same request on another machine on the network using the endpoint http://192.168.1.28:8545 the request won't go through.

Any way I can resolve this issue?

Thanks for the help

0

Geth binds to localhost by default. To allow outside machines to connect, you can add something like this to the parameters:

--http.addr "0.0.0.0"

See the Geth documentation for all possible options.

3
  • Thank you. I am encountering the same issues with web sockets but --ws.addr "0.0.0.0" won't solve it this time. Any remedy? Jan 18 at 0:22
  • Try setting ws.origins as well, e.g. --ws.origins "*". Also note that websockets run on port 8546, rather than 8545 by default.
    – Morten
    Jan 18 at 0:44
  • Thanks, it now works! Jan 18 at 12:07

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.