Skip to content

Dymension Node Installation and Validator Setup

Setting up a Dymension node requires careful configuration of the underlying Linux environment and the Cosmos-based dymd binary. This guide outlines the end-to-end process from server preparation to validator registration.

To ensure network stability and avoid slashing during high-traffic periods, verify your infrastructure meets the following minimum specifications:

ResourceMinimum Requirement
CPU8 Cores
RAM64GB
Storage1TB NVMe SSD
Network100 Mbps symmetric bandwidth

Update the system packages and install the essential build tools required for compiling Go-based blockchain applications.

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

Dymension requires a specific version of the Go programming language. The following script installs Go version 1.21.3 and updates your environment variables.

Terminal window
cd $HOME
ver="1.21.3"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=\$PATH:/usr/local/go/bin:\$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version

Clone the official repository and check out the recommended version tag for the current network.

Terminal window
cd $HOME
git clone https://github.com/dymensionxyz/dymension.git
cd dymension
git checkout v2.0.0-alpha.8
make install

Confirm the installation by checking the binary version and commit hash.

Terminal window
dymd version --long

Create the initial configuration files by defining your node moniker and the target chain ID.

Terminal window
dymd init mynode --chain-id=froopyland_100-1
dymd config chain-id froopyland_100-1

Create a new wallet or restore an existing one using your mnemonic phrase.

Terminal window
# Create a new wallet
dymd keys add <wallet_name>
# OR Restore existing wallet
dymd keys add <wallet_name> --recover

Download the latest genesis.json and addrbook.json to ensure your node can connect to the peer-to-peer network.

Terminal window
# Genesis
wget https://raw.githubusercontent.com/111STAVR111/props/main/Dymension/Testnet/genesis.json -O $HOME/.dymension/config/genesis.json
# Addrbook
wget -O $HOME/.dymension/config/addrbook.json "https://raw.githubusercontent.com/111STAVR111/props/main/Dymension/Testnet/addrbook.json"

Configure seeds, persistent peers, and minimum gas prices to facilitate block propagation.

Terminal window
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0udym\"/;" ~/.dymension/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.dymension/config/config.toml
peers="e7857b8ed09bd0101af72e30425555efa8f4a242@148.251.177.108:20556,3410e9bc9c429d6f35e868840f6b7a0ccb29020b@46.4.5.45:20556"
seeds="ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@testnet-seeds.polkachu.com:20556"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.dymension/config/config.toml
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.dymension/config/config.toml

To save disk space, configure custom pruning settings that retain only the most recent states.

Terminal window
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
$HOME/.dymension/config/app.toml

Create a systemd unit file to ensure the node runs in the background and restarts automatically on failure.

Terminal window
sudo tee /etc/systemd/system/dymd.service > /dev/null <<EOF
[Unit]
Description=Dymension Node
After=network.target
[Service]
Type=simple
User=$USER
ExecStart=$(which dymd) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable dymd

Using a snapshot significantly reduces the time required for a new node to catch up to the current block height.

Terminal window
cd $HOME
sudo systemctl stop dymd
cp $HOME/.dymension/data/priv_validator_state.json $HOME/.dymension/priv_validator_state.json.backup
rm -rf $HOME/.dymension/data
curl -L https://snapshots.kjnodes.com/dymension-testnet/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.dymension
mv $HOME/.dymension/priv_validator_state.json.backup $HOME/.dymension/data/priv_validator_state.json
sudo systemctl restart dymd && journalctl -u dymd -f -o cat

Once your node is fully synchronized, you can register it as a validator. Ensure your wallet has sufficient funds for the self-delegation and gas fees.

Terminal window
dymd tx staking create-validator \
--amount 1000000000000000000adym \
--pubkey $(dymd tendermint show-validator) \
--moniker="Your_Moniker_Name" \
--identity="KEYBASE_ID" \
--details="Description of your node" \
--website="https://yourwebsite.com" \
--chain-id="froopyland_100-1" \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1" \
--from=<wallet_name> \
--gas="auto" \
--gas-adjustment=1.5 \
--fees 7000000000000000adym -y

Warning: These commands will permanently delete all node data, including keys and database files.

Terminal window
sudo systemctl stop dymd
sudo systemctl disable dymd
sudo rm /etc/systemd/system/dymd.service
sudo systemctl daemon-reload
cd $HOME
rm -rf dymension .dymension
rm -rf $(which dymd)