Skip to main content

Pi-Node (Image Quick Start)

info

After booting the image you can edit the ~/.adaenv file to switch to mainnet. Image defaults to testnet. Source .bashrc to load changes to .adaenv. You can then choose to start the node and sync the whole chain which will take days or you can download the snapshot for mainnet or testnet which should reduce sync time to a couple hours.

Check if process is running with htop, use gLiveView.sh or follow the systemd service with

>_ Terminal
journalctl -f --output=cat -u cardano-node

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 edit manually or run

>_ 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 ledger 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 -f --output=cat -u cardano-node
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

Dashboards and pooldata api info can be found here.