Running a DigiByte Full Node on a Pine64 Rock64 - v2/v3

Fancy to create the most low-cost 64-Bit DigiByte Node, Full Node? Here is a small step by step guide.

The Rock64 Single Board Computer and a metallic casing

Will you host a Private or a Public DigiByte Node?

Anyway if you are not ready to let people connecting to your node, you are still helping the DigiByte network as you are keeping a copy of the blockchain.

How to buy the right hardware?

Rock64 do exists with different RAM option, be sure to choose the 4GB RAM model or the DigiByte wallet won’t simply be executed.

First of all, you need to get a Rock64 with 4GB RAM form here : https://store.pine64.org/?product=rock64-media-board-computer

Use a Rock64 Single Board Computer with 4GB RAM

I advice you to add these :

  • Rock’s 5V 3A Switching Power Supply (beware it is a specific power supply)
  • A nice casing for protection and show off
  • 64GB or 128GB Class10 Micro SD card
  • A Micro SD card reader for your PC
  • HDMI cable
  • Network cable to connect it to your router
  • A temporary computer screen or TV
  • A temporary Keyboard and Mouse

I ordered mine directly from https://pine64.org and it was a fast and a smooth experience.

Let’s begin

Now it’s time to launch the PIN64 Installer and to plug your Micro SD into your PC.

  • First step Choose your OS, at this stage, you’ll have to select “Rock64 -v3/v2 and Armbian Ubuntu 18.04 Bionic Desktop(Rock64 mciroSD / eMMC). If you want to play more easily with your Rock64 I recommend you to choose the desktop edition and not the minimal one.
Choose the desktop edition if you like to connect graphically to your Rock64
  • And choose your SD card by clicking on connect a Drive
  • Last step Flash! Introduce your password if asked and the software will download the OS and flash your sd card for you. This step can be a bit long depending on your Internet connection.

Booting up your Rock64

The wallpaper of your OS

There are two solid lights displayed on the board (a white and a red), nothing will flicker but your OS should display the boot sequence on the screen.

Soon you’ll be asked for a password, the default user and password are

  • user : root
  • password : 1234

Choose your password wisely, it shouldn’t be easy to guess as your Rock64 could be Internet facing, and write it down somewhere, you don’t want to loose it.

After this step you’ll have to choose a user name and a specific password for it. I did choose drake for my user, so when this guide will reference drake you should input your user name.

Set the clock

timedatectl

We see that it is in UTC, in my example I’d like to switch the timezone to Europe/Paris. If you like to know what are the timezones available, just time timedatctl list-timezones

The Rock64 is set in the UTC timezone

Now I’d like to change it, by entering the command:

sudo timedatectl set-timezone Europe/Paris

If you verify with the timedatectl command, you should see something like this:

Time to connect your Rock64 through an SSH connection

sudo ifconfig
Output for ifconfig

You’ll have to enter the password of your account and should receive an output looking like the one just above. We are looking for the IP address of the eth0 network card.

If you’re using a Mac or a Linux a SSH client is available directly in your Terminal window by entering

ssh drake@192.168.100.204

Where drake will be your Rock64’s user name and 192.168.100.204 should be replaced with the Rock64’s address IP. You’ll be asked if you accept the connection, just answer yes and provide the user’s password. You should see something like this:

First SSH Connexion to the Rock64

If you’re using a PC, you should download Putty from here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

In Putty fill-in the Rock’s IP address choose SSH and click on Open.

Increasing the Swap Space

The Armbian Debian has been set with 1GB swap memory. We’ll increase it by 8GB: just copy/paste these 3 commands

sudo fallocate -l 8G /swap
sudo chmod 0600 /swap
sudo mkswap /swap
sudo swapon /swap

We can verify this using this command

free -hm
9GB Swap Space, more than what we need :)

Make it permanent

  • edit /etc/fstab
sudo nano /etc/fstab
  • add this line at the end of the file:
/swap swap swap defaults 0 0
  • save the file by entering Control+X and answering Yes
Telling the Rock64 to use the /swap space

Next reboot it will use this swap space automatically

Setting up the DigiByte Node

The DigiByte Core can be downloaded here: https://github.com/digibyte/digibyte/releases. When I wrote this guide the last version was 7.17.2.

The new 7.17.2 version introducing Odocrypt algorithm and the new security feature Dandelion++

Be sure to use at least the version V7.17.2, this is a mandatory version.

First of all your Rock64 will use the aarch64 packages, we are not looking for the arm packages that are for the Raspberries.

You are looking for the aarch64 package

Choose the last release where an aarch64 package is avalaible for download, copy the link of the package with a right click and type this in your SSH console :

