Install your own mempool.space instance on Ubuntu Server – Upgrade your Bitcoin Node

If you prefer video and don’t need help to install your own mempool.space instance on Ubuntu server, see this video for instructions. Use the below text as a way to help when you run in to something you don’t understand.

Install mempool.space

Install mempool

  • Go to https://github.com/mempool/mempool
  • There is a green button there that says ‘code’ click that
  • Copy the link https://github.com/mempool/mempool.git
  • In your home directory type command [git clone https://github.com/mempool/mempool.git]
  • cd into mempool directory using [cd mempool]
  • [ls] should show you that there is a docker directory there
  • cd into docker directory using [cd docker]
  • [ls] there to see the docker-compose.yml file
  • Edit that file using the command [sudo nano docker-compose.yml]
  • On the lines that reads “    restart: on-failure” change on-failure to ‘always’ so that this file always starts up when the system boots.
  • On the line that has – 80:8080 change to – 4080:8080 (you don’t have to change this, but the rest of the guide assumes you did)
  • The line that has “      CORE_RPC_HOST: “172.27.0.1” change the IP address to match your nodes IP address on your network. IT IS CRITICAL THAT YOU REMEMBER THIS CHANGE FOR FUTURE MAINTENANCE. If the IP address on your node changes in the future you will need to go into this file and edit that again.
  • On the lines that have username and password for core, change to your user name and password you used for bitcoind.
  • This page will have directions for linking your mempool instance to your fulcrum server https://github.com/mempool/mempool/tree/master/docker
  • Those directions are: Change the line that says “ MEMPOOL_BACKEND: “none” change none to “electrum”
  • At the line that says “environment:” hit enter at the end of the line to add a new space below it and add the lines:
      ELECTRUM_HOST: "<YOUR IP ADDRESS"
      ELECTRUM_PORT: "50002"
      ELECTRUM_TLS: "true"
  • Add this to the bottom of the file if you intend to add other software that will use docker:
networks:
  default:
    driver: bridge
    ipam:
      config:
        - subnet: 172.16.57.0/24
  • Control x, y, enter to save and leave the file back to the directory
  • Now type command [docker-compose up] and you should see activity happening
  • Login to a different terminal window and type in [docker ps] and you should see the docker container for mempool being run there
  • Go to your web browser to test this. Use your IP address to visit your mempool instance. An example is: 192.168.86.12:4080. Use your IP addres and add :4080 at the end (or whatever extension you used)

You should now have your own working mempool.space instance. It will take some time for yours to have the graphs looking the same as mempool.space.

EDIT: Some people noted in the comment section on youtube that there are connection errors caused by the docker-compose.yml directions from above. Twitter user @gwaaan1 noted that if you replace the below and use it instead of the above it should work:

    environment:
      ELECTRUM_HOST: "<YOURIPADDRESS>"
      ELECTRUM_PORT: "50002"
      ELECTRUM_TLS_ENABLED: "true"