Blockscout
SupportWebsiteGithubDiscord
  • Blockscout Open-Source Explorer
  • 💡About BlockScout
    • Features
      • Ethereum Bytecode Database Microservice
      • Blockscout Redesign
    • Chains Using Blockscout
    • Partners & Integrations
      • RaaS Providers
      • Vera: Verifier Alliance
        • Adding your chain to the Vera database
        • Programmatic verification via the API
    • News & Media
      • Newsletter & Blog
    • Funding
      • L2 Funding Proposal
        • Aux Funding Images
    • Roadmap
  • 🙎Using Blockscout
    • Getting Started
      • Glossary of Terms
      • Main Menu
      • Blocks
      • Transaction Types
      • Beacon Chain Withdrawal Views
    • My Account
      • Watch list
      • Private tags
      • Public tags
      • API keys
      • Custom ABI
      • Verified addresses
        • Copy and Sign Message
      • For developers
    • Dappscout Apps Marketplace
      • DApp Integration
    • Swapscout
      • Earn Merits when using Swapscout
    • Revokescout
    • Autoscout Explorer Launchpad
    • CSV Exports
    • Token Support
      • ERC-1155 Support
    • Merits
      • Streak rewards
      • Activity Pass
      • Leaderboard
      • Badges
      • FAQs
  • 👩‍💻Developer Support
    • For Web3 Developers
    • Link to Blockscout
    • Blockscout APIs
      • Requests & Limits
      • REST API Endpoints
        • Stats API
        • Interpreter API
      • JSON RPC & ETH Compatible RPC Endpoints
        • Account
        • Block
        • Contract
        • Logs
        • Stats
        • Token
        • Transaction
        • ETH RPC API
      • GraphQL in Blockscout
    • Smart Contract Verification
      • Blockscout UI
      • Blockscout smart-contract verification API
      • Hardhat Verification Plugin
        • Sourcify Plugin for Hardhat
      • Foundry Verification
      • Sourcify Verification
      • OpenZeppelin Contract Verification
      • Automate verifications with Catapulta
      • Verification via thirdweb
      • Interacting with Smart Contracts
    • Blockscout SDK
    • Integrate Merits
    • Chainscout chains list
  • 🏃‍♂️Setup and Run Blockscout
    • General Overview
      • Separate Indexer, Web App, and API
      • Umbrella Project Organization
      • Indexer Architecture Overview
      • ShareLock
      • EVM Version Information
    • Requirements
      • General Backend Requirements / Blockscout Backend Prerequisites
      • Backend/Frontend Compatibility Matrix
      • Hardware & Hosting Requirements
      • Database Storage Requirements
      • Client Setting Requirements
      • Node Tracing / JSON RPC Requirements
      • L2 -> L1 JSON-RPC Method Requests
    • ☑️ENV Variables
      • Backend ENVs: Common
      • Backend ENVs: Chain-Specific
      • Backend ENVs: Integrations
      • Frontend ENVs: Common
        • ENVs
        • Deprecated ENVs
      • Deprecated Backend ENVs
        • Previous ENV Variable Home Page
    • Deployment
      • ⭐Manual Deployment Guide
        • Ubuntu Setup
        • MacOS setup
      • ⭐Docker-compose Deployment
      • ⭐Kubernetes Deployment
      • Rollup Deployment
      • 🌟Cosmos-based chains
      • 🍀Upgrade Guide (v7.0 & v8.0)
      • Frontend Migration
        • All-In-One Container
        • Separate Frontend
        • Customized Backend
        • Proxy Setup
        • FAQs
      • Manual Deployment (backend + old UI)
        • Manual cleaning an instance from the previous deployment
      • Terraform Deployment
      • Ansible Deployment (AWS Cloud)
        • Overview
        • Prerequisites
        • AWS Permissions & Settings
          • Creating a Secret Key Pair
          • Login with AWS CLI
          • Creating an AWS certificate for SSL
          • Manually Cleaning Terraform Related Instances
        • Variables
        • Deploying the Blockscout Infrastructure
        • Deploying Blockscout
        • Destroying Provisioned Infrastructure
        • Common Additional Tasks
        • Common Errors and Questions
        • AWS Marketplace (deprecated)
          • Overview
          • CloudFormation Template
          • Prerequisites & Install Parameters
          • Install from AWS Marketplace
          • AWS EC2 archive node setup with OpenEthereum (formerly Parity)
          • Updating & Redeploying in AWS
          • Customizing CSS
    • Microservices
      • Blockscout ENS (BENS) Name Service Integration
      • Smart Contract Verification
    • Configuration Options
      • Admin Panel Usage
      • Automating Restarts
      • Branding Configs
      • Circle CI Updates
      • Charts and Stats
      • CSS Configuration & Presets
      • Exchange Rates
      • Front-end Config Files
      • haproxy Settings for Blockscout.com
      • Internationalization
      • Logger Configs
      • Memory Usage
      • Metrics
      • My Account Settings
      • Sorting and Pagination
      • Tracing
      • Reown Project ID for contract Read/Write
    • Indexing
      • How do I fix indexer timeouts?
      • How do I update memory consumption to fix indexer memory errors?
    • Testing
    • DB schema
  • FAQs
    • User FAQs
    • Developer FAQs
  • 🧩Resources
    • EaaS: Hosting with Blockscout
    • Contributing to Blockscout
    • Bug Bounty Program
    • Media kit
    • Release Notes
      • v5.3.0: 10/23/23
      • v5.2.0: 6/20/23
      • v5.1.0: 2/13/23
      • v5.0.0: 1/11/23
    • Discord Channel
    • Discussion
    • GitHub Repo
