Blockchain explorer

Blockchain explorer

Run your own private blockchain explorer with BTC RPC Explorer (opens in a new tab). Trust your node, not some external services.

BTC RPC Explorer home screen with dark theme

Run your own blockchain explorer

After the MicroBolt runs your own fully validated node, and even acts as a backend for your hardware signing device with Electrum server, an important puzzle piece to improve privacy and financial sovereignty is your own Blockchain Explorer. It lets you query transactions, addresses, and blocks of your choice. You no longer need to leak information by querying a third-party blockchain explorer that can be used to get your location and cluster addresses.


Transaction indexing

For the BTC RPC Explorer to work, you need your full node to index all transactions.

  • If you followed this guide, the transaction index parameter is already enabled (txindex=1), and you can skip to the next section.
  • If this is not the case, you need to set the txindex=1 parameter in your Bitcoin client configuration file (bitcoin.conf): Bitcoin node configuration.
  • After adding the parameter, restart Bitcoin client, which will now index the whole blockchain
$SU rc-service bitcoind restart

Please note that reindexing can take more than a day. You can follow the progress using

tail -f /var/log/bitcoind/debug.log

Install dependencies

  • Install Node.js using the apk package manager.

These are make dependencies (safe to remove after installation, if you want)

$SU apk add npm

These are runtime dependencies

$SU apk add nodejs-current

Create the btc-rpc-explorer user/group

$SU addgroup -S btc-rpc-explorer
$SU adduser \
    -S \
    -D \
    -H \
    -h /dev/null \
    -s /sbin/nologin \
    -G btc-rpc-explorer \
    -g btc-rpc-explorer \

Add btc-rpc-explorer user to the bitcoin group

$SU adduser btc-rpc-explorer bitcoin

Add satoshi user to the btc-rpc-explorer group

$SU adduser satoshi btc-rpc-explorer

Firewall & reverse proxy

In the Security section, we set up NGINX as a reverse proxy. Now we can add the BTC RPC Explorer configuration.

  • Enable NGINX reverse proxy to route external encrypted HTTPS traffic internally to the BTC RPC Explorer
