February 22, 2022

SERVER CONFIGURATION

Basic server configuration for running blockchain nodes.



Choosing hosting and operating system

The main recommendation is using UBUNTU 20.04.3 LTS operating system for installing blockchain nodes.

Checking disk performance:

dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync
dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync

Install Ubuntu on local computer

Modify setting in BIOS:

  • for turning computer back/power on after power outage;
  • for disable Halt on errors when computer booting.

Download Ubuntu ISO file.

Use Rufus utility for creating bootable USB drive.

Install Ubuntu with static IP address network configuration.

Basic configuration

Do system update and upgrade:

sudo apt update && apt upgrade -y

Install useful system utilities (htop, nload, ncdu, midnight commander):

sudo apt install htop nload ncdu mc -y

Firewall

UFW (Uncomplicated Firewall) setup.

Allow all outgoing connections:

sudo ufw default allow outgoing

Deny all incoming connection:

sudo ufw default deny incoming

Allow SSH default port for incoming connections:

# Allow from any to port 22
sudo ufw allow 22
# Allow from selected IP address to port 22
sudo ufw allow from xxx.xxx.xxx.xxx to any port 22

Enable UFW:

sudo ufw enable

Disable UFW:

sudo ufw disable

Show firewall status as numbered list of rules:

sudo ufw status numbered

Delete UFW rule:

# x - rule number
sudo ufw delete x