Tutorial — How to install a Validator node on the Aptos network for beginners — Incentivized Testnet 2
As you already know, the tesnet incentive series on the Aptos network has already started, I’m giving you the opportunity to try to be selected for each of these series through my tutorial.
Who am I
I am passionate about the world of blockchain and I would like to share my passion and research with you through my articles in giving you my perception and opening new doors to very early crypto projects.
Discord: Akabane#3147
Telegram: Dr Jackal Community(please join my group, I will answer all your questions in real time)
Introduction to Aptos Labs
Aptos is a new, independent project to fulfill our vision of delivering the safest and most production-ready blockchain in the world.
Discord: Akabane#3147
EN Official Announcement canal
FR Officiel canal d’annoncement
Read every story from Dr_jackal (and thousands of other writers on Medium)
Part 01: How order and configure your VPS server in 2 minutes
Before installing the node you need to rent a VPS server
The advantages of VPS are that they have high availability and are easy to configure.
Of course I’ll explain how to rent a VPS server at a lower cost and especially how to configure it in less than 2 minutes.
Let’s go…
Order your VPS on Contabo by clicking here.
To be completely transparent with you this is an affiliate link that you can use even if you already have an account on Contabo. Thank you in advance.
Select Cloud VPS M
1 month for the rental period, you can extend later if needed
Do not change anything for the geolocation of your VPS server
Select 400GB SSD for storage type
Select Ubuntu 20.04
Generate your passport and copy and paste it now into a notepad that will be saved on your computer
Don’t touch anything
Don’t touch anything and click on “NEXT”
If you are new to Contabo and you are an individual, do not touch anything
Fill in the fields with your personal data
Finish filling in the last fields with your personal information and click on Next button to proceed to payment
Once you have finished paying for your order. You will receive a first email.
Corresponding to the status of your order
And approximately 15 minutes later you will receive a second email with all the information to connect to your VPS.
The login details to connect on your VPS
Part 02: How to connect to your VPS
With MacOS:
MacOS includes already a SSH command. To connect via SSH from this operating system, first open the Terminal window. You can find this tool by going to “ Application->Utilities->Terminal”.
With Windows : I invite you to download Putty by clicking “here” (You can directly download the installation file with this link).
This is the file illustrated in the image above, if you wish to download another one click on this “link”
Now open the .exe file to start the installation of Putty and follow the instructions to complete the installation. At the end of the installation you will have a shortcut to Putty on your desktop.
Now launch Putty
Launch Putty, a new window will open in which you will enter the IP address of your VPS and click on Open
The interface of your server will open and will ask you for the login details.
Now you are finally on your server (see image below):
Tip 1: To paste any command that you have already copied above, just right-click where you want to paste the command
Tip 2: Only paste or write a command when your vps server allows it. As soon as “root@vmxxxxxxxxx: “is visible you can write otherwise you have to wait
In this example you have permission to write or paste a command
Now you are ready to get serious. You just have to paste one by one the commands that I put at your disposal below. Take your time and make sure you have taken the order from start to finish.
To help you I have put some screenshots showing the result you should get each time you paste a command.
Best of luck…
Part03: Preparation
Update packages:
sudo apt update && sudo apt upgrade -y
Intall dependencies:
sudo apt-get install jq unzip -y
Screen installation
sudo apt install screen
when he asks you to press Y and then ENTER on your keyboard
Install git:
apt install git
Press Y and Enter
Install cargo:
apt install cargo
Press Y and Enter
Part04: Download Aptos Core prepare your developer environment
Clone the Aptos Repo:
git clone https://github.com/aptos-labs/aptos-core.git
And
cd aptos-core
Prepare your developer environment
./scripts/dev_setup.sh
Press y and Enter
Update your current shell environment
source ~/.cargo/env
Part05: Setup Your Validator Node
Checkout the testnet
git checkout --track origin/testnet
Create a directory for your Aptos node composition
export WORKSPACE=testnet
mkdir ~/$WORKSPACE
Generate key pairs
cargo run --release -p aptos -- genesis generate-keys --output-dir ~/$WORKSPACE
This will create three files: private-keys.yaml
, validator-identity.yaml
, validator-full-node-identity.yaml
for you. IMPORTANT: Backup your key files somewhere safe. These key files are important for you to establish ownership of your node, and you will use this information to claim your rewards later if eligible. Never share those keys with anyone else.
Open “private-Keys.yaml” with this command:
sudo nano /root/testnet/private-keys.yaml
Open “validator-identity.yaml” with this command:
sudo nano /root/testnet/validator-identity.yaml
Open “validator-full-node-identity” with this command:
sudo nano /root/testnet/validator-full-node-identity.yaml
I save the all information in a notepad like below:
Part6: Configure your Validator
cargo run --release -p aptos -- genesis set-validator-configuration \
--keys-dir ~/$WORKSPACE --local-repository-dir ~/$WORKSPACE \
--username xxxxxxxxxxx\
--validator-host 35.232.235.205:6180 \
--full-node-host 34.135.169.144:6182
Replace xxxxxx by your “node name” like the example below:
cargo run --release -p aptos -- genesis set-validator-configuration \
--keys-dir ~/$WORKSPACE --local-repository-dir ~/$WORKSPACE \
--username jackal\
--validator-host 35.232.235.205:6180 \
--full-node-host 34.135.169.144:6182
This will create a YAML file in your working directory with your username
Please check wtih this command:
sudo nano /root/testnet/xxxxxxxxx.yaml
Replace xxxxxx by your “node name” like the example below:
sudo nano /root/testnet/jackal.yaml
Create layout YAML file, which defines the node in the validator. Set, for test mode, we can create a genesis blob containing only one node
vi ~/$WORKSPACE/layout.yaml
Paste the following information into this new window:
---
root_key: "F22409A93D1CD12D2FC92B5F8EB84CDCD24C348E32B3E7A720F3D2E288E63394"
users:
- "xxxxxx"
chain_id: 40
min_stake: 0
max_stake: 100000
min_lockup_duration_secs: 0
max_lockup_duration_secs: 2592000
epoch_duration_secs: 86400
initial_lockup_timestamp: 1656615600
min_price_per_gas_unit: 1
allow_new_validators: true
Replace xxxxxx by your “node name” like the example below:
---
root_key: "F22409A93D1CD12D2FC92B5F8EB84CDCD24C348E32B3E7A720F3D2E288E63394"
users:
- "jackal"
chain_id: 40
min_stake: 0
max_stake: 100000
min_lockup_duration_secs: 0
max_lockup_duration_secs: 2592000
epoch_duration_secs: 86400
initial_lockup_timestamp: 1656615600
min_price_per_gas_unit: 1
allow_new_validators: true
For save Press only : then w without move and press Enter
For quit press : then q and finally press Enter
Part7: Framework
Build AptosFramework Move bytecode and copy into the framework folder
cargo run --release --package framework -- --package aptos-framework --output currentmkdir ~/$WORKSPACE/frameworkmv aptos-framework/releases/artifacts/current/build/**/bytecode_modules/*.mv ~/$WORKSPACE/framework/mv aptos-framework/releases/artifacts/current/build/**/bytecode_modules/dependencies/**/*.mv ~/$WORKSPACE/framework/
Now press Enter
Part8: Compile genesis
Compile genesis blob and waypoint with this comand:
cargo run --release -p aptos -- genesis generate-genesis --local-repository-dir ~/$WORKSPACE --output-dir ~/$WORKSPACE
This will create two files, genesis.blob
and waypoint.txt
, in your working directory.
And now copy the validator.yaml
, fullnode.yaml
files into this directory with thos command:
mkdir ~/$WORKSPACE/config
cp docker/compose/aptos-node/validator.yaml ~/$WORKSPACE/validator.yaml
cp docker/compose/aptos-node/fullnode.yaml ~/$WORKSPACE/fullnode.yaml
Part9: Modify the Config
Open your config file
sudo nano /root/testnet/validator.yaml
And now modify the config file to update the key path, genesis file path, waypoint path
Replace the red areas with the information below:
/root/testnet/
After the modification:
Now press CTRL+X
Press Y
Press Enter
Part10:Open ports
Go to the root
cd $home
And use this command
apt install ufw -y
ufw allow ssh
ufw allow https
ufw allow http
ufw allow 6180
ufw allow 80
ufw allow 9101
ufw allow 181
ufw allow 182
ufw allow 8080
ufw allow 9103
ufw enable
Press enter
Press y and Enter
Part11: Launch your validator node
Start your local Validator by running the below command:
cd aptos-core
Create a screen session called “aptos-core”
screen -S aptos-core
cargo run -p aptos-node --release -- -f ~/testnet/validator.yaml
Press Ctrl+A then D
Now you can close Putty
Part12: Check your Validator Node Status
Please click here
Part13: Register your node
Please click here
If you have a error message. refresh the page and click and secondtim “Validate node” button.
Best of luck.
Please join Dr Jackal Community for any support please don’t forget subscribre my My Youtube channel and follow my medium.
Part14: Vote for Dr.Jackal Community
😅
Please click here
See you soon!!!
Thank you for your time, if you like this kind of content, don’t hesitate to check my other articles and my videos on youtube channel.
Discord: Akabane#3147
EN Official Announcement canal
FR Officiel canal d’annoncement
Read every story from Dr_jackal (and thousands of other writers on Medium)