In here it's said we need to run below command line to let Metamask connect to geth:

 geth --rpc --rpccorsdomain="chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn"

I'm running a private blockchain and when I run the above command line it tries to synchronise and it takes a very long time. It looks like it is connecting to a real blockchain network which I don't need right now.

Obviously, I need Metamask, as I want to write my own user interface that can interact with my private blockchain (or smart contract).

Question: Do I need to run the above (or any other) command line to let Metamask connect to geth when I'm using a private blockchain?


If I got you correctly, To connect metamask to geth:

  • Open Metamask
  • Click on Networks Tab ( where you see 'Main Ethereum Network')
  • If you are running geth on localhost:8080, choose option localhost:8080 from dropdown. Else,
  • Choose option Custom RPC from the dropdown
  • Enter RCP address and Port of geth node inside New Network input box (eg, http://localhost:8013)
  • Your metamask is connected with ypur geth node

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.