2021 Call for Code Awards: Live from New York, with SNL’s Colin Jost! Learn more

Build your first private blockchain network on InterPlanetary File System


Nowadays, there is increasing demand for decentralized storage in both blockchain and cloud technologies. Many blockchains have structured data storage to prove data consistency, while unstructured data storage needs to be enabled with trust and privacy options, just as it is with cloud. InterPlanetary File System for Business (IPFSfB) enables unstructured and distributed data storage in blockchain. This code pattern shows you how to build this type of private storage network in enterprise form using IPFSfB for any blockchain.


Many enterprises and developers face challenges with data loss, duplication, tampering, and content addressing. All of these problems can be solved with a single, comprehensive storage solution: InterPlanetary File System for Business (IPFSfB).

IPFSfB is based on InterPlanetary File System, which combines Git MerkleDAG, BitTorrent Bitswap protocol, and Kademlia DHT capabilities, building a privacy layer on the top of the libp2p protocol using cryptographic tools.

Inspired by the build your first network (BYFN) sample from Hyperledger Fabric, IPFSfB is built with Docker and Docker Compose to start up quickly on any platform or computer, and enables them to run distributed and private storage networks in enterprise form where any blockchain can store unstructured data.

This code pattern shows you how to build a distributed and private storage network in enterprise form using IPFSfB.


Flow 1 Flow 2

Flow 1: Contributor

  1. Get the source code.
  2. Build the tools or images locally.
  3. Start the contribution by finding bugs, creating issues, and making improvements.

Flow 2: User

Option 1

  1. Get the simple network package using a shortcut URL.
  2. Use the shell script to perform private network booting, then jump to and perform step 8 directly below.
  3. Bring up the Docker containers and enter to each of the containers.
  4. Perform the private network setting in the containers.
  5. Exit the container and generate the swarm key.
  6. Copy the generated swarm key to each of the containers.
  7. Restart the containers to activate the private network.
  8. Enter to the containers; the user can leverage communication capabilities on the private network. For example:
    • Upload the files to the network, view and download files from the network.
    • Host a website on the network.
    • And more functions.

Option 2

  1. Get the source code.
  2. Go to samples, simple network folder, and perform option 1, step 3 above.
  3. Perform option 1, step 4.
  4. Enter to cli container.
  5. Generate the swarm key in the cli container, and copy it to the local file system.
  6. Perform option 1, step 6.
  7. Perform option 1, step 7.
  8. Perform option 1, step 8.


Find the detailed instructions in the README.