cd ~wget https://github.com/digibyte/digibyte/releases/download/v7.17.2/digibyte-7.17.2-aarch64-linux-gnu.tar.gz
Downloading the las DigiByte Core wallet with wget on your Rock64

When the download is finished, we’ll want to uncompress the downloaded archive using this command:

tar -xvf digibyte-7.17.2-aarch64-linux-gnu.tar.gz
Untaring the archive

You have to change the permission to let know your Rock64 that it is ok to run these files that are coming from the Internet :

chmod +x digibyte-7.17.2/bin/*

Almost done here, you just need to copy/paste these 2 commands:

sudo ln -s /home/your_username/digibyte-7.17.2/bin/digibyted /usr/bin/digibyted
sudo ln -s /home/
your_username/digibyte-7.17.2/bin/digibyte-cli /usr/bin/digibyte-cli
sudo ln -s /home/
your_username/digibyte-7.17.2/bin/digibyte-qt /usr/bin/digibyte-qt

Creating the DigiByte node’s config file

mkdir ~/.digibyte

The folder you just created will be use for storing the blockchain.
Please copy/paste the following lines:

cat << EOF > ~/.digibyte/digibyte.conf
listenonion=0
maxmempool=50
maxconnections=80
EOF
The > are coming automatically for you

This config file will disable Tor (The Onion Router) to improve memory. The mempool size is kept at 50MB and the maximum external connections are set to 80. By default, DigiByte Core allows up to 125 connections, 8 of which are booked for outbound. With these settings you’ll have a maximum of 72 incoming connections and 8 outgoing.

You can experiment with these settings if you like.

Starting up the Node in headless mode

digibyted &

The node will run in background, but if you want to know what is happening just use :

tail -f ~/.digibyte/debug.log

Starting up the Node in GUI mode

digibyte-qt &
The node is starting up in GUI mode, be patient it’ll take a long time to load the block index before going on
The block index has been read and now the node is syncing the new headers
The node is ready

How to know if it is working?

  • the out connections are the number of peers your are connected to
  • the in connections are the number of peers that are connected to your full node.
You are connected to 14 peers and 2 peers are connected to you. To have incoming connections, you have to go public, more on this later.

You can still check what is happening in background ready the debug logs in real time:

tail -f ~/.digibyte/debug.log
What you can see when the node is starting: it’ll take time to rewind all its blocks before connecting. Just be patient…

Make your DigiByte Full Node restart automatically after a reboot

First of all we create the service file by using this command:

sudo cat << EOF > ~/digibyted.service
[Unit]
Description=DigiByte Core Wallet (digibyted)
After=syslog.target network.target
[Service]
Type=simple
User=drake
PAMName=login
ExecStart=/usr/bin/digibyted
[Install]
WantedBy=multi-user.target
EOF
The service file has been created in your home folder

Then we change the owner and move the file in the right place:

sudo chown root:root digibyted.service
sudo mv ~/digibyted.service /etc/systemd/system/

You can check if the file is at the right place with this command:

sudo ls -ail /etc/systemd/system/
The file should be displayed here

Now we inform the Rock64 that there is a new service and it might want to start it automatically at boot time:

sudo systemctl daemon-reload
sudo systemctl enable digibyted.service

Now reboot your Rock64 and check if the DigiByte Node is running by itself:

sudo systemctl status digibyted.service
The Rock64 has been rebooted and the Digibyte node has been started at boot time!

Don’t forget that you can still check the debug log files to check if your node is working:

tail -f ~/.digibyte/debug.log

How to manage your Rock64 remotely with a graphical interface?

https://link.medium.com/DbcoJR0gtW

Graphically monitor your Rock64 with SSH and s-tui

It is pretty straightforward to install, just enter these commands to install and detect the sensors:

sudo apt-get install lm-sensors
sudo sensors-detect

Say yes to all questions and carry on with these commands that will install s-tui:

sudo apt-get install python3-pip stress
sudo apt-get install python3-dev
sudo -H pip3 install --upgrade setuptools
sudo -H pip3 install ez_setup
sudo -H pip3 install s-tui

Now it has been installed, to launch it:

sudo s-tui

If you want to have all the information, you have to run s-tui with sudo.

Too bad the Rock64 has no Power sensor

Going public

Why not mining with your Rock64?

https://medium.com/@david_senate/running-a-super-low-cost-digibyte-scrypt-miner-rig-with-a-raspberry-pi-3-model-b-and-a-futurebit-14dd7d95e566

IT Guru • Defender against the Digital Dark Arts🛡 • Blockchain Advocate 🔑️. https://xn--l9hygo898lbsb.y.at

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store