Welcome to the Decentr Validator setup tutorial.
Running a Node
TLDR Requirements —
- A Decentr Account
You can create an account using the Decentr browser.
- Extensive knowledge of Linux OS is required
- 1000 Dec
Please swap DEC from ERC20 to Native — https://decentrnet.medium.com/erc20-native-dec-swap-guide-3c2ccf58e80
- A Vultr Account
A Vultr $10 per month Ubuntu with 55GB SSD and 2GB of RAM.
- GO Programming Language
30–60 minutes to set up your node from start to finish.
Step One will setup a Ubuntu VPS on Vultur.
Firstly, please go to https://vultr.com and register. You will need to add funds to the account as well.
Then go to the products page and set up your instance.
Choose a Cloud Compute and Ubuntu 21.10 x64 with 55GB SSD and 2 GB of RAM.
Once the instance shows as “Running”, select “Server Details”.
Click on the copy icon next to “Password” (username is root).
In the top right hand corner of the same page, please choose the ‘Terminal’ icon.
On the first launch of the console press special button (see screenshot below):
Enter your login (root) and then press ‘Enter’.
You should see the prompt for Password.
Throughout our tutorial you can just copy commands and paste them using the upper right hand corner button. Such as with password (don’t forget to press enter once you press ‘Send Clipboard’):
Congratulations! You are now ready to start installing Decentr.
Firstly, update your VPS and install some required software by running the following commands
apt-get update -y && apt-get upgrade -yapt install software-properties-common nano git make ufw jq -ysudo apt install snapd
Create a new user to run the Decentr node services.
Add your new user to the sudo’ers group (so it has the required permissions to run privileged commands).
adduser decnode sudo
Log in as your new user.
su - decnode
If you have previous version of Decentr installed please run the following commands:
rm -rf ~/.decentr
Next we need to install GO and Decentr.
sudo snap install go --classicexport PATH=$PATH:$HOME/go/binecho export PATH=$PATH:$HOME/go/bin >> ~/.bashrc
Now we are ready to install Decentr!
All the commands are listed in our Readme on github (https://github.com/Decentr-net/decentr/blob/master/README.md ) but let’s walk through them one by one in this tutorial.
Clone Decentr from the latest release found here: https://github.com/Decentr-net/decentr/releases
1.5.7 is the latest at the moment
git clone -b v1.5.7 https://github.com/Decentr-net/decentr
Enter the folder Decentr was cloned into
Compile and install Decentr
Make sure the correct version of decentrd installed by running
It should display 1.5.7
Initialize decentrd in ~/.decentr and name your node (In this case it’s NikitaNode but you can choose any name you like. This is the public name of your node, so choose it wisely)
decentrd init NikitaNode
You should see something like this:
Now for the slightly difficult part (but fun nonetheless!) — adding existing main seeds to the config file. For that we are going to use the text editor Nano
Once you have entered this command your screen should look like this:
Don’t be intimidated, just scroll using your up and down arrows on the keyboard, and in the middle of the text you should see this:
Please insert one by one the following seeds (you can add just two but better to add them all) inside the “”, and separate them by commas like so:
Once you have entered those values then press ‘Ctrl+X’ on your keyboard and it will ask if you want to save, and then you press the letter ‘Y’ on your keyboard. and then press ‘Enter’.
Then run the following two commands:
wget -O $HOME/.decentr/config/genesis.json https://raw.githubusercontent.com/Decentr-net/mainnets/master/3.0/genesis.json
After around 1–2 minutes you should see something like this:
This is your Decentr Node running! It is currently gathering information about all the blocks of the Decentr blockchain. Each moving line is a block ID number of transactions and height.
To make sure your node is running all the time set the node up as a service:
First we’ll create the service file:
sudo nano /lib/systemd/system/decentr_node.service
Paste this and save and exit again (Ctrl-X, Enter and Y):
Now all we need to do is enable and start it:
sudo systemctl enable decentr_nodesudo systemctl start decentr_node
To check if the service has started correctly use:
sudo journalctl -u decentr_node.service -f
And that’s it. You’re running a Decentr mainnet node.
Now you have a working Decentr node, you can now start the validator process.
Firstly, you will need to import a wallet, which will give you a private key/public key pair for your node. Make sure you do it in a separate terminal or that node is running in background mode.
# Replace <your-key-name> with a name for your key that you will remember
decentrd keys add <your-key-name> -i
You will be asked to enter a BIP39 mnemonic. This is the phrase you generated during registration of your Decentr account.
If you don’t have a Decentr account, create a new one with the Decentr browser. Once the account is created you will need to swap ERC20 Dec to Native DEC and send it to your Native DEC address.
For the second question simply hit “Enter”:
Then you will be asked for a password for your key (enter at least 8 character password that you will remember):
To see a list of wallets on your node, type —
decentrd keys list
To see the options when creating a validator —
decentrd tx staking create-validator -h
An example, to create a validator with 100 DEC self-delegation and a 10% commission — Please be aware that you need 100k DEC to run so adjust accordingly!
# Replace <your-key-name> with the key you created previously.
# Replace <your-validator-name> with name you would like your validator node be known to everyone.
decentrd tx staking create-validator \
--pubkey=$(decentrd tendermint show-validator) \
After running this command you will be asked for a password you set for your key name 2 times.
To check on the status of your validator:
decentrd status | jq '.validator_info'
If you have completed all steps successfully, you will see something similar to “Congratulations! You are now a validator!”
Your validator should now be running and ready to receive delegations and you will be able to see it here — https://explorer.decentr.net
Note that only the top 100 validators by weighted stake (self-delegations + other delegations) are eligible for block rewards.
Official Links for Decentr:
Telegram Group: https://t.me/DecentrNet
Telegram ANN: https://t.me/DecentrAnnouncements
Beta Testers: https://t.me/DecentrBetaTesters
Windows Browser: https://decentr.net/files/DecentrSetupUpdate.exe
OSX Browser: https://decentr.net/files/MacOS_X64_Decentr_1.0.0.zip
Linux Browser: https://decentr.net/files/Ubuntu_X64_Decentr_1.0.0.deb