Step by step guide to creating a node in Meter Mainnet

(This guide was made to facilitate the creation of a node in the Meter Mainnet. Creating a node requires skills and responsibilities because if the node goes offline, in addition to not receiving the rewards, those who have delegated their MTRGs to your node do not receive them. So you have to be careful every day and check that your node is always ONLINE.

If it goes OFFLINE you need to understand why and then you have to pay 10 MTRG to bring it back online).

ps. If you are not comfortable using the command line in Ubuntu/Debian machines, there is an open source script available that installs everything required for you with one single command (that will allow you to skip points from point 2) to point 2-d included of the guide shown below). The script has been heavily tested on AWS and can be found here: https://github.com/daveodwyer/meter-node-creator

Please consider joining group telegram of Meter Validator for node alerts and any technical assistance you may require: https://t.me/joinchat/as-AgBXmUAxjMDA0

1- Rent an Amazon vps (AWS)

In order to create a node we need a Vps server that is always online 24/7. Amazon provides the ability to rent these Vps by paying a monthly subscription.

a- Connect to the following link: https://lightsail.aws.amazon.com/ls/webapp/home/instances?#

b- You must create an account. Click on “Create a new AWS account” and follow step by step the 5 steps that allow you to create an account on Amazon AWS

c- Once the registration process is complete, log into your account and you should be on a similar page (in the photos that I put there will be the language in Italian, you should see them in your language)

Click on the button in the blue circle to create your AWS.

d- Now you need to choose your AWS. To create a node on the Meter Mainnet for now the following configuration is sufficient: LINUX SYSTEM (Ubuntu) with 2v CPU — 8gb RAM — 160gb SSD. Then choose exactly as you see in the next photos (in red circles) à the cost is more or less $ 40 per month

Select everything you see in the blue circles and finally click on “create instance”.

Wait a few seconds/minutes and finally your AWS will be ready for use.

2- Configure and create the Node on the Meter Mainnet

a- WHAT IS FUNDAMENTAL IS TO INSTALL THE DOCKER ON THE LINUX VIA THE TERMINAL

So, go to the AWS you just created and click on blu circle (to open the TERMINAL) and a new window will open which is the terminal where you have to type the commands

Now, type the commands below into the terminal one at a time (if it asks you to type “Y” to continue, type it):

sudo apt-get updatesudo apt-get remove docker docker-engine docker.iosudo apt install docker.io

Wait a few seconds

b- Now type the commands below to create the Docker

sudo groupadd dockersudo usermod -aG docker ubuntu

Wait a few seconds and then exit and reopen the Terminal

c- Now we need to go and create the right directories within the AWS. Type the following commands in the Terminal (always one at a time):

$ mkdir meter_main_data$ cd meter_main_data/$ echo export "METER_MAIN_DATA_PATH=$PWD" >> ~/.bashrc$ source ~/.bashrc

d- Now we must go to launch the METER CONTAINER (NODE) with the following commands:

docker run --network host --name meter_main --restart always -e NETWORK="main" -v $METER_MAIN_DATA_PATH:/pos -d meterio/mainnet:latest

Wait some minutes and then to see if we have started everything correctly, you need to type the following command:

docker container ls -a

and we’ll get something like this:

CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS              PORTS               NAMES
260bbd571d1a meterio/mainnet "/usr/bin/supervisord" 23 hours ago Up 23 hours meter_main

this means that everything has been done correctly and the node was well underway.

e- Now it is important to go to the VPS and open the following firewall ports one by one (because without opening these doors the node will not work):

9209

8332

8669

8670

8671

55555

11235

9100

8545

To add a PORTS follow the photos in order A -B -C -D (in the photo we see how to open the ports 9209)

Now repeat the same procedure to open the other doors as well (8332–8669–8670–8671–55555–11235–9100–8545).

You should have the following result (you will see all the ports we have added):

f- Now we need to go to the Meter wallet, at the top left go to settings and click on the +

will take you here, and click the button +

This window appears:

n “name” enter the name of your node (your choice) while in URL you must put the following address: http://ipaddressofnode:8669/ where instead of “ipaddressofnode” you have to put the IP of your node.

I strongly recommend to create a STATIC IP for your AWS, to do this you have to go under the RETI (NETWORKS) of your AWS and click on “+ Create static IP” (see following photo):

You will find yourself in a new window similar to the one below:

Choose a name to give to your STATIC IP (of your choice) and then click on CREATE.

You will find yourself in a new window where you see the STATIC IP that created you (in my case it assigned me the STATIC IP 3.66.61.237):

Choose your AWS and then click CONNECT. We have finally assigned the STATIC IP to our AWS.

Going back to before, you have to enter the following string in the URL http://ipaddressOfYourNode:8669/ where instead of “ ipaddressOfYourNode “ you have to put the static IP of your AWS.

In my case I have to put the following URL → http://3.66.61.237:8669/

Then click SAVE.

If everything went smoothly, click again on the top left of MAINNET and you should see your node syncing. It will take a couple of hours for complete synchronization (see photo below):

Wait a couple of hours until you see the SYNCED status instead of the% sync progress.

g- Now we need to nominate our node as a validator

Before doing this operation, make sure you have 2000 MTRG and at least 0.1 MTR on the Meter wallet.

Click on CANDIDATES and then on LIST ME AS CANDIDATES

It will open a new window (follow the instructions in red):

To find your public id you must go in your TERMINAL and type those comands (one by one):

cd meter_main_data
ls -l
sudo cat public.key

In the photo below you can see the 3 commands typed in my terminal. The string in the red square must be copied and pasted in the PUBLIC KEY field of the window pictured above

Here is an example of how you need to fill in your node data:

(ps. I have purposely blacked out my public key)

Click on SEND and do the TX. Wait a few seconds and if we go to the CANDIDATES section we will see that our node will be up and running.

3- IMPORTANT STEP TO DO TO ALLOW THE NODE TO AUTOMATICALLY UPDATE (IF YOU DO NOT DO THIS STEP THERE IS A RISK THAT THE NODE GOES OFFLINE)

a- Open the AWS terminal again and type the following command:

docker run -d --name watchtower --restart always -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --include-stopped --revive-stopped --enable-lifecycle-hooks --interval 10 --cleanup meter_main

b- To see if this command was successful then type the following command:

docker container ls -a

and you should see two strings (see photo below). If you see two strings similar to those in the yellow box then you are ok in everything.

4- LAST HIGHLY RECOMMENDED STEP to be able to make the node appear in the new statis of Meter meterstats.jellypool.xyz (https://github.com/nextblu/meter-stats-node is the official guide):

a- Before starting you must open the port 8545 (follow the previous step 2-e)

b- Open the AWS terminal again and type the following command:

git clone https://github.com/nextblu/meter-stats-node.git

c- Now type:

cd meter-stats-node

d- Now you can start the service with the following docker commands:

docker build . -t node_monitordocker run -d -t node_monitor

Congratulations! Now you are part of the meterstats website: meterstats.jellypool.xyz

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

You can monitor the status of your node at those following links:

  • monitor.meter.io
  • scan.meter.io/pos
  • meterstats.jellypool.xyz

CONGRATULATIONS YOU HAVE CREATED YOUR NODE CORRECTLY. YOU ARE NOW HELPING TO KEEP THE METER MAINNET ACTIVE AND DECENTRALIZED

Hi everyone, my name is Paul and I created the first two nodes on the Meter mainnet (Pow3r-ITALY89🌪 - JamesMeterianITALY_89🐳). I strongly believe in Meter.