Setup The Blockchain Database

Posted By : Ankit Rai | 13-Jan-2021

BigchainDB — The Blockchain Database



BigchainDB is a scalable and distributed database for Blockchain. Bigchain DB enables enterprises to deploy applications with Blockchain and Proof-of-Concept.


The combination of NoSQL database with Blockchain DB is one of its primary benefits. In BigchainDB, Data is represented as an “asset”. Any physical or digital object structured as JSON and key-values can be an "asset" or data in BigchainDB.

Let us have a look at the list of components that are required to set up Blockchain DB


MongoDB is the distributed database that will possess the Bigchaindb as a collection. You can run it on localhost or add an IP in the MongoDB config file to run it on a particular host IP.


Also Read: The Advantages of MongoDB Over Relational Database

2. Tendermint

Tendermint contains a genesis.json file. This file has the id and key pair for all the members on the network. To create a peer-to-peer connection, a minimum of 4 nodes are a must.

3. BigchainDB

The setup can be performed using docker-all-one install


  1. docker pull bigchaindb/bigchaindb:all-in-one
  2. docker run \
      --detach \
      --name bigchaindb \
      --publish 9984:9984 \
      --publish 9985:9985 \
      --publish 27017:27017 \
      --publish 26657:26657 \
      --volume $HOME/bigchaindb_docker/mongodb/data/db:/data/db \
      --volume $HOME/bigchaindb_docker/mongodb/data/configdb:/data/configdb \
      --volume $HOME/bigchaindb_docker/tendermint:/tendermint \


After proper configuration and start of the setup, we need to examine the DB:


On CLI, run command “mongo”

          MongoDB shell version v3.6.17

  • show dbs
    admin     0.000GB
    bigchain  0.001GB
    config    0.000GB
    local     0.000GB


  • use bigchain

           switched to DB bigchain

  • show collections


Post setup,  any transaction we perform at any time will be reflected in bigchain DB under assets, blocks, metadata, and transactions collections.


CREATE Transaction

asset collection

metadata collection


TRANSFER Transaction

asset collection



metadata collection



Choose Oodles For SaaS App Development Services


We are a 360-degree software development company that provides cross-platform SaaS app development services to address varied software project requirements. We have an experienced team of Java, PHP, and Python developers who use advanced frameworks, tools, and SDKs to build scalable web and mobile applications with custom features. For more detail, reach us out at [email protected].

About Author

Author Image
Ankit Rai

He is a dynamic Devops Engineer having good knowledge of AWS, Jenkins, Python, GIT, BASH, Docker, and Cloud Security

Request for Proposal

Name is required

Comment is required

Sending message..