DECENTR Mainnet node setup

Woohoo, DECENTR Mainnet has arrived!!!

This guide is a compressed version of the original medium post by DEC, you can find that here, and mostly a copy of the DECENTR Testnet node setup guide.

Get yourself an Ubuntu 20.04 VPS from your favorite VPS provider conforming to the minimum requirements. Start putty and connect with the information provided by your VPS provider.

Remember, pasting in putty is done with Right-Click of the mouse, copying you do by selecting the text with your mouse (nothing else, just selecting).

Ok, here we go:

  1. Add the node user and update the system:
adduser decnode
adduser decnode sudo
su - decnode
sudo apt-get update
sudo apt-get upgrade
  1. Install Go:
sudo apt install software-properties-common nano git make ufw snapd
sudo snap install go --classic
export PATH=$PATH:$HOME/go/bin
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.bashrc
  1. Install Decentr testnet node:
git clone -b v1.4.5 https://github.com/Decentr-net/decentr
cd decentr/
make install
  1. Initialize & configure your node:

Now we need to initialize the node, replace <NODE_NAME> below with a name of your choosing, just make sure it doesn’t have any spaces:

decentrd init <NODE_NAME>
  1. Change config.toml:
sudo nano ~/.decentrd/config/config.toml

find the seeds line down near the end of the document and replace it with this:

seeds = "451aab9b648710927c3aad6257141193f232c8ae@ares.mainnet.decentr.xyz:26656,f9b77dd93f28d2a45b00d4e3041b89a3c08788ef@calliope.mainnet.decentr.xyz:26656,987b5ce87b1b922793069756f594533eedf0f060@euterpe.mainnet.decentr.xyz:26656,2caebc4dad8d2ff95400918572d455392e10a63c@hera.mainnet.decentr.xyz:26656,c37f32e202e13b0725515570f794b68573a6f58c@hermes.mainnet.decentr.xyz:26656,4520b3221c91fa98a947a4c7f518ba5aab4e5b08@melpomene.mainnet.decentr.xyz:26656,c17bc88591115e52a686811630ad8c053de19f83@poseidon.mainnet.decentr.xyz:26656,c4ba719d38c871a93fb06cbfe0891ab11fedb9f7@terpsichore.mainnet.decentr.xyz:26656,9e9e0243610fadc0f65d3d927e2d682d86f71ea9@thalia.mainnet.decentr.xyz:26656,e1f3ce208776ff1fad0e8190f5475b68e841d788@zeus.mainnet.decentr.xyz:26656"

Save and exit from nano (Ctrl-X and then Y). We’re almost done.

  1. Download the genesis.json:
wget -O $HOME/.decentrd/config/genesis.json https://raw.githubusercontent.com/Decentr-net/mainnets/master/1.0/genesis.json

And start your node:

decentrd start

If everything went ok you should mostly see stuff like this:

It will take a little bit for the node to catch up, but that’s no problem. You can cancel the node with Ctrl-C and restart it with decentrd start again.

With the update to 1.4.6 we need to add some additional commands to update your node the right way:

First let the above run until you reach block 145000. Your node will show a message that it has stopped due to the upgrade. Stop the process by pressing ctrl-c.

Then run the following commands:

cd ~/decentr
git fetch
git checkout v1.4.6
make install

Now your binaries should be version 1.4.6 (you can check with decentrd version), and we can continue with the rest of the setup.

  1. To make things a bit easier you can also set the node up as a service:

First we’ll create the service file:

sudo nano /lib/systemd/system/dec_node.service

Paste this and save and exit again (Ctrl-X, Enter and Y):

[Unit]
Description=Decentr Daemon
After=network-online.target

[Service]
User=decnode
ExecStart=/home/decnode/go/bin/decentrd start
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target

Now all we need to do is enable and start it:

sudo systemctl enable dec_node
sudo systemctl start dec_node

To check if the service has started correctly use:

sudo journalctl -u dec_node.service -f

And that’s it. You’re running a Decentr mainnet node. Make sure to check in the telegram channel regularly for any updates: DecentrBetaTesters & Node Runners

Leave a comment