I started the geth console with geth.exe attach http://IP:8545 and tried to set the etherbase with miner.setEtherbase(eth.accounts[0]) and then start the miner with miner.start(). I got the exception:

ReferenceError: 'miner' is not defined

Right now I only have this modules: Geth console modules

How can I add the miner module to to my standard connection command shown above?

1 Answer 1


Before starting mining you must need to set etherbase or coinbase. To set etherbase / coinbase use the follwing command -


If you don't set an etherbase address then you can not start mining.

Refer the following question to understand What is coinbase?

Refer the following documentation for more details -


Hope it helps!

  • 1
    I set the etherbase but i forgot to mention it in the question. My question is more on how can I add the miner module in the geth javscript console with my standard connection command: geth attach ip:8545?
    – Nightscape
    Commented Sep 24, 2018 at 7:57

Your Answer

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

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