Hosting Block Explorer

Install and run the Qwertycoin daemon on your server

You can install the Qwertycoin daemon from precompiled sources or compile it yourself. Guides for both are below.

Precompiled

  • You can download the precompiled binaries here. Enter your downloaded file through your terminal and run qwertycoind with an open port like so:
1
./qwertycoind --restricted-rpc --enable-cors=* --enable-blockchain-indexes --rpc-bind-ip=0.0.0.0 --rpc-bind-port=8197
Copied!

Compile yourself

  • This is a guide for compiling on Linux (Ubuntu). For other operating systems you can find a guide here.

Install dependancies

1
sudo apt-get install build-essential cmake git
Copied!
  • You will need Cmake version 3.10 to compile Qwertycoin. You can find a guide on installing that here.

Building

  • After installing the dependencies you can run this simple script:
1
git clone --recurse-submodules https://github.com/qwertycoin-org/qwertycoin
2
cd ./qwertycoin
3
mkdir ./build
4
cd ./build
5
cmake -DBUILD_ALL:BOOL=TRUE ..
6
cmake --build . --config Release
Copied!
  • If all went well, it will complete successfully, and you will find all your binaries in the ./build/src directory.
  • Finally run qwertycoind with an open port like so:
1
./qwertycoind --restricted-rpc --enable-cors=* --enable-blockchain-indexes --rpc-bind-ip=0.0.0.0 --rpc-bind-port=8197
Copied!

Install the block explorer code

You can host the block explorer with Apache or Nginx. For this guide I will be using Apache.
  • Install Apache
1
sudo apt-get update
2
​
3
sudo apt-get install apache2
4
​
5
sudo ufw allow 'Apache Full'
Copied!
  • Next download the block explorer code
1
git clone https://github.com/qwertycoin-org/qwertycoin-blockchain-explorer.git
Copied!
  • Change the 'api' variable in config.js to point to your daemon. Also change the '$apiNode=' variable in /api/index.php to point the API urls to your daemon.
  • Once that is done copy all the files to the html directory.
1
sudo cp -rf api/ config.js css/ favicon.ico index.html js/ LICENSE pages/ q/ README.md /var/www/html/
Copied!
  • Your block explorer can now be seen at your servers address.
Extra:
  • You can change the look of your block explorer by playing around with the css files.
Last updated on 2020-2-16
Last modified 1yr ago