> For the complete documentation index, see [llms.txt](https://docs.validator247.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validator247.com/mainnet/shentu.md).

# Shentu

**Public Endpoints**

> RPC: <https://shentu-rpc.validator247.com/>
>
> API : <https://shentu-api.validator247.com/>

**Explorer**

> &#x20;<https://explorer.validator247.com/shentu/staking>

## Update your server

```
sudo apt update && sudo apt upgrade -y
```

## Install packages

```
sudo apt install git curl wget tar lz4 unzip jq build-essential pkg-config clang bsdmainutils make ncdu -y
```

## Install Go

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

## Install App and build

```
cd $HOME
git clone https://github.com/certikfoundation/shentu.git 
cd shentu 
git checkout v2.18.0 
make install
```

## Hoặc

```
cd $HOME

wget -O shentud https://github.com/shentufoundation/shentu/releases/download/v2.18.0/shentud_2.18.0_linux_amd64

chmod +x shentud

sudo mv shentud /usr/local/bin/

shentud version --long
```

## check version

```
shentud version
```

## Set-variables

```
SHENTU_MONIKER=" your_nodename"
```

## Initialize the node

```
shentud init $SHENTU_MONIKER --chain-id shentu-2.2
```

## Set minimum gas price

```
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0uctk\"|" $HOME/.shentud/config/app.toml
```

## &#x20;pruning&#x20;

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

## Download genesis

```
wget https://raw.githubusercontent.com/Validator247/Shentud-Mainnet/main/genesis.json
```

## Download addrbook

```
wget https://raw.githubusercontent.com/Validator247/Shentud-Mainnet/main/addrbook.json
```

## Create service

```
sudo tee /etc/systemd/system/shentud.service > /dev/null <<EOF
[Unit] 
Description=SHENTU\n 
After=network.target 
[Service] 
Type=simple
User=$USER
ExecStart=$(which shentud) start 
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable shentud 
```

## SNAPSHOT  -  Every 12 hours

```
sudo systemctl stop shentud
cp $HOME/.shentud/data/priv_validator_state.json $HOME/.shentud/priv_validator_state.json.backup
sudo rm -rf $HOME/.shentud/data && sudo mkdir $HOME/.shentud/data

SNAP_NAME=$(curl -s https://snapshots.validator247.com/shentu/ | egrep -o ">shentu-2.*lz4" | tr -d ">" | sort -V | tail -n 1)
curl -o - -L https://snapshots.validator247.com/shentu/${SNAP_NAME} | lz4 -c -d - | tar -x -C $HOME/.shentud/data

mv $HOME/.shentud/priv_validator_state.json.backup $HOME/.shentud/data/priv_validator_state.json
sudo systemctl restart shentud && sudo journalctl -u shentud -f -o cat
```

Check Syn

```
shentud status 2>&1 | jq .SyncInfo
```

Checklogs

```
journalctl -u shentud -f --no-hostname -o cat
```

Create Wallet

```
shentud keys add wallet
```

Recover Wallet

```
shentud keys add wallet --recover
```

Create validator

```
shentud tx staking create-validator \
 --amount=1000000uctk \
 --pubkey=$(shentud tendermint show-validator) \
 --moniker="YOUR_NICKNAME" \
 --chain-id=shentu-2.2 \
 --commission-rate=0.05 \
 --commission-max-rate=0.2 \
 --commission-max-change-rate=0.02 \
 --min-self-delegation=1 \
 --website="https://your-website.com" \
 --identity="keyBASE_id" \
 --details="This is will be display in the blockchain explorer. Write here something about you"\
 --gas-prices=0.1uctk \
 --gas-adjustment=1.5 \
 --gas=auto \
 --from=wallet
```

Edit Validator

```
  shentud tx staking edit-validator \
 --chain-id=shentu-2.2 \
 --commission-rate=0.04 \
 --from=wallet \
 --gas-prices=0.1uctk \
 --gas-adjustment=1.5 \
 --gas=auto \
 -y
```

Vote

```
shentud tx gov vote <#xx> yes --from wallet --chain-id shentu-2.2
```

Unjail&#x20;

```
shentud tx slashing unjail --chain-id=shentu-2.2 --from wallet -y
```

Withdraw rewards and commission

```
shentud tx distribution withdraw-rewards <your_validator_address> --from wallet --commission --chain-id=shentu-2.2 --fees=500uctk
```

Restart & see logs

```
sudo systemctl restart shentud && journalctl -u shentud -f --no-hostname -o cat
```
