I want to connect to a different machine remotely for the node server I run windows server, but I don't know what to do.

ı want use Websocket use for connect : WS://SERVERIP

1 Answer 1


Whether the websocket is available or not is dependent on a few things:

  1. What options are used when running the geth command to run your node on the server. You should use the flags below to define that geth should use a websocket and define the address and port where it should be available.
  --ws                                Enable the WS-RPC server
  --ws.addr value                     WS-RPC server listening interface (default: "localhost")
  --ws.port value                     WS-RPC server listening port (default: 8546)
  --ws.api value                      API's offered over the WS-RPC interface
  --ws.origins value                  Origins from which to accept websockets requests
  1. You should make sure the port that you select is not blocked by your firewall and is open to the outside world.

Warning: If you are opening your node to the outside world, you are potentially opening yourself up to risk. You'll want to check that you are not using any unlocked accounts with value. You may also want to add specific origins that you want to allow and make sure your firewalls are conf

  • geth --cache 4096 --rpc --rpcaddr "" --rpccorsdomain "" --rpcport "8545" --rpcapi "db, eth, net, web3, personal" --ws --wsport 8546 --wsaddr "" --wsorigins "" --wsapi "web3, eth" --maxpeers=100 I use this code to provide a node connection, but I cannot access it from any machine from the outside.I have permissions through the firewall ports opening.only ı use windows firewall Commented Dec 29, 2020 at 8:15
  • You need to add a wild card in --wsorigins '*' to allow from anywhere rather than an empty string- Note: this is not this most secure option - you'd be better to list where you are connecting from.
    – Steven V
    Commented Dec 29, 2020 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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