Skip to content

Initial Setup

  • node server will be running headless Ubuntu Server, with the latest firmware & software
  • node server will auto-mount its EXT4-formatted secondary drive upon startup
  • client PC user will be configured for secure login to the server via SSH terminal
  • flash drives will have:
    • Ubuntu Server - the latest Ubuntu Server ISO disk image
    • Mint - the latest the Mint ISO disk image
    • Data - a single bootable FAT32 disk partition
  • you will be ready to setup the Ethereum node software

This guide is written using the following configurable values:

  • router IP address: 192.168.1.1
  • node server IP address: 192.168.1.25
  • node server timezone: America/Los_Angeles
  • node server SSH port: 55522
  • node server hostname: eth-node-mainnet
  • node server username: coejoder
  • client PC SSH key: ~/.ssh/eth-node-mainnet_ed25519

These are the steps for updating the BIOS of the NUC10i7FNH, the recommended node server device in Hardware Requirements.

Terminal window
# list all SCSI drives and identify the intended USB flash drive
lsblk -I 8 -ndo PATH,SIZE,VENDOR,MODEL
# once identified, assign its device path to the variable `flashdrive`
# e.g., /dev/xyz
flashdrive=/dev/xyz
# unmount any mounted partitions of the USB flash drive
sudo umount ${flashdrive}?*
# wipe the existing partitions & create a new bootable FAT32 partition
sudo fdisk $flashdrive
# Command (m for help): o
# Command (m for help): n
# Select (default p): <Enter>
# Partition number (1-4, default 1): <Enter>
# First sector (2048-120164351, default 2048): <Enter>
# Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-120164351, default 120164351): <Enter>
# Do you want to remove the signature? [Y]es/[N]o: y
# Command (m for help): t
# Hex code or alias (type L to list all): b
# Command (m for help): a
# Command (m for help): w
# format the new partition and label it "DATA"
sudo mkfs.vfat -n DATA ${flashdrive}1
# safely eject the drive
sudo eject $flashdrive
Your name: coejoder
Your server's name: eth-node-mainnet
Pick a username: coejoder
Choose a password: ********
Confirm your password: ********
Terminal window
sudo nano /etc/hosts
# append this entry to the file, then save and close it (ctrl+s, ctrl+x)
192.168.1.25 eth-node-mainnet
Terminal window
ssh coejoder@eth-node-mainnet
# Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
# coejoder@eth-node-mainnet's password: <password>
# you should now be logged into the node server `eth-node-mainnet` as `coejoder`
# logout and continue to next step (type `exit` or press `ctrl+d`)
exit
Terminal window
ssh-keygen -t ed25519 -a 100 -f ~/.ssh/eth-node-mainnet_ed25519
# Enter passphrase (empty for no passphrase): <passphrase>
# Enter same passphrase again: <passphrase>
Terminal window
ssh-copy-id -i ~/.ssh/eth-node-mainnet_ed25519.pub coejoder@eth-node-mainnet
# coejoder@eth-node-mainnet's password: <password>
Terminal window
mkdir -p ~/.ssh/sockets/
Terminal window
nano ~/.ssh/config
# append this entry to the file, then save and close it (ctrl+s, ctrl+x)
Host eth-node-mainnet
User coejoder
AddKeysToAgent 1h
ControlMaster auto
ControlPath ~/.ssh/sockets/%C
ControlPersist 600
ForwardAgent yes
IdentityFile ~/.ssh/eth-node-mainnet_ed25519
IdentitiesOnly yes
PreferredAuthentications publickey
Terminal window
ssh coejoder@eth-node-mainnet
# coejoder@eth-node-mainnet's password: <password>
sudo nano /etc/ssh/sshd_config
# find and change these options:
#Port 22
#PasswordAuthentication yes
#PermitEmptyPasswords no
# to these:
Port 55522
PasswordAuthentication no
PermitEmptyPasswords no
# then save and close the file (ctrl+s, ctrl+x)
# stay logged in for the next step
Terminal window
sudo apt purge cloud-init
sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/
sudo rm -f /etc/ssh/sshd_config.d/50-cloud-init.conf
Terminal window
sudo fwupdmgr update
Terminal window
sudo reboot
# you will be kicked out as it reboots
# after a minute or so, log back in
ssh -p 55522 eth-node-mainnet
# Enter passphrase for key '.../.ssh/eth-node-mainnet_ed25519': <passphrase>
# you should now be logged in again
# the above ssh command is what you will use to login from now on
# for now, stay logged in and continue to the next step
Terminal window
# list all SCSI drives and identify the secondary drive
lsblk -I 8 -ndo PATH,SIZE,VENDOR,MODEL
# once identified, assign its device path to the variable `secondary_drive`
# e.g., /dev/xyz
secondary_drive=/dev/xyz
# unmount any mounted partitions of the secondary drive
sudo umount ${secondary_drive}?*
# wipe the existing partitions & create a new EXT4 partition
sudo fdisk $secondary_drive
# Command (m for help): g
# Command (m for help): n
# Select (default p): <Enter>
# Partition number (1-128, default 1): <Enter>
# First sector (2048-120164351, default 2048): <Enter>
# Last sector (2048-1250164703, default 1250162687): <Enter>
# Do you want to remove the signature? [Y]es/[N]o: y
# Command (m for help): w
# format the new partition
sudo mkfs.ext4 -L SECONDARY -E lazy_itable_init=0 ${secondary_drive}1
Terminal window
sudo mkdir -p /mnt/secondary
sudo nano /etc/fstab
# append this entry to the file, then save and close it (ctrl+s, ctrl+x)
LABEL=SECONDARY /mnt/secondary ext4 errors=remount-ro,noatime 0 1
Terminal window
sudo reboot
# wait for node server to reboot
ssh -p 55522 eth-node-mainnet
# Enter passphrase for key '.../.ssh/eth-node-mainnet_ed25519': <passphrase>
mount -l | grep SECONDARY
# it should output something like:
# /dev/wxy1 on /mnt/secondary type ext4 (rw,noatime,errors=remount-ro,stripe=8191) [SECONDARY]
Terminal window
sudo shutdown now
Terminal window
ssh -p 55522 eth-node-mainnet
# Enter passphrase for key '.../.ssh/eth-node-mainnet_ed25519': <passphrase>
sudo apt update && sudo apt upgrade -y
sudo apt autoremove
sudo timedatectl set-ntp on
sudo timedatectl set-timezone America/Los_Angeles

You are now ready for node setup.