5

I'm using Geth to set up a private ethereum network and this is the command:

$ geth --identity "MyTestNode" --datadir "SomeDir" init genesis.json --rpc --rpcaddr "localhost" --rpcport "8000" --rpccorsdomain "*" --port "30303" --nodiscover --ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpcapi "db,eth,net,web3" --autodag --networkid 1900 --nat "any" console 

But I'm getting that -rpc is provided but not defined and I don't know if everything else is correct.

2
  • 4
    The init and console are geth commands, you can only use once per geth invocation. You should split your command in two invocations: geth [params] init genesis.json, and then geth [other params] console
    – Ismael
    Jul 3 '17 at 17:33
  • 2
    The above comment is correct and should be submitted as an answer. Jul 3 '17 at 17:35
1

In GETH service the init and console are commands, you can't execute them togueter. you should use the init first then the console

i left a image about the geth structure

geth-structure

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.