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.
- You are going to install docker for this
- https://docs.docker.com/engine/install/ubuntu/ for install instructions
- Start where it says “setup the repository”
- Start with the command [sudo apt-get update]
- After you are done with ‘install docker engine” part you can scroll down to ‘post installation steps for linux’ https://docs.docker.com/engine/install/linux-postinstall/
- Continue with instructions there https://docs.docker.com/compose/install/compose-plugin/#installation-methods
- Install Docker compose with this command: [sudo curl -SL https://github.com/docker/compose/releases/download/v2.5.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose] (you may need to adjust the version number for the version you are downloading)
- Make executable with this [chmod +x /usr/local/bin/docker-compose]
- Verify docker compose install with [docker compose version]
- 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. There are 3 lines in this file that need that change.
- 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.