I am trying to connect geth to a private blockchain running parity nodes and I don't know how. Some of my research leads me to this page: how to connect "Kovan" or "Rinkeby" from geth

They mention the "--chain" option. But I don't see that option here: https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options

Can anyone tell me what --chain is? Can anyone tell me if that is the same as the genesis file?

Thank you.

  • Kovan and Rinkeby are public test network, not private ones. Concentrate opinions and suggestions to your real question (ethereum.stackexchange.com/questions/16866/…) and close this one. Commented Aug 30, 2017 at 11:09
  • I know that they are public test networks. That does not change anything. And thank you for the suggestion but I think it is always better to break questions down into little pieces. Especially since my main question has not been answered, perhaps because it has too many pieces in it.
    – stone.212
    Commented Sep 1, 2017 at 5:54

2 Answers 2


There is no --chain option for geth. You can build geth and start it at private blockchain, as follows:

  1. Install go

  2. Clone go-ethereum project by git clone https://github.com/ethereum/go-ethereum.git

  3. Rebuild all commands by make all. For example geth
  4. Test whether everything is ok. ./build/bin/geth --datadir=./dev/data0 --networkid 2 console. At first you should create directory ./dev/data0 to save chain data. If Ok, now you have entered geth console on private blockchain.

If you want to use genesis.json custom some properties, as follows:

1: create a simple genesis.json file

    "config": {
        "chainId": 10,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    "difficulty": "0x400",
    "gasLimit": "2100000",
    "alloc": {
        "e2e7f3b19889d7a3ada2afaf80b6e4e2b2f8fd35": { "balance": "30000000000000000000000" }

2: then execute geth init command:

build/bin/geth --rpc --rpcport "8080" --rpccorsdomain "*" --datadir "./dev/data0" --port "30303" --nodiscover --rpcapi "db,eth,net,web3"
--networkid 1 init ./dev/genesis.json

Hope it helps~

  • Um thank you for trying but no it doesn't help. It doesn't relate to my question at all. I have already installed geth, written the custom genesis file, and init-ed it. the problem is that when I run geth with it, geth does not connect to my private blockchain that is running Parity nodes.
    – stone.212
    Commented Aug 30, 2017 at 9:15
  • I'm so sorry for misunderstand your question. You can connect parity node using geth as follows, 1 : execute command parity --geth --config node0.toml on terminal 2 : execute command geth attach on other. If this terminal contains Welcome to the Geth JavaScript console! instance: Parity//v1.6.10-stable-1a5b176-20170721/x86_64-macos/rustc1.18.0 , it's success. [image]("ibb.co/kzG5NQ") Commented Aug 30, 2017 at 9:41
  • The result Commented Aug 30, 2017 at 9:47
  • His real problem is this one ethereum.stackexchange.com/questions/16866/… Commented Aug 30, 2017 at 11:11
  • @BinGoBinBin I am not trying to connect to the ipc of a geth instance with parity. I am trying to connect a geth node to a private network.
    – stone.212
    Commented Sep 1, 2017 at 5:55

Edited answer as questioner wants to connect to parity nodes.

Maybe this is more useful for you? Is "networkID" hex or decimal?

  • These links are not related to my question. I am asking how to connect a geth node to a private blockchain of Parity nodes. Not how to create a network of many geth nodes.
    – stone.212
    Commented Aug 30, 2017 at 9:16
  • Hi @stone.212 Apologies for misunderstanding as your question did not mention Parity. Edited answer to reflect that you are looking to connect to parity nodes Commented Aug 30, 2017 at 9:23
  • @Alan_Buxton I am not trying to connect to parity noes. I am looking to connect to a private blockchain that happens to be running on parity nodes. There is a big difference.
    – stone.212
    Commented Sep 1, 2017 at 5:55

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.