Manual

Build the Node from scratch step by step

1. Install Dependencies

If you already Installed this dependecies before, you can skip this step

sudo apt update && sudo apt upgrade -y && sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y

  1. Install GO

If you already Installed GO version 1.19.5 or higher you can skip this step

check your GO version:

rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.20.1.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version

  1. Download and Install Binary

cd $HOME
rm -rf dymension
git clone https://github.com/dymensionxyz/dymension.git

cd dymension
git checkout v0.2.0-beta
make build

  1. Install Cosmovisor

If you already Installed cosmovisor before, you can skip this step.

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.4.0

  1. Create Symbolic Links for Cosmovisor

mkdir -p $HOME/.dymension/cosmovisor/genesis/bin
mv bin/dymd $HOME/.dymension/cosmovisor/genesis/bin/
rm -rf build

sudo ln -s $HOME/.dymension/cosmovisor/genesis $HOME/.dymension/cosmovisor/current
sudo ln -s $HOME/.dymension/cosmovisor/current/bin/dymd /usr/local/bin/dymd

  1. Set Config App

First, create variable for:

NODENAME=<fill with your node name>
PORT=<fill with your available port>

(you can use port 4-65353, except: 18, 22, 23, 53, 80 and 323)
dymd config chain-id 35-C
dymd config keyring-backend file
dymd config node tcp://localhost:${PORT}657
dymd init $NODENAME --chain-id 35-C

  1. Download Addrbook & Genesis

wget -O ${HOME}/.dymension/config/addrbook.json https://ss-t.dymension.nodestake.top/addrbook.json

wget -O ${HOME}/.dymension/config/genesis.json https://ss-t.dymension.nodestake.top/genesis.json

  1. Configure Seeds and Peers

-

  1. Configure Pruninge

pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.dymension/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.dymension/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.dymension/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.dymension/config/app.toml

  1. Create Service

sudo tee /etc/systemd/system/dymd.service > /dev/null << EOF
[Unit]
Description=dymd node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.dymension"
Environment="DAEMON_NAME=dymd"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF

  1. Start Node

sudo systemctl daemon-reload
sudo systemctl enable dymd
sudo systemctl start dymd

  1. (Optional) Check Node Status

if you want check your Node logs, run the command below:

sudo journalctl -fu gitopiad -o cat

if you want check your Node synchronize status, run the command below:

curl -s localhost:${PORT}657/status

Last updated