I have created a node in my laptop. Now I want my friend (from his home) to connect to the node I created. We are part of two different networks. How can these two nodes be connected in ethereum. What are the geth commands that I should use?

  • 2
    You can't! you can do only if both the systems are connected through local network. Though you can do it to create nodes on server and use it whenever you want
    – Div
    Aug 14 '18 at 10:46
  • So does that mean when i connect to public blockchain, does it mean i am connecting to some servers (servers that are connected to the actual nodes) but not actually all the peers in the network? Aug 14 '18 at 12:33
  • When a node is added as a participant in the blockchain network all nodes are in sync and connected Aug 14 '18 at 13:03
  • All participant nodes are like servers. There is not any Centralized server as such. Aug 14 '18 at 13:05
  • @asvisosila then how do i connect to someone that is not in my network? Aug 14 '18 at 16:11

You have two options:

  1. Open up port 303030 on your router, and provide your friend with your enode URL. Make sure to update it to include your public IP. This may not be possible depending on your ISPs settings, and how often your public IP changes (which can be fairly often for residential connections).
  2. You and your friend set up a VPN which allows you to communicate as if you were on the same local network, and use the enode URL via the VPN network

However, more often than not, you only need to connect to the RPC instead of the node directly. In that case, repeat the steps above with port 8545 instead.

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.