Block explorer¶
Difficulty: Hard Tested v0.18.5.3
onion-monero-blockchain-explorer (xmrblocks) is a self-hosted Monero block explorer. It reads your node's database directly, so lookups never leave your home. It can also decode outputs with a view key and check payment proofs, all privately.
Why it's rated Hard
The explorer must be compiled against the Monero source code, so you build Monero too. This takes 30–90 minutes, needs ~4 GB of RAM (add swap if needed), and every Monero upgrade means rebuilding both. Sometimes the explorer lags behind new Monero releases.
Ubuntu 26.04
Ubuntu 26.04 ships CMake 4 and Boost 1.90, both newer than most Monero tooling was written for. The explorer's build files were updated for them, but at the time of writing there's an open report that its master branch fails to compile. Check that issue before you start.
Requirements¶
- 2.1 Monero node synced
- ~10 GB of free disk space for the source code and build
Build dependencies¶
Install the packages from the Monero build guide for Ubuntu, as shown in the moneroexamples compilation guide. For Ubuntu 26.04:
sudo apt install -y build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev \
libsodium-dev libunwind-dev liblzma-dev libreadline-dev libexpat1-dev libpgm-dev \
libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev \
libboost-all-dev libcurl4-openssl-dev git
Build Monero and the explorer¶
The explorer must read the blockchain as the monero user, so build it as that user:
Build Monero (the cmake step of the explorer looks for it in ~/monero by default):
git clone --recursive -b v0.18.5.3 https://github.com/monero-project/monero.git ~/monero
cd ~/monero
USE_SINGLE_BUILDDIR=1 make -j$(nproc)
Build the explorer:
cd ~
git clone https://github.com/moneroexamples/onion-monero-blockchain-explorer.git
cd onion-monero-blockchain-explorer
mkdir build && cd build
cmake ..
make -j$(nproc)
exit
Autostart on boot¶
# MoneroBox: systemd unit for the Monero block explorer
# /etc/systemd/system/xmrblocks.service
[Unit]
Description=Monero block explorer (xmrblocks)
Requires=monerod.service
After=monerod.service
[Service]
User=monero
Group=monero
Type=simple
WorkingDirectory=/home/monero/onion-monero-blockchain-explorer/build
ExecStart=/home/monero/onion-monero-blockchain-explorer/build/xmrblocks \
--bc-path=/data/monero/lmdb \
--daemon-url=http://127.0.0.1:18081 \
--port=8081 \
--enable-json-api \
--enable-autorefresh-option
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target
Note
Run xmrblocks --help to check the options of the version you built. Add --enable-pusher to be able to broadcast signed transactions, or --enable-emission-monitor to track the total supply.
Access¶
The explorer listens on all interfaces. Open its port in the firewall:
Open http://NODE_IP:8081 in your browser.
Over Tor
Add another onion service in /etc/tor/torrc, like in 2.2:
Upgrade¶
After every Monero upgrade, as monero: git fetch --tags && git checkout vNEW && git submodule update --init --force in ~/monero, rebuild it, then git pull and rebuild the explorer, and finally restart xmrblocks.