User manual:How to install Blockbook

From Trezor Wiki
Jump to: navigation, search

Blockbook is an address or account balance backend (or blockchain indexer) for Trezor Wallet, developed by SatoshiLabs, which you can install and run on your computer. With Trezor Wallet installed and running as a local instance, you can be completely independent from connecting to the SatoshiLabs servers.

To run Trezor Wallet as a local instance, follow the instructions here: User manual:Run a local instance of Trezor Wallet.

How to install blockbook

To install it on Linux, please use this step-by-step guide:

1. To install blockbook you will need to use Linux Debian version 9 (Stretch) or later.

Before you start installing blockbook, please check the latest blockchain size of your cryptocurrency and be sure to have this amount + approximately 35% of the size of the blockchain for the blockbook available on your hard drive.

Switch to root privileges before proceeding with the installation.

2. Install docker using this guide:

https://docs.docker.com/install/linux/docker-ce/debian/

3. Clone blockbook git:

git clone https://github.com/trezor/blockbook

4. Go to blockbook directory and run:

make all-<coin> (eg. make all-bitcoin)

5. Go to blockbook/build directory and run:

apt install <package name> (eg. apt install backend-bitcoin_0.16.1-satoshilabs1_amd64.deb)

6. Now you can start synchronizing with the network:

systemctl start backend-<coin>.service (eg. systemctl start backend-bitcoin.service)

7. If you want to check the status of your synchronizing go to /opt/coins/data/<coin>/backend (eg. /opt/coins/data/bitcoin/backend) and check the status in debug.log file.

8. If the blockchain is fully synchronized, you can start installing your blockbook. Go to directory blockbook/build and run:

apt install <blockbook package> (eg. apt install blockbook-bitcoin_0.0.6_amd64.deb)

9. Run blockbook:

systemctl start blockbook-<coin>.service (eg. systemctl start blockbook-bitcoin.service)

10. Blockbook is now synchronizing with your blockchain, you can check the status in /opt/coins/blockbook/<coin>/logs/blockbook.INFO (eg. /opt/coins/blockbook/bitcoin/logs/blockbook.INFO) or by visiting https://localhost:<blockbook public port> (eg. https://localhost:9130 for bitcoin)

11. After a full synchronization, your blockbook is now running at localhost port.

12. Now you can connect your Trezor Wallet to your local blockbook instance by using custom backend:

Wallet settings - Bitcore Server URL - https://localhost:<blockbook public port> (eg. https://localhost:9130 for bitcoin)
ImportantBlockbook uses a self-signed certificate. It is necessary to go to the address in your browser, confirm the certificate, and then add the address to your wallet.

See this table for used ports