is it possible to test a smart contract on a private net with two or more nodes? With nodes I mean two different machines, either virtual or physical, doesn't really matter.

I tried running geth with the usual commands however, the two nodes didn't seem to find each other, as netstat did not show a connection between the two.

All running on the same local network.

What can I do to debug this?

1 Answer 1


You can connect nodes with the --bootnodes command line option of geth, or with the console command admin.addPeer. Check the documentation Connecting to the network.

  • Thanks, is admin.addPeer on both nodes?
    – fsp
    Jun 15, 2017 at 12:05
  • @fsp It is only needed in one of the nodes.
    – Ismael
    Jun 15, 2017 at 13:57

Your Answer

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

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