Powered by GitBook
LogoLogo

Privacy and Terms

  • Privacy Notice
  • Terms and Conditions

Copyright © Blockscout Limited 2023-2024

On this page
  • Prerequisites
  • Building Docker containers from source
  • Configs for different Ethereum clients
  • Running via Makefile

Was this helpful?

Export as PDF
  1. Setup and Run Blockscout
  2. Deployment

Docker-compose Deployment

For local builds

Last updated 15 days ago

Was this helpful?

🚗 , providing a simple one-click explorer deployment with Blockscout's optimized hosting infrastructure. Use it for early testing, modifications, and launching a full production-grade explorer. and have your explorer up-and-running in minutes.

Please see for all required information.

Prerequisites

  • Docker v20.10+

  • Docker-compose 2.x.x+

  • Running Ethereum JSON RPC client

Building Docker containers from source

cd ./docker-compose
docker-compose up --build

Note: you can use docker compose instead of docker-compose, if compose v2 plugin is installed in Docker.

Note: if you don't need to make backend customizations, you can run docker-compose up in order to launch from pre-build backend Docker image. This will be much faster.

This command uses docker-compose.yml by-default, which builds the backend of the explorer into the Docker image and runs 9 Docker containers:

  • Postgres 14.x database, which will be available at port 7432 on the host machine.

  • Redis database of the latest version.

  • Blockscout backend with api at /api path.

  • Nginx proxy to bind backend, frontend and microservices.

  • Blockscout explorer at http://localhost.

and 4 containers for microservices (written in Rust):

Configs for different Ethereum clients

The repo contains built-in configs for different JSON RPC clients without the need to build the image.

JSON RPC Client

Docker compose launch command

Erigon

docker-compose -f erigon.yml up -d

Geth (suitable for Reth as well)

docker-compose -f geth.yml up -d

Geth Clique

docker-compose -f geth-clique-consensus.yml up -d

Nethermind, OpenEthereum

docker-compose -f nethermind up -d

Anvil

docker-compose -f anvil.yml up -d

HardHat network

docker-compose -f hardhat-network.yml up -d

  • Run only the explorer without DB: docker-compose -f external-db.yml up -d. In this case, no db container is created. And it assumes that the DB credentials are provided through DATABASE_URL environment variable on the backend container.

  • Running explorer with external backend: docker-compose -f external-backend.yml up -d

  • Running explorer with external frontend: docker-compose -f external-frontend.yml up -d

  • Running all microservices: docker-compose -f microservices.yml up -d

All of the configs assume the Ethereum JSON RPC is running at http://localhost:8545.

In order to stop launched containers, run docker-compose -d -f config_file.yml down, replacing config_file.yml with the file name of the config which was previously launched.

You can adjust BlockScout environment variables:

  • for backend in ./envs/common-blockscout.env

  • for frontend in ./envs/common-frontend.env

  • for stats service in ./envs/common-stats.env

  • for visualizer in ./envs/common-visualizer.env

Descriptions of the ENVs are available

Running via Makefile

Prerequisites are the same, as for docker-compose setup.

Start all containers:

cd ./docker
make start

Stop all containers:

cd ./docker
make stop

Note: Makefile uses the same .env files since it is running docker-compose services inside.

service with a separate Postgres 14 DB.

service.

service.

Note for Linux users: Linux users who run Blockscout in docker with a local node need to run the node on rather than

for

for

🏃‍♂️
⭐
Autoscout is now available
Get Started Now
https://github.com/blockscout/blockscout/tree/master/docker-compose
Stats
Sol2UML visualizer
Sig-provider
http://0.0.0.0/
http://127.0.0.1/
backend
frontend