$SU $EDITOR /etc/nginx/streams-available/btc-rpc-explorer-reverse-proxy.conf
upstream btc-rpc-explorer {
server {
    listen 4000 ssl;
    proxy_pass btc-rpc-explorer;
$SU ln \
    -s \
    ../streams-available/btc-rpc-explorer-reverse-proxy.conf \
  • Test and reload NGINX configuration
$SU nginx -t
$SU rc-service nginx restart
  • Configure the firewall to allow incoming HTTPS requests
$SU ufw allow 4000/tcp comment 'allow BTC RPC Explorer SSL'

Modify node flags

printf "%s\n" \
    "export npm_config_cache=\"./npm-cache\"" \
    "export npm_config_devdir=\"./.gyp\"" \
    | $SU tee -a /etc/profile.d/
. /etc/profile.d/


BTC RPC Explorer (opens in a new tab) provides a lightweight and easy to use web interface to accomplish just that. It's a database-free, self-hosted Bitcoin blockchain explorer, querying Bitcoin client and Electrum server via RPC.

Download source code

We get the latest release of the BTC RPC Explorer source code and install it.

  • Download the source code for the latest BTC RPC Explorer release. You can check the release page (opens in a new tab) to see if a newer release is available. Other releases might not have been properly tested with the rest of the MicroBolt configuration, though.
cd /tmp
git clone --branch v$VERSION && cd btc-rpc-explorer

Signature check

wget -qO- | gpg --import
git verify-commit v$VERSION

Configure, patch and install

sed '/"node_modules\/sharp": {/,+21{d}; /sharp/d' npm-shrinkwrap.json > _
mv -f _ npm-shrinkwrap.json
  • Install all dependencies using the Node Package Manager (NPM).
npm install zeromq@6.0.0-beta.19
npm audit fix 

Installation can take some time, up to 20 minutes. There might be a lot of confusing output, but if you see something similar to the following, the installation was successful:

up to date, audited 621 packages in 3s

93 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
  • Make it a global permanent installation
$SU install -D -m 0660 -o btc-rpc-explorer -g btc-rpc-explorer ./.env-sample /etc/btc-rpc-explorer/.env
$SU mv -f /tmp/btc-rpc-explorer /var/lib/
$SU ln -s /var/lib/btc-rpc-explorer /usr/lib/node_modules/btc-rpc-explorer
$SU ln -s ../lib/node_modules/btc-rpc-explorer/bin/cli.js /usr/bin/btc-rpc-explorer


  • Activate any setting by removing the # at the beginning of the line.
$EDITOR /etc/btc-rpc-explorer/.env
BTCEXP_UI_THEME={dark|light} # Choose one
Slow device mode
Privacy mode
  • More information mode, including Bitcoin exchange rates:
  • More privacy mode, no external queries:
Security mode
  • You can add password protection to the web interface. Simply add password [D] for the following option, for which the browser will then prompt you. You can enter any user name; only the password is checked.
Remote access over Tor

To use your blockchain explorer when you're on the go, you can easily create a Tor hidden service on the MicroBolt and accessing the BTC RPC Explorer with the Tor browser from any device.

  • Add the following three lines in the "location-hidden services" section in the torrc file.
$SU $EDITOR /etc/tor/torrc
# Hidden Service BTC RPC Explorer
HiddenServiceDir /var/lib/tor/btc-rpc-explorer/
HiddenServiceVersion 3
HiddenServicePoWDefensesEnabled 1
HiddenServicePort 80
  • Reload Tor configuration and get your connection address.
$SU rc-service tor reload
$SU cat /var/lib/tor/btc-rpc-explorer/hostname
  • You should now be able to connect to your BTC RPC Explorer remotely via Tor using your hostname and port 4000

Autostart on boot

Now we'll make sure our blockchain explorer starts as a service on the computer so that it's always running.

  • Create the BTC RPC Explorer init.d unit and copy/paste the following configuration. Save and exit.
$SU $EDITOR /etc/init.d/btc-rpc-explorer
: ${BTCRPCEXPL_CONFIGFILE:=/etc/btc-rpc-explorer/.env}
: ${BTCRPCEXPL_DATADIR:=/var/lib/btc-rpc-explorer}
: ${BTCRPCEXPL_LOGDIR:=/var/log/btc-rpc-explorer}
: ${BTCRPCEXPL_USER:=btc-rpc-explorer}
: ${BTCRPCEXPL_GROUP:=btc-rpc-explorer}
: ${BTCRPCEXPL_BIN:=/usr/bin/btc-rpc-explorer}
name="BTC RPC Explorer"
description="Simple, database-free Bitcoin blockchain explorer, via RPC to Bitcoin Core"
start_stop_daemon_args="--stdout ${BTCRPCEXPL_LOGDIR}/debug.log
                        --stderr ${BTCRPCEXPL_LOGDIR}/debug.log"
depend() {
    need bitcoind
    if service_started fulcrum; then
        need fulcrum
        need electrs
start_pre() {
    checkpath --file      --mode 0660 --owner "${command_user}" "${BTCRPCEXPL_CONFIGFILE}"
    checkpath --directory --mode 0750 --owner "${command_user}" "${BTCRPCEXPL_DATADIR}"
    checkpath --directory --mode 0755 --owner "${command_user}" "${BTCRPCEXPL_LOGDIR}"
    checkpath --directory --mode 0755 --owner "${command_user}" "${BTCRPCEXPL_PIDDIR}"
checkconfig() {
        eerror ""
        eerror "ERROR: You must set a BTCEXP_BITCOIND_COOKIE path to run"
        eerror "BTC RPC Explorer."
        eerror "The setting must appear in ${BTCRPCEXPL_CONFIGFILE}"
        eerror ""
        return 1
  • Enable execution permission
$SU chmod +x /etc/init.d/btc-rpc-explorer

Enable logrotate

  • Enter the complete next configuration. Save and exit
$SU $EDITOR /etc/logrotate.d/btc-rpc-explorer
/var/log/btc-rpc-explorer/*.log {
    rotate 104
    create 0640 btc-rpc-explorer btc-rpc-explorer
        killall -HUP `cat /run/btc-rpc-explorer/`
  • Test
$SU logrotate /etc/logrotate.d/btc-rpc-explorer --debug

Enable and start BTC RPC Explorer

$SU rc-update add btc-rpc-explorer
$SU rc-service btc-rpc-explorer start
  • Check the log to see BTC RPC Explorer output. Exit with Ctrl-C
tail -f /var/log/btc-rpc-explorer/debug.log

For the future: BTC RPC Explorer update

Follow again Blockchain explorer page replacing the environment variable VERSION=x.xx value for the latest if it has not been already changed in this guide.

$SU $EDITOR /etc/btc-rpc-explorer/.env
  • Restart the service to apply the changes
$SU rc-service btc-rpc-explorer restart