Hyperledger Fabric automatic deployment

Leo Pechin
Oct 26, 2018 · 3 min read

Hyperledger Fabric network require 3 config files that we have to personnalized every single time we change our network structure. This script automate it.

This tutorial will show you how to create and launch your customize Hyperledger Fabric Network.

Tutorial made on Ubuntu 16.04

1. Install prerequisites and get Hyperledger Binary :

2. Start to work :

git clone  https://github.com/Nihcep/Hyperledger-Fabric-Automate-Installer.git

Copy all useful binary (configtxgen & cryptogen) from Hyperledger Fabric, paste it on Hyperledger-Fabric-Automate-Installer folder and go to this folder :

cd fabric-samples/bin/
cp configtxgen cryptogen ../../Hyperledger-Fabric-Automate-Installer
cd ../../Hyperledger-Fabric-Automate-Installer

Give execution right to all the files :

sudo chmod 755 *

We must now set up some environment variable thank to env.sh file, do not hesitate to change values you want :

Execute it :

sudo ./env.sh

We’r know ready to create our network ! Just launch gen.py using python3 :

python3 gen.py

The program will ask you some questions :

  • The name of the network you want to create
  • The name of a channel that will be automatically created (will all peer joinned)
  • The name of your first Org, the number of peer for this org
  • If you want to create others org, say Yes as many times as you need.

(channel and network name MUST be in lowercase)

As you can see, this command created 4 new files in our folder :

  • All useful files for launch an Hyperledger Fabric Network : configtx.yaml, crypto-config.yaml, docker-compose.yml
  • A launch.sh file, useful for automatically launch our new-created network.

Give launch.sh execution right :

sudo chmod 755 launch.sh

Launch it !


If all goes right, you must see :

Congratulations ! Your network is now up, execute docker ps in order to see your running container.

docker ps

Notes :

  • This script use latest Hyperledger Fabric image (currently 1.3), just change “latest” by the version you need on docker-compose.yaml file before launching the script in order to use another version.
  • This script install a network using Kafka ordering system and couchdb (you can access your couchdb instance here : http://localhost:5984/_utils/#/_all_dbs , change 5984 by 6984 for your second peer and so on)

Stay tuned, some updates and a brand new Hyperledger Fabric dashboard is coming soon !

Github :

Official Hyperledger Fabric documentation :

Hyperledger official chat :

Hyperledger oriented forum :


Coinmonks is a non-profit Crypto educational publication.

Leo Pechin

Written by



Coinmonks is a non-profit Crypto educational publication. Follow us on Twitter @coinmonks Our other project — https://coincodecap.com

More From Medium

More from Coinmonks

More from Coinmonks

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade