Skip to main content

Pi-Node (Quick Start)

info

After booting the image it will take about 30 minutes to download the chain and another couple hours or so to sync to the tip. You will not be able to do much until your node has synced with the tip of the block chain.

It can take anywhere from 2 to 60 minutes to sync after a reboot depending how the node was shut down or restarted. Check if process is running with htop. If it is, use gLiveView.sh or go for walk. It will sync and the socket will be created.

It is best to just leave it running. 🏃♀

1. Download and flash the Pi-Node.img.gz.

2. ssh into the server.

>_ Terminal
ssh ada@<pi-node private IPv4>

Default credentials = ada:lovelace

caution

Check which version of cardano-node is on the image. Follow the static build upgrade instructions to upgrade. static-build.md

>_ Terminal
cardano-node version

Choose testnet or mainnet. Defaults to testnet.

Switch between testnet & mainnet, for mainnet issue..

Config file path /home/ada/.adaenv

>_ Terminal
sed -i .adaenv -e "s/NODE_CONFIG=testnet/NODE_CONFIG=mainnet/g"; source .adaenv

Retrieve node files

>_ Terminal
cd $NODE_FILES
wget -N https://hydra.iohk.io/build/${NODE_BUILD_NUM}/download/1/${NODE_CONFIG}-config.json
wget -N https://hydra.iohk.io/build/${NODE_BUILD_NUM}/download/1/${NODE_CONFIG}-byron-genesis.json
wget -N https://hydra.iohk.io/build/${NODE_BUILD_NUM}/download/1/${NODE_CONFIG}-shelley-genesis.json
wget -N https://hydra.iohk.io/build/${NODE_BUILD_NUM}/download/1/${NODE_CONFIG}-alonzo-genesis.json
wget -N https://hydra.iohk.io/build/${NODE_BUILD_NUM}/download/1/${NODE_CONFIG}-topology.json
wget -N https://raw.githubusercontent.com/input-output-hk/cardano-node/master/cardano-submit-api/config/tx-submit-mainnet-config.yaml

Run the following to modify ${NODE_CONFIG}-config.json and update TraceBlockFetchDecisions to "true" & listen on all interfaces with Prometheus Node Exporter.

>_ Terminal
sed -i ${NODE_CONFIG}-config.json \
-e "s/TraceBlockFetchDecisions\": false/TraceBlockFetchDecisions\": true/g" \
-e "s/127.0.0.1/0.0.0.0/g"

3. Enter the pi-pool folder.

>_ Terminal
cd /home/ada/pi-pool

4. Download database snapshot.

>_ Terminal
wget -r -np -nH -R "index.html*" -e robots=off https://$NODE_CONFIG.adamantium.online/db/

5. Enable & start the cardano-service.

>_ Terminal
cardano-service enable
cardano-service start

6. Enable & start the cardano-monitor.

>_ Terminal
cardano-monitor enable
cardano-monitor start

7. Confirm they are running.

>_ Terminal
cardano-service status
cardano-monitor status

Follow journal output or syslog

>_ Terminal
sudo journalctl --unit=cardano-node --follow
sudo tail -f /var/log/syslog

8. gliveview.sh

Allow these files to update if they wish to.

>_ Terminal
cd $NODE_HOME/scripts
./gLiveView.sh

9. Grafana.

Enter your Node's IPv4 address in your browser.

Default credentials = admin:admin