Hardware Requirements
Server preparation
Update your system packages:
sudo apt update && sudo apt upgrade -y
Install essential dependencies:.
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
Install Go 1.23.1 (required for building Stargaze):
ver="1.23.1"
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
Build Stargaze Node
Clone Stargaze Git repository:
cd $HOME
git clone https://github.com/public-awesome/stargaze stargaze
cd stargaze
Checkout the desired version:
starsd version --long | grep -e commit -e version
Expected output:
commit: 308487c985fdb096aeb00e865f4c738fdd724ec8
Node Initialization
Set your moniker (validator name) by replacing <moniker>
with your desired name:
starsd init <moniker> --chain-id stargaze-1
starsd config chain-id stargaze-1
Create / recover wallet
starsd keys add <walletname>
Or recover an existing wallet:
starsd keys add <walletname> --recover
Download genesis and addrbook
Download Genesis and Addrbook files:
wget -O $HOME/.starsd/config/genesis.json "https://files.block-pro.net/stargaze/genesis.json"
wget -O $HOME/.starsd/config/addrbook.json "https://files.block-pro.net/stargaze/addrbook.json"
Verify the integrity of the Genesis file:
sha256sum $HOME/.starsd/config/genesis.json
Expected output:
c3c746be26da62715314fb568288eaf04c87d00906c6d1fe6c66e985a609ccbb
Setup Peers
Edit the configuration to include a peer (use the BlockPro peer in this example):
sed -i 's/seeds = ""/seeds = "cb4b4a5b9876b7b36c52e299833c7e4f896499cd@stargaze-mainnet-peer.block-pro.net:60556"/' ~/.starsd/config/config.toml
Pruning (optional)
Pruning helps reduce the storage size of the node. You can set it up as follows:
Enable pruning and set values:
pruning="custom"
pruning_keep_recent="10000"
pruning_keep_every="0"
pruning_interval="1000"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.starsd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.starsd/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.starsd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.starsd/config/app.toml
Create a Systemd Service File
Create and configure the systemd service to run Stargaze as a service:
sudo tee /etc/systemd/system/starsd.service > /dev/null <<EOF
[Unit]
Description=stargaze main
After=network-online.target
[Service]
User=$USER
ExecStart=$(which starsd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Reload and start the Stargaze service:
sudo systemctl daemon-reload
sudo systemctl enable starsd
sudo systemctl restart starsd && sudo journalctl -fu starsd -o cat
Create validator
Create your validator by replacing the placeholders with your values:
starsd tx staking create-validator \
--amount 1000000ustars \
--from <walletName> \
--commission-max-change-rate "0.01" \
--commission-max-rate "0.20" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--pubkey $(starsd tendermint show-validator) \
--moniker <YOUR_MONIKER_NAME> \
--chain-id stargaze-1 \
--identity="<YOUR_KEYBASE_ID>" \
--details="<YOUR_DETAILS>" \
--website="<YOUR_WEBSITE_URL>" \
--fees 200000ustars \
--gas-adjustment 1.5 \
-y
Delete node
Stop the Stargaze service:
sudo systemctl stop starsd
sudo systemctl disable starsd
rm /etc/systemd/system/starsd.service
sudo systemctl daemon-reload
Remove the Stargaze node and data:
cd $HOME
rm -rf stargaze
rm -rf .starsd
rm -rf $(which starsd)