Initial Setup
Preconditions
Section titled “Preconditions”Postconditions
Section titled “Postconditions”- 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 imageMint
- the latest the Mint ISO disk imageData
- a single bootable FAT32 disk partition
- you will be ready to setup the Ethereum node software
Configurable Values
Section titled “Configurable Values”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
1. Download Mint and Ubuntu Server
Section titled “1. Download Mint and Ubuntu Server”On the Client PC:
Section titled “On the Client PC:”2. Update BIOS of the Node Server
Section titled “2. Update BIOS of the Node Server”These are the steps for updating the BIOS of the NUC10i7FNH
, the recommended node server device in Hardware Requirements.
On the Client PC:
Section titled “On the Client PC:”# list all SCSI drives and identify the intended USB flash drivelsblk -I 8 -ndo PATH,SIZE,VENDOR,MODEL
# once identified, assign its device path to the variable `flashdrive`# e.g., /dev/xyzflashdrive=/dev/xyz
# unmount any mounted partitions of the USB flash drivesudo umount ${flashdrive}?*
# wipe the existing partitions & create a new bootable FAT32 partitionsudo 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 drivesudo eject $flashdrive
On the Node Server:
Section titled “On the Node Server:”3. Install Ubuntu Server
Section titled “3. Install Ubuntu Server”On the Node Server:
Section titled “On the Node Server:”Your name: coejoderYour server's name: eth-node-mainnetPick a username: coejoderChoose a password: ********Confirm your password: ********
4. Configure SSH
Section titled “4. Configure SSH”On the Client PC:
Section titled “On the Client PC:”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
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
ssh-keygen -t ed25519 -a 100 -f ~/.ssh/eth-node-mainnet_ed25519# Enter passphrase (empty for no passphrase): <passphrase># Enter same passphrase again: <passphrase>
ssh-copy-id -i ~/.ssh/eth-node-mainnet_ed25519.pub coejoder@eth-node-mainnet# coejoder@eth-node-mainnet's password: <password>
mkdir -p ~/.ssh/sockets/
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
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
sudo apt purge cloud-initsudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/sudo rm -f /etc/ssh/sshd_config.d/50-cloud-init.conf
sudo fwupdmgr update
sudo reboot
# you will be kicked out as it reboots# after a minute or so, log back inssh -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
5. Format and Mount Secondary Drive
Section titled “5. Format and Mount Secondary Drive”On the Client PC:
Section titled “On the Client PC:”# list all SCSI drives and identify the secondary drivelsblk -I 8 -ndo PATH,SIZE,VENDOR,MODEL
# once identified, assign its device path to the variable `secondary_drive`# e.g., /dev/xyzsecondary_drive=/dev/xyz
# unmount any mounted partitions of the secondary drivesudo umount ${secondary_drive}?*
# wipe the existing partitions & create a new EXT4 partitionsudo 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 partitionsudo mkfs.ext4 -L SECONDARY -E lazy_itable_init=0 ${secondary_drive}1
sudo mkdir -p /mnt/secondarysudo 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
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]
6. Finish Up
Section titled “6. Finish Up”On the Client PC:
Section titled “On the Client PC:”sudo shutdown now
On the Node Server:
Section titled “On the Node Server:”On the Client PC:
Section titled “On the Client PC:”ssh -p 55522 eth-node-mainnet# Enter passphrase for key '.../.ssh/eth-node-mainnet_ed25519': <passphrase>
sudo apt update && sudo apt upgrade -ysudo apt autoremovesudo timedatectl set-ntp onsudo timedatectl set-timezone America/Los_Angeles
Next Steps
Section titled “Next Steps”You are now ready for node setup.