⚒️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.

curl https://get.gitopia.com | bash
git clone gitopia://Gitopia/gitopia
cd gitopia
git checkout v3.0.1
make install
gitopiad version
  1. Initialize your node.

gitopiad init <node_name> --chain-id gitopia
  1. Download genesis.

wget https://github.com/gitopia/mainnet/raw/master/genesis.tar.gz
tar -xzf genesis.tar.gz
mv genesis.json $HOME/.gitopia/config/genesis.json
rm genesis.tar.gz
  1. Add seeds and persistent peers to config.toml.

seeds="ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:11356"
peers="a5233e4359a39e09d7b261c200cdc014bbef76ad@65.108.8.247:11356,8e42db619abe34afe8cb39d4a2d04ae5db5bdaaf@141.94.139.233:26656,4cf66531681c92f15c95c25bd1bff524f9dca35e@65.109.154.181:26656,b2f764694d52e09793d68259d584ece0c194b6fe@65.108.229.93:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$seeds\"/; s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.gitopia/config/config.toml
  1. Set up minimum gas price.

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.001ulore\"/;" $HOME/.gitopia/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/.gitopia/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.gitopia/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.gitopia/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.gitopia/config/app.toml
  1. Create service file.

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

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

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

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

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

Last updated