Running a Digibyte Full Node on a Pine64 Rock64
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?
Depending on how you want to connect your Rock64, you’ll have a private or a public node. The only difference between these two are if your firewall or your router is preventing other DigiByte users from discovering your 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?
This guide is based on using a Rock64 with 4GB RAM from Pine64. At this time Raspberry Pi don’t have enough memory, which is preventing the DigiByte Wallet to be executed.
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.
Once you’ve got the hardware, it’ll be the time to install the operating system on the Rock64. Pine is providing a installer that is pretty easy to use and that works on the biggest OS.
- Download the PINE64 Installer here : https://github.com/pine64dev/PINE64-Installer/blob/master/README.md#download
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
Now you’re ready, attach your monitor, the keyboard, the mouse and the network to your Rock64, pop in the Micro SD card in the slot and plug the power.
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
I recommend to set the timezone of your Rock64. To see in what timezone it is working do:
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
First you’ll have to know which IP address has been given to your Rock64. Open a terminal window and type :
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
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
To be able to run smoothly the DigiByte Core Wallet, you should at least have 8GB disk reserved for the Swap Space. Swap Space is a place where memory is copied to the hard drive if it need more, it is called virtual memory.
The Armbian Debian has been set with 1GB swap memory. We’ll increase it by 8GB: just copy/paste these commands
sudo fallocate -l 8G /swap
sudo chmod 0600 /swap
sudo mkswap /swap
sudo swapon /swap
We can verify this using this command
9GB Swap Space, more than what we need :)
Make it permanent
We have to add a line to /etc/fstab to tell the Rock64 to use this extra swap space when it boots:
- 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
First of all I’d like to thank Josiah Spackmann who helped me to succeed in creating this part of the guide.
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 :
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
You’ll need a config file before stating it up. These settings will make it run smoothly.
The folder you just created will be use for storing the blockchain.
Please copy/paste the following lines:
cat << EOF > ~/.digibyte/digibyte.conf
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
It is pretty easy now, just run this command:
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
For a real full node server I prefer the headless mode, but you can always use it with the graphical interface if you prefer, use this command:
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?
To know it your node is working and if there are any connections to your Rock64, open the menu Help and select Debug window. You’ll be able to see several useful informations, such as the number of connections:
- 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
This part might seem just a bit more techy, but if you copy and paste the following commands, it should be easy enough to set that up.
First of all we create the service file by using this command:
sudo cat << EOF > ~/digibyted.service
Description=DigiByte Core Wallet (digibyted)
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?
If you’re interested in using a secure VNC to remote control your Rock64 with a graphical interface, this is the guide you need:
Graphically monitor your Rock64 with SSH and s-tui
s-tui is a terminal, graphical User Interface for monitoring your computer.It allows monitoring CPU temperature, frequency and utilization. It is developed in Python and also requires minimal resources and it is possible to run it through a SSH connection.
It is pretty straightforward to install, just enter these commands to install and detect the sensors:
sudo apt-get install lm-sensors
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:
If you want to have all the information, you have to run s-tui with sudo.
Too bad the Rock64 has no Power sensor
If you want to really be a part of the DigiByte Nodes and are ready to let people connect to your wallet, just NAT the TCP port 12024 in your router/firewall and make it point the same port of your Rock64.
Why not mining with your Rock64?
If you’re looking into mining, you can follow this guide I made for the Raspberry Pi:
Did you find this article valuable?
Support D Ʌ V I D ★ S Ξ N Ʌ T Ξ by becoming a sponsor. Any amount is appreciated!