Image for post
Image for post
Nathan Williams, far left, collaborates with his ArcTouch colleagues during a recent blockchain hackathon. The team built a blockchain proof-of-concept using Ethereum and Microsoft’s Azure.

How to Set Up a Private Ethereum Blockchain in 20 Minutes

Image for post
Image for post

Step 1: Install Ethereum and geth

sudo apt-get install software-properties-common 
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum

Step 2: Generate the authority account and transaction account

geth --datadir .ethereum/ account new 
> Address: {6203bb870bfb79438b827de3d6b0070d4d2a5f7b}
geth --datadir .ethereum/ account new
> Address: {1808adc011f6e970943d3f28f4d285053d9140ac}

Step 3: Create the genesis block

puppeth
...
Please specify a network name to administer (no spaces, please)
> clique
...
What would you like to do? (default = stats)
1. Show network stats
2. Configure new genesis
3. Track new remote server
4. Deploy network components
> 2
Which consensus engine to use? (default = clique)
1. Ethash - proof-of-work
2. Clique - proof-of-authority
> 2
How many seconds should blocks take? (default = 15)
> 15
Which accounts are allowed to seal? (mandatory at least one)
> 0x6203bb870bfb79438b827de3d6b0070d4d2a5f7b
> 0x
Which accounts should be pre-funded? (advisable at least one)
> 0x1808adc011f6e970943d3f28f4d285053d9140ac
> 0x
Specify your chain/network ID if you want an explicit one (default = random)
> 42
INFO [02-15|18:24:03] Configured new genesis block
What would you like to do? (default = stats)
1. Show network stats
2. Manage existing genesis
3. Track new remote server
4. Deploy network components
> 2
1. Modify existing fork rules
2. Export genesis configuration
3. Remove genesis configuration
> 2
Which file to save the genesis into? (default = clique.json)
> genesis.json
INFO [02-15|18:24:22] Exported existing genesis block

Step 4: Start your private Ethereum instance

geth --datadir .ethereum/ init genesis.json geth --nodiscover --networkid 42 --datadir .ethereum/ --unlock 0x6203bb870bfb79438b827de3d6b0070d4d2a5f7b --mine --rpc --rpcapi eth,net,web3 --rpcaddr
Image for post
Image for post
Image for post
Image for post

Result: A functional Ethereum blockchain

Wondering how blockchain can help your business?

We help companies forge meaningful connections with their customers and employees through lovable apps and digital products. Learn more at arctouch.com.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store