Skip to main content

Node Installation

image.png


Minumum Requirements

  • 4 or more physical CPU cores.
  • At least 100 GB of SSD disk storage.
  • At least 8 GB of memory (RAM).
  • At least 50 mbps network bandwidth.
 
Custom Configuration (optional)
  • Custom user
sudo adduser decentr
sudo adduser decentr sudo
su - decentr
  • Custom Port 
PORT=53
echo "export PORT=${PORT}" >> $HOME/.bash_profile
source $HOME/.bash_profile


Install Update and Dependencies
sudo apt -q update
sudo apt -qy upgrade
sudo apt -qy install curl git jq wget unzip lz4 build-essential

 

Install GO(ver. 20.5)

For new Go Installation, run this command

sudo rm -rf /usr/local/go && \
curl -Ls https://go.dev/dl/go1.20.5.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version

If you already install GO on your previous project, run this command

echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version

 

Install CosmWasm Library
sudo wget -P /usr/lib https://github.com/CosmWasm/wasmvm/releases/download/v1.3.0/libwasmvm.x86_64.so

 

Installing Binary
cd $HOME
rm -rf decentr/
git clone https://github.com/Decentr-net/decentr
cd decentr/
git checkout v1.6.2
make install
sudo mv ~/go/bin/decentrd /usr/local/bin

 

Init Generation

Replace moniker_name with your own moniker name

decentrd config chain-id mainnet-3
decentrd config keyring-backend test
decentrd init moniker_name --chain-id mainnet-3

 

Download Genesis and Addrbook
curl -Ls https://raw.githubusercontent.com/aidilfahmi/MainNet/main/Decentr/addrbook.json > $HOME/.decentr/config/genesis.json
curl -Ls https://raw.githubusercontent.com/aidilfahmi/MainNet/main/Decentr/addrbook.json > $HOME/.decentr/config/addrbook.json

 

Set Peers and Seeds
sed -E -i 's/seeds = \".*\"/seeds = \"7708addcfb9d4ff394b18fbc6c016b4aaa90a10a@ares.mainnet.decentr.xyz:26656,8a3485f940c3b2b9f0dd979a16ea28de154f14dd@calliope.mainnet.decentr.xyz:26656,87490fd832f3226ac5d090f6a438d402670881d0@euterpe.mainnet.decentr.xyz:26656,3261bff0b7c16dcf6b5b8e62dd54faafbfd75415@hera.mainnet.decentr.xyz:26656,5f3cfa2e3d5ed2c2ef699c8593a3d93c902406a9@hermes.mainnet.decentr.xyz:26656,a529801b5390f56d5c280eaff4ae95b7163e385f@melpomene.mainnet.decentr.xyz:26656,385129dbe71bceff982204afa11ed7fa0ee39430@poseidon.mainnet.decentr.xyz:26656,35a934228c32ad8329ac917613a25474cc79bc08@terpsichore.mainnet.decentr.xyz:26656,0fd62bcd1de6f2e3cfc15852cdde9f3f8a7987e4@thalia.mainnet.decentr.xyz:26656,bd99693d0dbc855b0367f781fb48bf1ca6a6a58b@zeus.mainnet.decentr.xyz:26656\"/' $HOME/.decentr/config/config.toml

 

Set Port app.toml and config.toml

This Step If you running custom port, if you running default port, skip this step

decentrd config node tcp://localhost:${PORT}657
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${PORT}660\"%" $HOME/.decentr/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${PORT}317\"%; s%^address = \":8080\"%address = \":${PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${PORT}091\"%" $HOME/.decentr/config/app.toml
sed -i.bak -e "s%^address = \"tcp://localhost:1317\"%address = \"tcp://localhost:${PORT}317\"%; s%^address = \":8080\"%address = \":${PORT}080\"%; s%^address = \"localhost:9090\"%address = \"localhost:${PORT}090\"%; s%^address = \"localhost:9091\"%address = \"localhost:${PORT}091\"%" $HOME/.decentr/config/app.toml

 

Set Config Pruning
pruning="custom"
pruning_keep_every="0"
pruning_keep_recent="100"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.decentr/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.decentr/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.decentr/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.decentr/config/app.toml
 
Create Service
sudo tee /etc/systemd/system/decentrd.service > /dev/null <<EOF
[Unit]
Description=Decentr MainNet
After=network-online.target
[Service]
User=$USER
ExecStart=$(which decentrd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

 

Register And Start Service
sudo systemctl daemon-reload
sudo systemctl enable decentrd
sudo systemctl restart decentrd && sudo journalctl -fu decentrd -o cat