[Ethereum] Go Ethereum – get the enode before starting geth


I need to get the enode of my geth nodes before I start them up.. is there any way to do this via a command other than actually starting up the node ?

Best Answer

Using node hex in nodekey file under .ethereum/geth/nodekey and bootnode utility.

Assuming you are using Linux.

Check your nodekey hex :

$ cat ~/.ethereum/geth/nodekey

Then with bootnode utility :

$ bootnode -nodekeyhex 2ad3a9ccd99926514e77501c33c5fdbae6ecfdc6fc82853bc8f28772b13cd2df -writeaddress