Easy Node's Findora "Automated" Validator Setup Guide

This guide is for setting up a brand new wallet & validator for the first time.

⚠️

If you're moving to a new server you can mostly use this guide but see our notes on moving over tmp.gen.keypair and priv_validator_key.json right here.

Intro

We find that only using the automated setup has some challenges unless you're comfortable running your applications as root (We are not comfortable with that and will guide you through setting up a user to run findora as instead!).

Findora runs in a docker container and has an automated setup tool. With a little massaging you can get this to run flawlessly with a regular user account and not using root.

We will often reference the Findora Automated Validator Setup Guide please have this open as well.

Cheat Sheet

We suggest building a "Cheat Sheet" for your preferences as you go through our commands. Copy the code bubbles and customize if necessary. Each bubble will have instructions above them if there's customization requirements.

For example, we suggest running everying as a user named servicefindora in this guide but you can use any custom username you prefer. You'll need to edit a few commands along the way to update servicefindora.

Server Selection

Grab a server, the Hardware Requirements:

  • Recommended: 16GB RAM, 4 Core CPU, 300GB NVMe Hard Disk

Server Pre-Installation Setup

Once you have a server running Ubuntu and are logged in as a root account to start, here's the setup setps.

Firewall

Open the following ports on your firewall for SSH access & Findora:

22
8545
8667-8669
26657

If you use the software firewall ufw check this page for our configuration.

User Account

Setup a user account, give it access to the sudo (root) group. We will use the account servicefindora in this example but feel free to customize the username to your liking:

adduser servicefindora

Set a password, you can skip filling out the user info by pressing enter to leave it blank, confirm creation of new account. Then add permissions:

sudo usermod -aG sudo servicefindora

Now you can disconnect and reconnect as the newly created user account. You can also prep the user account ~/.ssh folder and SSH keys to use that login option at this time if you use keys for login access.

Install Docker

The official guide doesn't mention that you need to install Docker.

Taken from this guide here's our notes for installing docker on Ubuntu 20.04LTS once your server is online and logged in as the user servicefindora (update if you used a different account):

sudo apt update -y && sudo apt install apt-transport-https ca-certificates curl software-properties-common -y && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" && sudo apt install docker-ce -y

Run the following. If your username is not servicefindora update the username below first:

sudo usermod -aG docker servicefindora
️🚫

At this point you'll need to disconnect and reconnect for the group permissions to be applied. Close out and reconnect! Once reconnected, confirm your user is in the proper groups with:

groups

Verify the output is similar to:

# Example Output
servicefindora sudo docker

fn Installation

Run the following to download and setup the main app fn:

# download and move to your path
wget https://github.com/FindoraNetwork/findora-wiki-docs/raw/main/.gitbook/assets/fn && chmod +x fn && sudo mv fn /usr/local/bin/

Create Wallet, Directory Structure, and Move Keys

Run initial setup items, If your username is not servicefindora update the username below first:

cd ~/ && export NAMESPACE=mainnet && sudo mkdir -p /data/findora && sudo chown servicefindora:servicefindora /data/findora && mkdir -p /data/findora/mainnet/tendermint/ && export ROOT_DIR=/data/findora/mainnet/ && sudo chown -R servicefindora:servicefindora /data/findora/
️🚫

Create or import your wallet. Note: This next step creates a wallet if you need a new wallet. Otherwise you would instead import your wallet (create the file tmp.gen.keypair file) with your previous information!

If you're creating a new wallet run the following:

# send command to create wallet
fn genkey > tmp.gen.keypair
⚠️

If you're importing a wallet instead of creating one you can use cat ~/tmp.gen.keypair to see if your key is loaded or use nano ~/tmp.gen.keypair or vim ~/tmp.gen.keypair to edit your file to restore it.

Move your wallet to the key location:

# copy key file to location that validator will use now that the location exists
cp tmp.gen.keypair /data/findora/mainnet/mainnet_node.key

Create Docker Container

To avoid a future bug, manually run this at this point to download the container image and initialize items:

docker run -d \
-v ${ROOT_DIR}/tendermint:/root/.tendermint \
-v ${ROOT_DIR}/findorad:/tmp/findora \
-p 8669:8669 \
-p 8668:8668 \
-p 8667:8667 \
-p 8545:8545 \
-p 26657:26657 \
-e EVM_CHAIN_ID=2152 \
--name findorad \
${FINDORAD_IMG} node \
--ledger-dir /tmp/findora \
--tendermint-host 0.0.0.0 \
--tendermint-node-key-config-path="/root/.tendermint/config/priv_validator_key.json" \
--enable-query-service \
--enable-eth-api-service
️🚫

If you're moving servers, this is the time to create your /data/findora/mainnet/tendermint/config/priv_validator_key.json file using your backed up information.

Download Auto Installation Script

See this link to get the most updated version of the node_init_mainnet.sh script to run. Simply right click the link and copy the shortcut to use in the commands below:

wget https://338489037-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRzwHg4ShKVrXd4rywBQ8%2Fuploads%2FqDNTif7TMchbvixIFt2e%2Fnode_init_mainnet.sh?alt=media&token=3a9b95a1-ac40-41c4-b74d-5a560b128be1 -O node_init_mainnet.sh

Edit Script

We suggest making two modifications to the node_init_mainnet.sh script before you run it to allow everything to flow as your regular user account.

Edit the file you download with the following changes so it works with our regular user account using nano or vim:

# Remove line #37 from the automated install script
sudo mkdir -p /data/findora
# Update line #74 (75 before you delete the line above), replace the entire line with the following and update user account if it's not servicefindora
sudo chown -R servicefindora:servicefindora /data/findora

Run script

You should now be ready to run the automated installation script. This will pull in all files need and extract them. It may take 15+ minutes for this to complete but if all is successful you will be online and the database will be syncing:

bash -x node_init_mainnet.sh

After Installation

Some post installation tips once you stake and activate your validator.

Fund Validator

See this section for the latest information on funding your validator. Due to missed block fees/slashing we recommend a bit more than the minimum amount for your validator.

Create Validator, Stake FRA, Set Commission Rate, Start Validating and add to Dashboard

See this section for information on customizing and sending the command to create your validator.

After you sucessfully register your wallet and stake your initial Findora your validator will show up on the staking dashboard along with the SmartStake site.

Backup Recovery Data Files

Backup the following files, run cat <filename> to see the contents or use an sFTP program to transfer them to a secure location. These contain private information, do not share!!!

# Wallet recovery files
tmp.gen.keypair or /data/findora/mainnet/mainnet_node.key
node.mnemonic
# Validator information file, this one can be recreated but handy to save
staker_memo

Backup all files inside of the following folder as well:

# Validator recovery file
/data/findora/mainnet/tendermint/config/

Monitor Validator

Check out our Post Installation section for the management commands!