I would like to create a private network for test. And I would like to connect to this private network from commandline client or Ethereum wallet/mint.

I have created a private network as below.

geth --datadir=./chaindata init genesis.json

The content of genesis.json is genesis.json

Afterwards, I have started private network with following commands. (I have tried both of these commands seperately)

geth --datadir=./chaindata 
geth --datadir=./chaindata --networkid 15

Afterwards, I have opened another terminal and try to connect running private network. But it does not connect.

geth attach

I have realised it is trying to connect default geth.ipc which is not running and I have send the running private network's geth.ipc as parameter and I is solved.

geth attach ~/chaindata/geth.ipc

But, I could not change the default geth.ipc for Mist or Ethereum Wallet. How can I connect Ethereum Wallet/Mist to private network?

Ethereum Wallet/Mist error message during startup

Couldn't connect to node? See the logs for more:
INFO [07-16|15:47:51] Starting P2P networking 
Fatal: Error starting protocol stack: listen udp :30303: bind:   address already in use
  • it seems running geth like this: geth --datadir=./chaindata --networkid 15 --ipcpath /Users/{user-name}/Library/Ethereum/geth.ipc
    – karfkars
    Commented Jul 16, 2017 at 13:17
  • I have found the solution here: stackoverflow.com/questions/36661738/…
    – karfkars
    Commented Jul 16, 2017 at 13:18

5 Answers 5


to start a local test network you can now use

geth --dev

once you do, take note of where it has actually created it by reading the line:

IPC endpoint opened: /var/folders/y1/jynwfrwj411bxck8whqgcbr00000gq/T/ethereum_dev_mode/geth.ipc

Then to have MIST connect to the private network type this in your terminal (MAC version)

open -a /Applications/Mist.app --args --rpc /var/folders/y1/jynwfrwj411bxck8whqgcbr00000gq/T/ethereum_dev_mode/geth.ipc

  • Is this the only way to do it in Terminal? Could you do geth --datadir ./chaindata then something like geth attach /var/folders/2k/p756_j5x0x5fqplwrq74j1sh0000gn/T/geth.ipc? Is geth --dev the only way to start the test network? Btw, test network refers to your own private 80GB node correct?
    – Edison
    Commented Apr 13, 2018 at 3:24

you can open the Mist using the following command:

open -a /Applications/Mist.app --args --rpcport "8001" --rpc  <node path>/geth.ipc

Please just replace the location of the mist.app if it's different than yours, and change the port if you are using different port.


Creation of the blockchain looks fine.

Be sure that Mist is closed.

Then start a geth node with

geth --datadir ./chaindata

open a new console and attach a Javascript Console with

geth attach

Then start the Mist wallet and you should be connected to your private network.

  • Has anyone confirmed this method? It does not work for me. The above method by b25 works for me. geth --datadir ./chaindata does not start a test network. It only starts a node. You could do geth attach /var/folders/2k/p756_j5x0x5fqplwrq74j1sh0000gn/T/geth.ipc but that won't work as well.
    – Edison
    Commented Apr 13, 2018 at 3:21

Try just building against the test network using npm install -g ethereum-testrpc, then deploy your code and test on livenet. You would have to build Mist/EWalet against test net in order to test it. Check out https://github.com/ethereumjs/testrpc/blob/master/README.md for more info.


To start Mist is actually: /Applications/Mist.app/Contents/MacOS/Mist --rpc

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.