Install a block explorer on Ubuntu Server 18.04we assume that you have already installed and started bitcoin daemon, configured bitcoin.conf already and know the rpc data.
(or other altcoin forks of bitcoin)
Source code: https://github.com/iquidus/explorerUpdate your Ubuntu server with the following command:sudo apt-get update && sudo apt-get upgrade -y
Install the required dependencies with the following command:sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libboost-all-dev libboost-program-options-dev -y
Install the additional dependencies with the following command:sudo apt-get install libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler unzip software-properties-common libkrb5-dev mongodb nodejs npm git nano cmake screen -y
Install Berkeley DB with the following command:sudo apt-get update && sudo apt-get install libdb4.8-dev libdb4.8++-dev -y
Type the following command to open MongoDB:
Type the following command to create a MongoDB database named “explorerdb”:
Type the following command to create a MongoDB user named “iquidus”:
db.createUser( { user: "iquidus", pwd: "[b]custompassword[/b]", roles: [ "readWrite" ] } )
Type the following command to close MongoDB:
Type the following command to clone iquidus-explorer:
git clone https://github.com/iquidus/explorer explorer
Type the following command to install iquidus-explorer:cd explorer && npm install --production
Type the following command to create the file settings.json:
cp ./settings.json.template ./settings.json
Open nano.
Modify the following values in the file settings.json
title - “IQUIDUS” -> “
changeme”.
address - Change the value “127.0.0.1” with the IPv4 address of your server.
coin - “Darkcoin” -> “
changeme”.
symbol - “DRK” -> “
changeme”.
password - “3xp!0reR” -> “
custompassword”.
port - “9332” -> “
changeme”.
user - “darkcoinrpc” -> “
changeme”.
pass - 123gfjk3R3pCCVjHtbRde2s5kzdf233sa” -> “
changeme”.
confirmations - “40” -> “
changeme”.
Save the file with the keyboard shortcut ctrl + x.
Type the following command to open a screen session:
Type the following commands to start your block explorer:
cd $HOME/explorer
npm start
Press the keyboard shortcut ctrl + a + d to disconnect from your screen session.
Type the following command to open crontab:Press the Page Down key on your keyboard PgDown.
Paste the following text into crontab.
@reboot bitcoind
*/1 * * * * cd /root/explorer && /usr/bin/nodejs scripts/sync.js index update > /dev/null 2>&1
*/5 * * * * cd /root/explorer && /usr/bin/nodejs scripts/peers.js > /dev/null 2>&1
Save the crontab with the keyboard shortcut ctrl + x
Confirm that you want to save the crontab with the keyboard shortcut y + enter