News:

Forum Rules can be found here

Main Menu

How to run groestlcoin Core on a Raspberry Pi

Started by jackielove4u, January 06, 2016, 05:45:29 PM

Previous topic - Next topic

jackielove4u

Requirements:
- A Raspberry Pi (4). (This tutorial is tested with a Raspberry Pi 4)
- A good power supply. (I can't stress this enough: for the Raspberry Pi 4 use proper cables and at least a 2A PSU)
- Storage!
Considering the size of the blockchain at moment of writing being around 2GB. We need to use a 4GB+ sdcard, or an external hard drive/usb stick + a small microSD card. (I will be using a 128 GB external HDD, with an 4gb microSD card).
- A raspbian image: http://downloads.raspberrypi.org/

Preparing the SDcard:
Now that we have downloaded the raspbian image, we need to write it to the microSD card, I recommend doing this on a Windows machine with Win32DiskImager, because it is the easiest way to image an existing SDcard, as well as writing an image to it, without the use of terminal/command line.
Instructions for Mac and Linux can be found here: https://www.raspberrypi.org/documentation/installation/installing-images/

Booting up and configuring the Raspberry Pi 4:
sudo raspi-config

This opens the raspberry configuration.
First, we expand the filesystem. (To make sure we have access to all of the space on the SDcard). Then navigate to SSH and enable it. Exit the configuration and reboot.
Next, we need to find the IP address of the Rpi. For that we type: 'ifconfig' in terminal, which returns the ip address of the pi.
Now that we have SSH working, and know the IP address, we can use any computer to configure the rpi. I will be using putty SSH client to connect. (but you can also just ignore SSH, and just run these commands in the terminal on your pi).

The default login:
Username: pi
Password: raspberry

We start with updating raspbian using:
sudo apt-get update
sudo apt-get upgrade

You can install Groestlcoin core on 2 ways:
- Install it manually
- Automatic using this script:
#!/bin/bash
echo "Groestlcoin Installer RPI"
if [[ $EUID -ne 0 ]]; then
  echo "You must be a root user" 2>&1
  exit 1
else
  echo "Running as Root"
fi

#Getting Deps
echo "Installing Dependancies"
apt-get install -y build-essential autoconf libssl-dev libboost-all-dev libdb5.3 libdb5.3-dev libdb5.3++-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev libtool automake libevent-dev bsdmainutils git ntp make g++ gcc cpp ngrep iftop sysstat autotools-dev pkg-config libminiupnpc-dev libzmq3-dev libsqlite3-dev

git clone https://github.com/Groestlcoin/groestlcoin.git
cd groestlcoin || echo "Failed!"; exit
sh autogen.sh
./configure
make
make install

Install Groestlcoin manually:
apt-get install -y build-essential autoconf libssl-dev libboost-all-dev libdb5.3 libdb5.3-dev libdb5.3++-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev libtool automake libevent-dev bsdmainutils git ntp make g++ gcc cpp ngrep iftop sysstat autotools-dev pkg-config libminiupnpc-dev libzmq3-dev libsqlite3-dev

Cloning groestlcoin:
git clone https://github.com/Groestlcoin/groestlcoin.git
cd groestlcoin

Configuring and building:
/autogen.sh
./configure
make

!! This will take some time!!
!! For a Raspberry Pi 4 use make -j4 !!


After the make command has finished, we can finally install Groestlcoin with:
sudo make install

Starting groestlcoin-qt:
Since I am using an external hard disk to store the chain on, I need to run groestlcoin core with the -datadir= command: groestlcoin-qt -datadir=/location/of/hard/disk/ . An other option would be symlinking .groestlcoin to the external hard disk.
And we see that Groestlcoin Core starts up, and begins syncing. Syncing on a raspberrypi 4 goes slow, really slow. (Do not overclock your Pi when running groestlcoin, it produces the strangest errors).

Port forwarding port 1331 to the rpi:
In order to accept incoming connections, we need to forward port 1331 in the router to the IP address of the rpi. We have the IP address from the ifconfig command. It is wise to make the IP address a static entry in the DHCP-server of the router. The website www.portforward.com has many samples of how to do this on many different devices.

If everything has gone well, you will now see that you have more than 8 connections to the network. Congratulations, you are now running a full node with wallet.