Installing ZooBC node in Rapberry Pi (Article)

Previously, we did a tutorial on how to set up a ZooBC node on the Ubuntu machine and virtual private server or VPS. In today’s tutorial, I’m going to help you learn how to install the ZooBC node on the Raspberry Pi. Theoretically, it should be identical, yet somebody tells me  some of the processes might go differently, so without further ado, let’s just start the demonstration, shall we?

  1. Make sure the Raspberry Pi is connected to WiFi. After we have the internet connection in place, let’s open our terminal and access our SSH by using the following command:

$ ssh root@IPAddress 

This has automatically turned the Raspberry Pi as a system root.

  1. First, make a new directory by using command:

$ mkdir zoobc

Then, go inside the directory :

$ cd zoobc

  1. Now, we need to Install the installer:

$ wget

  1. Next, we need to make turn the file into an executable one by running this command below:

$ chmod +x

  1. Now, let’s launch the server:

$ ./ mainnet

 Now that the script is already up and running, it will recognize that we are running on a Raspberry Pi and, in response,  downloading the correct binary. 

  1. Similar to the one that we did on a Linux server, once the script has finished downloading, it will then ask you to provide information on the PORT. Yet, because we are still going to use the default setting, for now we can just click “enter”. 
  1. Now, the system will ask you for inputs using a certificate or owner address, same as the last one, we are going to use the second option,: the account address. 

On the other hand, let’s go to and let’s create a new ZooBC account for this tutorial and call it “RasPi”, same like before, using the same  account address; you just need tocopy the address to input it to our terminal, and enter. 

  1. At this point we’re gonna check whether the software has already been up and running. In order to check the activity status of the software,  we can just type the following commands:

$ sudo /root/zoobc.setup/zoobc.mainnet/zoobc daemon install 

$ sudo /root/zoobc.setup/zoobc.mainnet/zoobc daemon start

To see the activity status of the software, use the following command:

$ sudo /root/zoobc.setup/zoobc.mainnet/zoobc daemon status

Once you’ve verified that the status is already running, so in theory at least, there should be no problems with the node. 

  1. Next let’s go inside the ZooBC mainnet directory by using the following command:

$cd zoobc.mainnet/

Then, we’ll list all the files down inside the directory using the following command line:

$ ls -alsh

Here, we have our configuration files and resources in two binaries. 

  1.  Let’s test it again with the following command:

$ ./zcmd -h 

Then we have all different functionalities to interact with the nodes, 

  1. And if we enter the command into the directory resource, you can find all the database which has been created 

$ cd resource/ 

Then, to see all the files in the database, use the following command 

$ ls -alsh 

  1. If we go inside the log directory, we will see the following…

$ cd .log

You can see some logs have already been recorded there. And let’s go back into the resource using the following command:

$ cd ..

  1.  Let’s test the site now; you can access it using the following command:

$ sqlite3

And you can see that using the command written above has resulted in a system error. This happens because we have not installed the system yet, so, for starter, we need to install it first with an apt-get command line:

$ apt-get install sqlite3

Now, having already installed the system, let’s try again using the following command:

$ sqlite3

As you can see, we have successfully installed it!

  1. Next, let’s try to opening the table. But, before we do that, first of all we need to connect to the database, using the following command:

sqlite> .open /root/zoobc/zoobc.mainnet/resource/zoobc.db

As you can see, by now we have been able to successfully access the database. As you can see from the image above: all the tables in the database have already appeared there.

  1. To see what fields  are available in the database, let’s test the schema of the main block

sqlite> .schema main_block

From there, you can see the information about the ID, the block height 

  1. We also can  SELECT max (height) FROM the main_block, which shows it still at 0, which means that the node is not  updated to the Raspberry Pi. Probably, the router needs to let the port forward  the correct internal IP address, but that is for another tutorial! 

In this step, we have basically done installing ZooBC nodes in the Raspberry Pi. To see more of the step-by-step process you can check our Youtube video or click link here