⚒️Installation

  1. Update packages and install useful tools.

sudo apt update && sudo apt upgrade --yes && \
sudo apt install git build-essential ufw curl jq snapd screen ncdu nano fuse ufw --yes
  1. Install go using snap.

sudo snap install go --classic && \
echo 'export GOPATH="$HOME/go"' >> ~/.profile && \
echo 'export GOBIN="$GOPATH/bin"' >> ~/.profile && \
echo 'export PATH="$GOBIN:$PATH"' >> ~/.profile && \
source ~/.profile && \
go version
  1. Build the binary from source.

git clone https://github.com/public-awesome/stargaze
cd stargaze
git checkout v13.0.1
make install
starsd version
  1. Initialize your node.

starsd config chain-id stargaze-1
starsd init <node_name> --chain-id stargaze-1
  1. Download genesis.

curl -s  https://raw.githubusercontent.com/public-awesome/mainnet/main/stargaze-1/genesis.tar.gz > genesis.tar.gz
tar -C ~/.starsd/config/ -xvf genesis.tar.gz
rm genesis.tar.gz
  1. Add seeds and persistent peers to config.toml.

SEEDS="d5fc4f479c4e212c96dff5704bb2468ea03b8ae3@sg-seed.blockpane.com:26656,babc3f3f7804933265ec9c40ad94f4da8e9e0017@stargaze.seed.rhinostake.com:16656,70ed826888f102c7c1ceb4d07287956628a53508@174.138.124.7:36656,722079345d941cd2da3daedea548c909d9b83ec5@104.248.101.113:36656"
PEERS="1d73521c565b37a53038fc730bcd207a3db361b6@144.91.91.30:26656,524dd60331c56d198deabbb70238c2cc69119cca@161.97.122.216:36656,0c9ebd7b36f96d0279dbf6dc38572f5797c096c1@65.108.42.168:26656,320e4b81ab327dd2593a39de0d3ae718fdb9347c@176.9.168.220:26656,b8eeb6d99594c218c0373d8ec4c1e81031b92198@68.183.92.46:26656,387c32677c54dd4627366ffdf8e2dda68e71af69@54.193.168.147:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.starsd/config/config.toml
  1. Set up minimum gas price.

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"1ustars\"/;" ~/.starsd/config/app.toml
  1. Set up pruning (optional).

pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
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
  1. Create service file.

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

[Service]
User=$USER
ExecStart=$(which starsd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
  1. Enable and start service.

systemctl daemon-reload
systemctl enable starsd
systemctl restart starsd
journalctl -u starsd -f -o cat

If you would like to speed up the sync process, you may try using State Sync.

Last updated