I tried running the commands from https://github.com/ethereum/go-ethereum/wiki/Private-network


    "config": {
        "chainId": 15,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    "difficulty": "200000000",
    "gasLimit": "2100000",
     "alloc": {
     "0x9370855ace244dc18fba024988046dde0d9f8ad8": {
      "balance": "1000000000000000000000"

To create a database that uses this genesis block, run the following command. This will import and set the canonical genesis block for your chain.

geth --datadir path/to/custom/data/folder init genesis.json

Future runs of geth on this data directory will use the genesis block you have defined.

geth --datadir path/to/custom/data/folder --networkid 15

So I run the above with

geth --rpc --datadir path/to/custom/data/folder --networkid 15
WARN [03-05|19:33:23] No etherbase set and no accounts found as default
INFO [03-05|19:33:23] Starting peer-to-peer node               instance=Geth/v1.7.2-stable/darwin-amd64/go1.9.2
INFO [03-05|19:33:23] Allocated cache and file handles         database=/Users/quantum/cc/geth/path/to/custom/data/folder/geth/chaindata cache=128 handles=1024
INFO [03-05|19:33:23] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Engine: ethash}"
INFO [03-05|19:33:23] Disk storage enabled for ethash caches   dir=/Users/quantum/cc/geth/path/to/custom/data/folder/geth/ethash count=3
INFO [03-05|19:33:23] Disk storage enabled for ethash DAGs     dir=/Users/quantum/.ethash                                        count=2
INFO [03-05|19:33:23] Initialising Ethereum protocol           versions="[63 62]" network=15
INFO [03-05|19:33:23] Loaded most recent local header          number=0 hash=d4e567…cb8fa3 td=17179869184
INFO [03-05|19:33:23] Loaded most recent local full block      number=0 hash=d4e567…cb8fa3 td=17179869184
INFO [03-05|19:33:23] Loaded most recent local fast block      number=0 hash=d4e567…cb8fa3 td=17179869184
INFO [03-05|19:33:23] Loaded local transaction journal         transactions=0 dropped=0
INFO [03-05|19:33:23] Regenerated local transaction journal    transactions=0 accounts=0
INFO [03-05|19:33:23] Starting P2P networking
INFO [03-05|19:33:25] UDP listener up                          self=enode://cd3f867d2e6e268ab27e555e255097bb96f1f61381dcce74c90a11ee2f960e8542955764a14c7e96e5002b10eb2cc74badf29f974d4d3b61b936e2be36bfe7b6@[::]:30303
INFO [03-05|19:33:25] RLPx listener up                         self=enode://cd3f867d2e6e268ab27e555e255097bb96f1f61381dcce74c90a11ee2f960e8542955764a14c7e96e5002b10eb2cc74badf29f974d4d3b61b936e2be36bfe7b6@[::]:30303
INFO [03-05|19:33:25] IPC endpoint opened: /Users/quantum/cc/geth/path/to/custom/data/folder/geth.ipc
INFO [03-05|19:33:25] HTTP endpoint opened:

then in a new shell,

geth attach

geth attach
Fatal: Unable to attach to remote geth: dial unix /Users/quantum/Library/Ethereum/geth.ipc: connect: no such file or directory

so now I cannot connect to my test network.

1 Answer 1


If you are not using the default --datadir option you need to pass the full path to the ipc file

geth attach /Users/quantum/cc/geth/path/to/custom/data/folder/geth.ipc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy