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:
2285458667-866926657
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 Outputservicefindora sudo docker
fn
Installation
Run the following to download and setup the main app fn
:
# download and move to your pathwget https://wiki.findora.org/bin/linux/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 walletfn 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 existscp tmp.gen.keypair /data/findora/mainnet/mainnet_node.key
Create Memonic File
Setup private phrase info for the fn
application to access your wallet. If you need your mnemonic phrase run cat tmp.gen.keypair
to reveal your private validation information and mnemonic words to you. This is a good time to make a copy/back up your wallet file information (tmp.gen.keypair) for restoration of your validator:
# Below is an example of how this command should be sent. Replace the fake mnemonic in it with the mnemonic phrase in your tmp.gen.keypair file:# echo "repair drink action brass term blur fat doll spoon thumb raise squirrel tornado engine tumble picnic approve elegant tube urge ghost secret seminar blame" > ${ROOT_DIR}/node.mnemonicecho <24 mnemonic keywords> > ${ROOT_DIR}/node.mnemonic
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/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://wiki.findora.org/assets/files/node_init_mainnet-423a36f2adaaeab9de7ff63e61d3d4c1.sh
Edit Script
We suggest making two modifications to the 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 scriptsudo mkdir -p /data/findora# Update line #74 (75 before you delete the line above), remove sudo and update user accountsudo 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-423a36f2adaaeab9de7ff63e61d3d4c1.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 filestmp.gen.keypairnode.mnemonic# Validator information file, this one can be recreated but handy to savestaker_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!