Title: Instructions Installation BTC-RPC-Block Explorer under Ubuntu Post by: MixMAx123 on October 29, 2021, 04:30:56 PM This manual describes how to install the RPC-Explorer on Ubuntu, with all required software packages.
https://bitcoinexplorer.org/ https://github.com/janoside/btc-rpc-explorer It was tested on a newly installed Ubuntu V18.04.6 LTS ---------------------------- Ubuntu ------------------------------------ If Ubuntu has been reinstalled by CD, pack updates must first be performed. All update properties must be allowed for it to work. If automatic updates will be deactivated, the impact on console commands does not work later. Automatic updates can then be deactivated at the end when everything is running. Show with Ctrl-H hidden folders! Update packages: Click on update management and do not start yet! Click on details of the update is a very small triangle. Deactivate the packages that should not be updated, or update all. Then can be started. ------------------------- BitcoinCore installing ------------------------ On a detailed manual, for installing bitcoincore is omitted here. It must be installed BitcoinCore in the version >= V0.21.*! Older versions are rejected by a package of "electrs" needed here. This means that it actually does not work with older BitcoinCore versions. BitCoinCore must be installed completely (without pruning), the entire (full) blockchain must be synchronized. Some settings must be made in the "bitcoin.config": Here is my bitcoin.config as an example: Code: server=1 To start BitConcore under Linux: - navigate to the "bin" folder and open Terminal Code: ./bitcoin-qt -------------------------------- nodejs installing --------------------------- "nodejs" and "npm" is a package what is needed for the RPC-Explorer. Nodejs can also be searched and installed via the Ubuntu software. This type of installation is wrong and does not work in the end. nodejs and npm must be installed on the following way: Open and enter the console on the desktop: Code: sudo su Code: nodejs –v npm version with me was: v3.5.2 These versions must be correct, later mistakes do not point then and you are looking for dead. With older versions it does not work! If you do not create it, you do not need to continue at this point! The firewall must be defused for the connection: <<< optional Code: sudo ufw allow from 192.168.0.0/16 to any port 3002 comment 'allow BTC RPC Explorer from local network' --------------------- RPC-Explorer download and installing ------------------------------ Open and enter the console on the desktop: Code: git clone https://github.com/janoside/btc-rpc-explorer Close console and now open in the newly created folder "btc-rpc-explorer" console Then enter: Code: npm install If Red Error messages come here is something wrong! For me it was always on the wrong nodejs version. Yellow warnings are not a problem at this point. Now mandatory with Ctrl-H the hidden files must be displayed! So press the Ctrl-H in Explorer at the folders. Hidden files start in Linux with point. Rename the file ".env-sample" so that it is not used. Z.B: in "_.env-sample". The Configuration file for the RPC-Explorer must be called ".env" and are in the folder: "btc-rpc-explorer". This file is created/copied from the ".env" sample. Here is an example ".env" file: Code: BTCEXP_HOST=192.168.178.98 Start RPC-Explorer: Before, the bitcoincore must be started! At this point, the RPC Explorer can be started to test to check if everything is right until then. Not all functions will not yet be available. Explicitly addresses are not resolved. Open and enter the console "btc-rpc-explorer" folder: Code: npm start Should start and no errors only output messages. Now open and enter an Internet-Explorer: http://192.168.178.98:3002/node-details or http://127.0.0.1:3002/node-details ------------------------------------------ Electrs installing -------------------------------------------------- Open and enter the console on the desktop: Code: sudo apt install curl Here are some mistakes on because the LibrockSDB-DEV is not the right one. This can first be ignored. Actually, this library would be the right one. This can not be installed on our Ubuntu system. For whatever reason. If you make it, you will be happy! "sudo apt install librocksdb-dev=6.11.4-3" <<< not work! Code: cargo build --locked –release Code: RUSTFLAGS="-C link-args=-latomic" cargo build --locked --release For me several minutes. Here no error may occur, in the end must be finished. Code: cargo build --locked –release Wait until everything is completed! electrs configure BitcoinCore >= V0.21.0 must be installed electrs must be installed in the following folder. The folder name may not be different: Code: .electrs The Configurations File for electrs is: Code: config.toml Code: .electrs Code: .electrs/doc/config_example.toml Now you can open the file and edit the configuration. Here is my example config.toml Code: auth = "xxx:xxx" "db_dir" is the directory in which the database is created. You can choose it freely. This directory is created and should offer min. 70GB free space. start electrs Navigate to the following folders for starting: Code: .electrs/target/release Code: ./electrs It can take a few hours. ---------------------------------- start Block-Explorer ------------------------------- Conditions To fully start the RPC Explorer: - BitcoinCore must be running and finished synchronized - electrs must be running and finished being synchronized - RPC-Explorer must run without error with all RPC connections. Now with an Internet-Explorer the address: 127.0.0.1:3002, or the address that has been configured in the ".env" file is called. The RPC-Block-explorer should start. Many things can now be configured. Read the documentation of the ".env" file. note of thanks Thanks a lot to @NeuroticFish This manual is an extension / change on the instructions of @NeuroticFish https://bitcointalk.org/index.php?topic=5367296.0 The most important and biggest things are copied from there. It was changed by me for Ubuntu. So if you want to thank, do not thank me, but @NeuroticFish who has done the main work! Title: Re: Instructions Installation BTC-RPC-Block Explorer under Ubuntu Post by: ABCbits on October 30, 2021, 09:52:16 AM The firewall must be defused for the connection: Code: sudo ufw allow from 192.168.0.0/16 to any port 3002 comment 'allow BTC RPC Explorer from local network' By default, the ufw firewall is disabled on Ubuntu. So it's optional to do this step, unless you want to secure your computer/server by configuring firewall. Quote from: https://ubuntu.com/server/docs/security-firewall ufw by default is initially disabled So if you want to thank, do not thank me, but @NeuroticFish who has done the main work! More guide which specify source/environment won't hurt though :) Title: Re: Instructions Installation BTC-RPC-Block Explorer under Ubuntu Post by: NeuroticFish on October 30, 2021, 12:40:42 PM It was changed by me for Ubuntu. I'm glad it worked out for you on Ubuntu and very nice of you to spend some time and prepare this walk-trough. And thanks for the link back too ;) Code: db_dir = "/home/maxwell/.electrs/DATENBANK" I would avoid paths where your own home directory is written. I don't know if it would work, but I would give it a shot with something like Code: db_dir = "$HOME/.electrs/DATENBANK" Title: Re: Instructions Installation BTC-RPC-Block Explorer under Ubuntu Post by: MixMAx123 on October 30, 2021, 12:53:37 PM I would avoid paths where your own home directory is written. I don't know if it would work, but I would give it a shot with something like Thank you, I will customize. Code: db_dir = "$HOME/.electrs/DATENBANK" |