Introduction
While numerous articles exist on setting up private Ethereum chains, most repeat the same basic information. This guide provides a fresh, comprehensive approach to private chain development, covering:
- Single-node setup on Windows
- Multi-node configurations on Windows
- Linux node creation with remote Windows access
- Cross-platform node connections (conceptual due to network limitations)
1. Windows Single-Node Setup
Installing Geth
Download the client from the official Ethereum website. After installation:
- Add Geth to your system PATH
- Verify installation with
geth version
Initializing the Genesis Block
Create a first.json configuration file with these parameters:
{
"config": {
"chainId": 10,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc" : {},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x20000",
"extraData" : "",
"gasLimit" : "0x2fefd8",
"nonce" : "0x0000000000000042",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00"
}Initialize with:
geth --datadir .\nodedata0 init first.jsonLaunching the Node
Use this optimized command:
geth --rpc --nodiscover --datadir "./nodedata0" --port 30303 --rpcapi "db,eth,net,web3" --rpccorsdomain "*" --networkid 1001 --ipcdisable console 2>>geth.logKey Operations
Account Management:
- Create:
personal.newAccount() - List:
eth.accounts
- Create:
Mining:
- Start:
miner.start() - Stop:
miner.stop()
- Start:
Transactions:
- Check balance:
eth.getBalance(eth.accounts[0]) - Transfer:
eth.sendTransaction({from:address1, to:address2, value:web3.toWei(5,"ether")})
- Check balance:
👉 Master Ethereum development with these advanced techniques
2. Windows Multi-Node Configuration
Second Node Setup
- Use the same
first.json - Different ports: rpcport (9545) and port (30306)
Initialization:
geth --datadir .\nodedata1 init first.jsonLaunch:
geth --rpc --rpcport 9545 --nodiscover --datadir "./nodedata1" --port 30306 --rpcapi "db,eth,net,web3" --rpccorsdomain "*" --networkid 1001 --ipcdisable consoleConnecting Nodes
- Get Node1's enode:
admin.nodeInfo.enode - From Node2:
admin.addPeer("enode://...")
3. Linux Node with Windows Integration
Installation
- Download the appropriate Geth binary
- Place in
/usr/bin
Initialization
geth --datadir nodedata2 init first.jsonLaunch Command
geth --rpc --rpcport 8545 --rpcaddr SERVER_IP --nodiscover --datadir "/path/to/nodedata2" --port 30303 --rpcapi "db,eth,net,web3" --rpccorsdomain "*" --networkid 1001 --ipcdisable consoleCross-Platform Connection
Requires port forwarding on routers (not covered here)
FAQ Section
Q: Why use a private Ethereum chain?
A: For development testing without using real ETH or exposing data.
Q: How do I verify my private chain works?
A: Connect Remix IDE using your node's RPC endpoint.
Q: What's the minimum hardware requirement?
A: 2GB RAM can handle basic private chain operations.
Q: Can I change the chainID later?
A: No, it's permanently set in the genesis block.
👉 Explore more blockchain development tools
Conclusion
This guide provides complete instructions for building flexible Ethereum private chains across platforms. For production environments, consider adding:
- Regular backups of chaindata
- Network security measures
- Performance monitoring
Remember that private chains are excellent for:
✔ Smart contract development
✔ Protocol testing
✔ Educational purposes