How to Start Using Hyperledger Explorer

Aug 4, 2022 | Blockchain

Welcome to your guide on getting started with Hyperledger Explorer! This powerful open-source tool allows you to browse activities on blockchain networks effortlessly. In this article, we’ll walk through the quick start options for both Docker and the codebase, provide troubleshooting advice, and ensure you’re equipped to tackle any potential problems.

Overview

Hyperledger Explorer is designed to help users view and interact with underlying blockchain data with ease. It supports multiple versions of Hyperledger Fabric and Node.js, thus providing a flexible environment for various configurations.

Quick Start Options

You have two primary options to get Hyperledger Explorer started:

  • Using Docker
  • Using Codebase

Option 1: Quick Start Using Docker

Prerequisites

  • Docker
  • Docker Compose

Note: For versions 2.0.0 and above, images are pulled from GHCR. For versions below that, they are pulled from Docker Hub.

Steps to Configure

  1. Create a new directory:
  2. mkdir explorer
    cd explorer
  3. Copy necessary files from the repository.
  4. Ensure you have the correct structure in your directory as outlined in the documentation.
  5. Edit environmental variables in docker-compose.yaml to match your settings.

Start Container Services

Run the following command to bring up Explorer services:

docker-compose up -d

Option 2: Quick Start Using Codebase

Prerequisites

  • Node.js 12, 14, or 16
  • PostgreSQL version 9.5 or greater
  • jq
  • A Linux-based operating system (Ubuntu/MacOS)

Steps to Setup

  1. Clone the repository:
  2. git clone https://github.com/hyperledger/blockchain-explorer.git
    cd blockchain-explorer
  3. Modify app/explorerconfig.json to configure your PostgreSQL settings.
  4. Update app/platform/fabric/config.json for your Fabric network connection profile.
  5. Run the necessary database scripts to create the database.
  6. Finally, run the application:
  7. npm start

Understanding the Configuration Aspects: An Analogy

Think of configuring Hyperledger Explorer like preparing a special recipe. Each ingredient (file and configuration) needs to be gathered and mixed in the right order:

  • Docker images are your main ingredients: Ensure you have the right versions ready; if you miss an ingredient, your meal might not turn out as expected.
  • Configuration files are your spices: Just like you season according to taste, your environmental variables need to match your specific blockchain recipe!
  • Directories work like mixing bowls: If your bowl is cluttered or missing something, your mixture will not yield the desired dish.

Troubleshooting Tips

Here are some common issues and resolutions you may encounter while setting up Hyperledger Explorer:

  • Container Fails to Start: Ensure Docker is running correctly and you’re using the right image version.
  • Database Connection Issues: Check if PostgreSQL is running and your credentials in explorerconfig.json are correct.
  • Network Configuration Errors: Verify your fabric network connection details are accurate.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox