Installation

Prerequiretes

Hardware
Minimun Spesification

CPU

4 Cores

RAM

8 GB

Disk

200GB SSD

Installation

Install Go

wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
source ~/.profile
go version

Install Ignite

rm $(which ignite)
sudo curl https://get.ignite.com/[email protected]! | sudo bash

Download binary file

git clone https://github.com/dhealthproject/dhealth
cd dhealth
ignite chain build
cp $HOME/go/bin/dhealthd /usr/local/bin
dhealthd version

Initialize the node

dhealthd init <your-name> --chain-id dhealth

Download genesis

FILEID=1jRquk4NWkkPth05RInbz1FAFJvML3kok
FILENAME=$HOME/.dhealth/config/genesis.json
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate \
"https://docs.google.com/uc?export=download&id=$FILEID" -O- | \
sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')
wget --load-cookies /tmp/cookies.txt \
"https://docs.google.com/uc?export=download&confirm=${CONFIRM}&id=${FILEID}" \
-O ${FILENAME}
rm -f /tmp/cookies.txt

Download Addrbook

FILEID=1fRwTzNb51WK_anONrJ-YrxTpL3fGhosI
FILENAME=$HOME/.dhealth/config/addrbook.json
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate \
"https://docs.google.com/uc?export=download&id=$FILEID" -O- | \
sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')
wget --load-cookies /tmp/cookies.txt \
"https://docs.google.com/uc?export=download&confirm=${CONFIRM}&id=${FILEID}" \
-O ${FILENAME}
rm -f /tmp/cookies.txt

Configure Seeds and Peers

PEERS=$(curl -sS https://rpc-dhealth.provewithryd.xyz/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|,$||')
sed -i -e "s|^persistent_peers *=.*|persistent_peers = '$PEERS'|" $HOME/.dhealth/config/config.toml

Custumize Pruning

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.dhealth/config/app.toml 
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.dhealth/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"20\"/" $HOME/.dhealth/config/app.toml

Set Minumum Gas & Disable Indexer

sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"1udhp\"|" $HOME/.dhealth/config/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.dhealth/config/config.toml

Create Systemd Services

tee /etc/systemd/system/dhealthd.service > /dev/null <<EOF
[Unit]
Description=Dhealth Mainnet Node
After=network-online.target

[Service]
User=root
WorkingDirectory=/root/.dhealth
ExecStart=/usr/local/bin/dhealthd start --home /root/.dhealth
Restart=on-failure
RestartSec=5
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Enable and Start Services

systemctl daemon-reexec
systemctl daemon-reload
systemctl enable dhealthd.service
systemctl start dhealthd.service

Last updated