Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I connect to a private network from ethereum wallet?

Tags:

ethereum

How do I connect to a private network from ethereum wallet? I was able to create a private network from geth command line using custom genesis file but now wanted my ethereum wallet to point to custom genesis file of the private network.Currently I am able to point my etherem wallet to either the mainnet or testnet but not private network.

I did find the following instructions on github mist browser Readme file but haven't been able to make much progress

To run a privatenet you need to have geth installed separately and run it with the ipcpath flag: $ geth --networkid 1234 --ipcpath /Users/you/Library/Ethereum/geth.ipc --datadir ...

like image 234
jpallav Avatar asked Apr 16 '16 08:04

jpallav


People also ask

How does Ethereum private network work?

A private network is composed of multiple Ethereum nodes that can only connect to each other. In order to run multiple nodes locally, each one requires a separate data directory ( --datadir ).

How do I connect my MetaMask to private network?

You can use MetaMask to send a transaction on your private network. Open MetaMask and connect it to your private network RPC endpoint by selecting Localhost 8545 in the network list. Choose one of the following test accounts and import it into MetaMask by copying the corresponding private key.


2 Answers

  1. Ensure your Ethereum Wallet is closing.

  2. On your terminal.

    $ geth --networkid "1234" --datadir "/some/other/path" --ipcpath "/Users/<username>/Library/Ethereum/geth.ipc" console

  3. Reopen your Ethereum Wallet.

See: Ethereum Wallet – Developer Preview

If your want to reconnect to mainnet or testnet. Just type this "$ geth console" in your terminal.

like image 100
Ace Avatar answered Sep 22 '22 06:09

Ace


You need to download geth and Ethereum mist wallet , and install them.

Then go to the folder where you want to start the blockchain and follow these steps:

  1. Start command prompt here

    • $ mkdir chaindata
    • $ geth --datadir=./chaindata init genesis.json
    • $ geth --datadir=./chaindata --fast --cache=1024
  2. Start another command prompt here

    • $ geth attach
  3. Start Ethereum Wallet. Make sure it opens in private network

  4. for Mining

    • $ miner.start(3);
    • $ miner.stop();

You can get a video tutorial for the same here.

Hope it helps you!

like image 32
PrashantNagawade Avatar answered Sep 22 '22 06:09

PrashantNagawade