The BSQ explorer provides basic information about BSQ transactions. It is based on static html pages which are rendered from json files generated by a Bisq application running on the server. Beside http server and Bisq (we run a seednode instance) we require bitcoind as the Bisq node is running in fullnode mode.
Requires Bisq seednode with --dumpBlockchainData=true
sudo apt-get update
sudo apt-get install nginx
Check that it's running
systemctl status nginx
Copy nginx.config to /etc/nginx/sites-available and symlink from /etc/nginx/sites-enabled. Remove sym link to
default site. Replace hostname
with site name.
Install certificate
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --nginx
Set automatic certificate renewal in crontab. Try to renew every month. Edit crontab...
sudo crontab -e
...and paste this line2
0 0 1 * * certbot renew
Some needed pyhton packages
sudo pip install python-bitcoinrpc
sudo pip install simplejson
sudo pip install gitpython
Setup symlink inside explorer/www to Bisq seednode db directory
ln -s /home/sqrrm/.local/share/dao_test/seed_2002/btc_regtest/db data
HTML need to point to explorer/www
cd /var/www
ln -s @EXPLORER_HOME/www html
Bitcoin blocknotify script needs nc
sudo apt install netcat-openbsd
Example bitcoin.conf
testnet=1
lang=en
whitelist=127.0.0.1
rpcallowip=127.0.0.1
rpcport=18332
server=1
txindex=1
rpcuser=bisquser
rpcpassword=bisqpasswd
blocknotify=bash $HOME/.bitcoin/blocknotify %s
Example blocknotify
#!/bin/bash
echo $1 | nc -w 1 127.0.0.1 5110
Run the python script from inside the explorer directory
cd @EXPLORER_HOME
python bsq_json.py
Best to set that up in a crontab for now