Part 1: Ethereum Blockchain on IBM Cloud :- Deploying Private Ethereum Blockchain on IBM Cloud…

Part 1: Ethereum Blockchain on IBM Cloud :- Deploying Private Ethereum Blockchain on IBM Cloud Containers

What is IBM Cloud ?

IBM Cloud is a cloud platform developed by IBM which is based on Cloud Foundry and runs of SoftLayer Infrastructure. It supports various programming languages, Databases, Services, as well as integrated DevOps to build, run, deploy and manage applications on the cloud using IBM Container service.


Signup for IBM Cloud free trial

Install IBM Cloud cli

Install Dockers

Install and Setup Kubectl

Build your Docker Image

Clone my Git repository

> git clone
> cd IBMCLOUD-Ethereum-Blockchain/

Build the Image from the Dockerfile

> docker build -t myimage .
Will take some time to build the image 🙂

Check if you have the image in your system

> docker images

Login to IBM Cloud & Create a new Container

IBM Cloud

Create a lite container on IBM Cloud by choosing container service. Do not forget to give your container a name 🙂 Let’s name it “ether”

Create a lite container for free. Wait for for some time it will take some time to deploy
After deploying you will see something like this

Setup your Container

Do not follow along these steps unless your container is fully deployed!

Install container-service bx plugin

> bx plugin install container-service -r Bluemix

Log in to your IBM Cloud account.

> bx login -a

Set your terminal context to your cluster

> bx cs cluster-config ether
You will see something like this, and configuration will be automatically downloaded

Export environment variables to start using Kubernetes by copy pasting the resulting yellow line of code

> export KUBECONFIG=/Users/saifrehman/.bluemix/plugins/container-service/clusters/ether/kube-config-dal10-ether.yml

Push the image from your machine to IBM Cloud Private Registery

Tag an image to point to this registry. Choose a local image, target namespace, and target repository.

Install the Container Registry plug-in.

> bx plugin install container-registry -r Bluemix

Choose a name for your first namespace, and create that namespace. Use this namespace for the rest of the Quick Start.

bx cr namespace-add

> bx cr namespace-add etherprivate

Log your local Docker daemon into the IBM Cloud Container Registry.

> bx cr login

docker tag

> docker tag myimage

docker push

> docker push
This will push the image to IBM Cloud Private image registry. This will take some time 🙂

Deploy your Image to Kubernetes Cluster on IBM Cloud

Setup your service.deployment.yml file

Configure your Kubernetes Cluster

Deploy 🙂

> kubectl create -f service-deployment.yml
You can now access your application through the public IP

Test if you can access


Don’t worry if you do not seen any output, it will not return you anything 🙂

Access your Private Ethereum Blockchain running on IBM Container

> geth attach
Cooool. You now have a ethereum blockchain spinning on IBM Cloud

Let’s start mining Ether!

Create and unlock your new account to start mining

> personal.newAccount('password')
> personal.unlockAccount(web3.eth.coinbase, "password", 15000)

Start mining to get enough ether for us to deploy smart contract in our next tutorial 🙂

> miner.start()

Check your Ether Balance

> web3.fromWei(eth.getBalance(eth.coinbase), "ether")

Stop mining

> miner.stop()

Congratulation you have successfully setup your Private Ethereum Blockchain on IBM Cloud!


Working with solidity to deploy your first ethereum smart contract on IBM Cloud and creating Dapp front-end on Angular 4

Click to know more about ethereum

Part 1: Ethereum Blockchain on IBM Cloud :- Deploying Private Ethereum Blockchain on IBM Cloud… was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.