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
  • 1. Install Requirements
  • 2. Install ASDF
  • 3. Install PostgreSQL-14
  • 4. Add user and database in postgres-14
  • 5. Install Rustup / Cargo
  • 6. After installing everything, clone the Blockscout repository and install .tool-version from the repository

Was this helpful?

Export as PDF
  1. Setup and Run Blockscout
  2. Deployment
  3. Manual Deployment Guide

Ubuntu Setup

Last updated 16 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.

1. Install Requirements

  1. sudo apt-get update

  2. sudo apt-get install inotify-tools && sudo apt install make && sudo apt install g++

  3. sudo apt-get install libudev-dev zip unzip build-essential cmake -y

  4. sudo apt-get install git \ automake \ libtool inotify-tools \ libgmp-dev \ libgmp10 \ build-essential \ cmake -y

2. Install ASDF

  1. Clone ASDF Plugin

git clone https://github.com/asdf-vm/asdf.git ~/.asdf

  1. Edit your ubuntu profile

nano .profile

  1. add this line in end break

. $HOME/.asdf/asdf.sh and ctrl + x (or Save)

  1. Refresh your profile after the update

source ~/.profile

  1. Test active asdf after refresh

asdf version

v0.13.1-fad23bc Note: Response following successful install

  1. Add asdf plugin for erlang, elixir, and nodejs

asdf plugin add erlang

asdf plugin add elixir

asdf plugin add nodejs

  1. install additional prerequisites

sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk

3. Install PostgreSQL-14

  1. curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg

  2. sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

  3. sudo apt update

  4. sudo apt install postgresql-14

  5. sudo systemctl status postgresql

4. Add user and database in postgres-14

  1. Create user on localpc or server

adduser dbusername Note: Replace dbusername with your username.

  1. You will be prompted to create a new profile, just follow the flow.

  2. After Adduser now connect to postgres-14

su - postgres (for Root) or sudo -i -u postgres (for user)

  1. Display when entering postgres user section looks like this in terminal

postgres@ubuntu:~$

  1. Create user

createuser --interactive dbusername

  1. Create database

createdb blockscout

  1. connect to psql

psql

  1. Create Password database in dbusername Note

ALTER USER dbusername WITH PASSWORD 'dbuserpassword'; Note: Replace dbusername and dbuserpassword that you created

  1. Create Privileges on dbusername to database

GRANT ALL PRIVILEGES ON DATABASE blockscout TO dbusername;

Note: Replace dbusername

  1. exit psql

\q

  1. Exit to profile postgresql

postgres@ubuntu:~$ exit

  1. Restart postgresql

sudo systemctl restart postgresql

  1. Check new profile that you created at start of adduser replacing dbusername with your username.

su - dbusername (for Root) or sudo su - dbusername (for user) Note: Replace your dbusername

  1. Run this command

psql -d blockscout

  1. If everything is correct, you will see this response

blockscout=#

  1. Quit psql

\q

  1. Exit for Database Account page

dbusername@ubuntu:~$ exit

5. Install Rustup / Cargo

After Setup Database, You can Install Rust before installing Blockscout

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

6. After installing everything, clone the Blockscout repository and install .tool-version from the repository

  1. Clone Repository Blockscout

git clone https://github.com/blockscout/blockscout blockscout-backend

  1. Enter to folder clone blockscout

cd blockscout-backend

  1. Install plugin requirements Erlang, Elixir, and Nodejs before install blockscout backend

asdf install

🎉 You are ready for manual deployment! "

🏃‍♂️
⭐
Autoscout is now available
Get Started Now
Proceed to step 3 in the "Prepare the Backend section