An open-source explorer developed for the Bitcoin community, focusing on the emerging transaction fee market to help our transition into a multi-layer ecosystem.
Go to file
2022-01-05 09:19:03 +00:00
.github Update GitHub issue templates to redirect support requests to chat 2021-12-20 01:31:29 +09:00
.vscode Backend: Bumping Typescript version to 4.4.2 (#748) 2021-08-31 15:09:33 +03:00
backend Refactoring the Liquid and LiquidTestnet check to a common function. 2021-12-31 02:28:40 +04:00
docker Set Dockerfiles to use Node v16.10.0 2021-12-06 23:52:23 -08:00
frontend Transifex pull 2022-01-05 13:10:58 +04:00
production Add missing liquidtestnet backend to upgrade script 2021-12-31 06:55:16 +09:00
.gitattributes Fix .gitattributes for line endings again 2020-07-24 22:42:08 +09:00
.gitignore deploy: add Makefile for easier docker deploy 2021-03-23 19:57:04 -04:00
.nvmrc Add .nvmrc to set node to 16.10.0 when changing into the project 2021-12-07 22:55:10 -08:00
GNUmakefile deploy: add Makefile for easier docker deploy 2021-03-23 19:57:04 -04:00
LICENSE Remove duplicate trademark notice in LICENSE 2021-07-26 15:24:12 +09:00
LICENSE.AGPL-3.md Dual-license mempool under both the GNU AGPLv3 and GNU GPLv3 licenses 2021-03-27 20:02:53 +09:00
LICENSE.GPL-3.md Dual-license mempool under both the GNU AGPLv3 and GNU GPLv3 licenses 2021-03-27 20:02:53 +09:00
Makefile deploy: add Makefile for easier docker deploy 2021-03-23 19:57:04 -04:00
nginx-mempool.conf Remove typo'd extra line in nginx-mempool.conf - fixes #706 2021-08-12 00:47:42 +09:00
nginx.conf Enable i18n locale Thai (th) 2021-11-17 21:03:35 +09:00
README.md Update README for upcoming v2.3.0 release 2021-12-08 00:04:24 +09:00

The Mempool Open Source Project™

Mempool is the fully featured visualizer, explorer, and API service running on mempool.space, an open source project developed and operated for the benefit of the Bitcoin community, with a focus on the emerging transaction fee market to help our transition into a multi-layer ecosystem.

mempool

Installation Methods

Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi distro, all the way to an advanced high availability cluster of powerful servers for a production instance. We support the following installation methods, ranked in order from simple to advanced:

  1. One-click installation on: Umbrel, RaspiBlitz, RoninDojo, or MyNode.
  2. Docker installation on Linux using docker-compose
  3. Manual installation on Linux or FreeBSD
  4. Production installation on a powerful FreeBSD server
  5. High Availability cluster using powerful FreeBSD servers

Manual Installation

The following instructions are for a manual installation on Linux or FreeBSD. The file and directory paths may need to be changed to match your OS.

Dependencies

Mempool

Clone the mempool repo, and checkout the latest release tag:

  git clone https://github.com/mempool/mempool
  cd mempool
  latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4)
  git checkout $latestrelease

Bitcoin Core (bitcoind)

Enable RPC and txindex in bitcoin.conf:

  rpcuser=mempool
  rpcpassword=mempool
  txindex=1

MySQL

Install MariaDB from OS package manager:

  # Linux
  apt-get install mariadb-server mariadb-client

  # macOS
  brew install mariadb
  mysql.server start

Create database and grant privileges:

  MariaDB [(none)]> drop database mempool;
  Query OK, 0 rows affected (0.00 sec)

  MariaDB [(none)]> create database mempool;
  Query OK, 1 row affected (0.00 sec)

  MariaDB [(none)]> grant all privileges on mempool.* to 'mempool'@'%' identified by 'mempool';
  Query OK, 0 rows affected (0.00 sec)

From the mempool repo's top-level folder, import the database structure:

  mysql -u mempool -p mempool < mariadb-structure.sql

Mempool Backend

Install mempool dependencies from npm and build the backend:

  # backend
  cd backend
  npm install --prod
  npm run build

In the backend folder, make a copy of the sample config and modify it to fit your settings.

  cp mempool-config.sample.json mempool-config.json

Edit mempool-config.json to add your Bitcoin Core node RPC credentials:

{
  "MEMPOOL": {
    "NETWORK": "mainnet",
    "BACKEND": "electrum",
    "HTTP_PORT": 8999
  },
  "CORE_RPC": {
    "HOST": "127.0.0.1",
    "PORT": 8332,
    "USERNAME": "mempool",
    "PASSWORD": "mempool"
  },
  "ELECTRUM": {
    "HOST": "127.0.0.1",
    "PORT": 50002,
    "TLS_ENABLED": true
  },
  "DATABASE": {
    "ENABLED": true,
    "HOST": "127.0.0.1",
    "PORT": 3306,
    "USERNAME": "mempool",
    "PASSWORD": "mempool",
    "DATABASE": "mempool"
  }
}

Start the backend:

  npm run start

When it's running you should see output like this:

  Mempool updated in 0.189 seconds
  Updating mempool
  Mempool updated in 0.096 seconds
  Updating mempool
  Mempool updated in 0.099 seconds
  Updating mempool
  Calculated fee for transaction 1 / 10
  Calculated fee for transaction 2 / 10
  Calculated fee for transaction 3 / 10
  Calculated fee for transaction 4 / 10
  Calculated fee for transaction 5 / 10
  Calculated fee for transaction 6 / 10
  Calculated fee for transaction 7 / 10
  Calculated fee for transaction 8 / 10
  Calculated fee for transaction 9 / 10
  Calculated fee for transaction 10 / 10
  Mempool updated in 0.243 seconds
  Updating mempool

Mempool Frontend

Install mempool dependencies from npm and build the frontend static HTML/CSS/JS:

  # frontend
  cd frontend
  npm install --prod
  npm run build

Install the output into nginx webroot folder:

  sudo rsync -av --delete dist/mempool/ /var/www/

nginx + certbot

Install the supplied nginx.conf and nginx-mempool.conf in /etc/nginx

  # install nginx and certbot
  apt-get install -y nginx python3-certbot-nginx

  # install the mempool configuration for nginx
  cp nginx.conf nginx-mempool.conf /etc/nginx/

  # replace example.com with your domain name
  certbot --nginx -d example.com

If everything went okay you should see the beautiful mempool 😁

If you get stuck on "loading blocks", this means the websocket can't connect. Check your nginx proxy setup, firewalls, etc. and open an issue if you need help.