I was following this guide today https://medium.com/mercuryprotocol/how-to-create-your-own-private-ethereum-blockchain-dad6af82fc9f.

Right now I am at point where I have two geth nodes (gethn1 and gethn2) running locally on my machine. They are aware of each other and I was able to send a 100eth from an address on gethn1 -> address on gethn2.

What I want to do now is create a small web app. Given an address that exists on this private blockchain, this app would return a balance in that address.

I understand I could achieved this using the web3 library, but I am unsure of how to do this with a private blockchain.

1 Answer 1


It is a fairly straight forward process.

1) Tell geth to start the RPC interface and allow incoming requests,
2) Connect to the local node and use web3 to interact with the node.
3) Now call the APIs that you want explore on your blockchain.

In case above is not enough, feel free to check below article on the subject of matter.

  • im trying to do this but it keeps saying CONNECTION ERROR: Couldn't connect to node Feb 4, 2018 at 20:37
  • Show us your step-by-step approach, so we can reverse the answer to you :)
    – 6egic
    Feb 4, 2018 at 20:40
  • I figured it out. I was starting my geth server with --maxpeers 0 flag. Which was making it refused outside web3 connections. Feb 4, 2018 at 20:43
  • Ok great, let me know if you run into issues :-)
    – 6egic
    Feb 4, 2018 at 23:17

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.