I am new to ethereum.And could you please tell me the proper use of addpeer to connect two nodes in a single machine.?

  • do not forget to add --nodiscover flag and also --maxpeers = 2 – Nulik Mar 1 '18 at 21:03

In the first terminal do the following command


It returns the enode url.Its a unique id for nodes to communicate with each other.

In the second terminal do the addPeer command.


To check if the node is successfully added using the following command :-


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.