GNTL Node - The-GNTL-Project/Documentation GitHub Wiki

Description

This is an example of how to run a GNTL Node in a Screen session. A service file is used to run a bash script located in our home location, in a detached screen session. We will be using Debian/Ubuntu as our distribution, the commands may differ for other distributions.

Where you see USERNAME, substitute this to your username being used to log into the system, e.g. bkdilse

Installation

Pre-requisites

These are all required before you proceed:

  1. Basic Linux knowledge.
  2. Knowledge of using nano as our file editor.
  3. A Linux machine setup, with screen installed, at least 512MB RAM, and 1 CPU Core available for use.
  4. Firewall rule to allow P2P (Daemon Sync): 16661 (TCP In/Out)
  5. Firewall rule to allow RPC (Wallet Sync): 16662 (TCP In).

GNTL Release binaries

Grab the download link for the latest GNTL Release.

We'll use v1.0.6 compile, as an example:

wget https://github.com/The-GNTL-Project/gntl/releases/download/v1.0.6/GNTL-Linux-x86_64-v1.0.6.tar.gz

Create extract binaries, and remove the downloaded file:

tar -xvf GNTL-Linux-x86_64-v1.0.6.tar.gz
rm GNTL-Linux-x86_64-v1.0.6.tar.gz

Bash Script

Let's create our bash script, which will run the node with our chosen parameters:

nano ~/GNTLNode

Here is the content for our bash script:

#!/bin/sh
screen -dmS GNTLDaemon ~/gntl/gntld --rpc-bind-ip 0.0.0.0 --confirm-external-bind --restricted-rpc --public-node

Grant our bash script, read and execute permissions:

sudo chmod +rx ~/GNTLNode

Configure Service

Let's create our Service, which will call our Bash Script:

sudo nano /etc/systemd/system/GNTLNode.service

Here is the content for our service:

[Unit]
Description=GNTL Node Service
After=network-online.target

[Service]
LimitMEMLOCK=infinity
Type=forking
RemainAfterExit=yes
User=USERNAME
WorkingDirectory=/home/USERNAME
ExecStart=/home/USERNAME/GNTLNode
KillMode=none

[Install]
WantedBy=multi-user.target

Reload services, and enable GNTLNode:

sudo systemctl daemon-reload
sudo systemctl enable GNTLNode

GNTL Blockchain Import

To save time, you can download the GNTL Blockchain Database to speed up the initial sync, else you will be waiting a while for sync to complete.

Completion

We can now reboot our server, to confirm all went well, and see our node running in a screen session, once the server has started up:

sudo reboot

Checks

Now that our server has been rebooted, our service should have started and called the bash script. Let's attach to the screen session confirm the GNTL Daemon is syncing:

screen -r GNTLDaemon

You should see the daemon syncing away, with progress status.

NOTE: It's very important to detach from the screen session correctly, to avoid stalling the sync. This is carried out by the holding down the CTRL button and tapping A D.