Skip to content Skip to main navigation Skip to footer

Running a full Florin Node on Linux

You are able to support the Florin network by running a full node. A full node is validating transactions and blocks on the Florin blockchain and it helps getting the network more decentralized. This tutorial describes the setup of such node for Linux (Ubuntu 18.04 LTS). You are able to run a full node from your server/desktop at home but you’re also able to run it on your vps/dedicated server located at your hosting provider, which is preferable due to the fact that full nodes at least should run for a few hours a day (24/7 would be better of course).

Enough, let’s start:

Step 1:

Create directories and download and extract Florin software

We want to run the Florin software under your own user account (not root). Log in with your user account and go to a directory where you have permissions to create a new directory:

mkdir florin

Enter the directory:

cd florin

Download the latest Florin software from Github. In this example we are going to install Florin version 2.0.6:

wget https://github.com/florinxfl/florin-core/releases/download/v2.0.6/Florin-2.0.6-x64-linux.tar.gz

Extract/unzip the .gz file:

tar -zxvf Florin-2.0.6-x64-linux.tar.gz

Three files have been extracted:

  1. Florin-cli (this is the client, which is needed to execute commands for receiving data from the blockchain)
  2. Florin-deamon (the “server” which needs to run in order to act as a full node)
  3. Florin-tx (needed to create, parse, or modify transactions, but not needed for now..)

Now we need to create a new directory to configure the server settings:

mkdir datadir

Step 2:

Configure server settings

The settings will be put into a configuration file. Create the new file in this directory by using your favorite text editor (we use the vi editor):

vi datadir/florin.conf

add the following settings:

disablewallet=1
maxconnections=20
rpcuser=username
rpcpassword=changepassword
rpcallowip=127.0.0.1

and save the file.

Some explanation

disablewallet

0 means that you are able to send and receive transactions, setting this to 1 will disable this. It is highly recommended to disable this feature if you want to run a full node only (especially if you run the node on a public server).

maxconnections

The maximum number of peers who are allowed to connect to your node. 20 connections are recommended for low/mid range systems. If you have a high end system, you can increase the total connections.

rpcuser

Choose a username who is allowed to execute the rpc commands via the server

rpcpassword

Choose a password for the rpcuser

rpcallowip

Allow only rpc commands from your local host (127.0.0.1 is the ipaddress of your local system)

Step 3:

Firewall configuration

If you do not have a firewall installed, you can skip this part and go to step 4.

Add these rules to your firewall and enable them:

sudo ufw allow ssh
sudo ufw allow 9233
sudo ufw enable

Step 4:

Now it’s time to run your node and check if it’s working!

To start your node:

./Florin-daemon -datadir=./datadir &

Wait a few minutes, it take some time to load the server. After that, check if the server is running by checking the version of the software:

./Florin-cli -datadir=./datadir getinfo

The result will display the wallet/server version :

{
“version”: 2000006,
“protocolversion”: 70017,
etc…
}

Sounds good, the software is working! In the background still a few processes are running (setting up the peers/connections, importing the blocks from the chain, etc). This can really take a long time (somewhere between 30 and 60 minutes, sometimes even longer).

To check if your server blocks are in sync with the blockchain, check the latest block on Dactual.com and then run this command to check the last loaded block on your server:

./Florin-cli -datadir=./datadir getblockcount

The result should match with the block number on Dactual. If not, then the blockchain is still syncing. Just repeat this command even now and then until the numbers matches. When it matches, your server is in sync with the blockchain!

After that, you can check with the following command how many other Florin clients/wallets are connected to your node:

./Florin-cli -datadir=./datadir getconnectioncount

The result should be more then “0”

Also check if you have both inbound and outbound connections:

./Florin-cli -datadir=./datadir getpeerinfo

Inbound connections should have value “inbound”: true
Outbound connections should have value “inbound”: false

Step 5:

Start your node automatically after system booting, and check if the server/wallet is running

There are different ways to start your Florin server/wallet after you have (re-) started your system. But let’s go a little bit further. We create a script which monitors each 5 minutes if the Florin server/wallet is running. If not, then it will be started automatically by the script.

Creating the script

In the Florin main directory, create and edit a new file with your favorite text-editor (we use vi again..):

vi florinchecker.sh

Add the following text and make sure you change the “/full/path/toyour/florindirectory/” to match your own settings! (This script is initiatly created by Bastijn, and tweaked by FlorinFans in order to make it work for Florin): #!/bin/sh
# set -x

# Shell script to monitor if the Florin-daemon is running
# If the number of Florin-daemon processes is <= 0
# it will start Florin-daemon.
# -------------------------------------------------------------------------

# set alert level 0 is default
ALERT=0

#
#:::::::::::::::::::::::::::::::::::::
#
usep=$(ps aux | grep Florin-daemon | wc -l | awk '{print $1-1}')
echo $usep

if [ $usep -le $ALERT ] ; then

/full/path/toyour/florindirectory/Florin-daemon -datadir=/full/path/toyour/florindirectory/datadir &
sleep 60

fi

Save the script.

Make sure that the script is executable:

chmod +x florinchecker.sh

Now add this script as a cronjob

crontab -e

add this line

5,10,15,20,25,30,35,40,45,50,55 * * * * /full/path/toyour/florindirectory/florinchecker.sh

(don’t forget to change the full path again)

Save it. Done.

Now each 5 minutes the script will check if your server/wallet is running, if not it will start automatically.

Was This Article Helpful?

3