Manual Installation
Let's explore the manual installation process as we set up a node with Cosmovisor!
Install Dependencies
Update system package and install build tools
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential fail2ban ufw
sudo apt -qy upgrade
Secure Setup
π’
While this step is optional, it is strongly recommended for those running on the mainnet to take a closer look, as it plays a crucial role in ensuring basic security. If you don't want to, you can skip ahead to configure moniker.
Setup ssh for quasar user replace YOUR_PUBLIC_SSH_KEY with your own!
sudo adduser quasar --disabled-password -q
sudo usermod -aG sudo quasar
sudo -u quasar bash -c 'mkdir -p ~/.ssh && echo "YOUR_PUBLIC_SSH_KEY" >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys'
Configure Moniker
Replace <your-moniker-name> with your own validator name
MONIKER="<your-moniker-name>"
Install Go
install go version 1.20.9
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.20.9.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
Build Binaries
Cloning project repository & Compile binaries
cd $HOME
rm -rf quasar
git clone https://github.com/quasar-finance/quasar.git
cd quasar
git checkout v3.0.0
make build
Latest commit : 3b83f60be14100eeac027d7d9aa68b5873e9795e
Prepare binaries for Cosmovisor
mkdir -p $HOME/.quasarnode/cosmovisor/genesis/bin
mv build/quasard $HOME/.quasarnode/cosmovisor/genesis/bin/
rm -rf build
Create symlinks
sudo ln -s $HOME/.quasarnode/cosmovisor/genesis $HOME/.quasarnode/cosmovisor/current -f
sudo ln -s $HOME/.quasarnode/cosmovisor/current/bin/quasard /usr/local/bin/quasard -f
Cosmovisor Setup
Install cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
Create Service
Create a systemd service
sudo tee /etc/systemd/system/quasar.service > /dev/null << EOF
[Unit]
Description=quasar node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.quasarnode"
Environment="DAEMON_NAME=quasard"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.quasarnode/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
Enable Service
Enable quasar systemd service
sudo systemctl daemon-reload
sudo systemctl enable quasar
Initialize Node
Setting node configuration
quasard config chain-id quasar-1
quasard config keyring-backend file
quasard config node tcp://localhost:10657
Initialize node
quasard init $MONIKER --chain-id quasar-1
Download Genesis & Addrbook
Download genesis & addrbook file
curl -Ls https://snap.nodex.one/quasar/genesis.json > $HOME/.quasarnode/config/genesis.json
curl -Ls https://snap.nodex.one/quasar/addrbook.json > $HOME/.quasarnode/config/addrbook.json
sha256sum genesis.json
: 2eb786d599f3b52ead11cf3e118aa09b7ca0ec4bc8464922c91cbc0ca68cea09
Configure Seeds
Setting up a seed peers
sed -i -e "s|^seeds *=.*|seeds = \"5f5cfac5c38506fbb4275c19e87c4107ec48808d@seeds.nodex.one:10610\"|" $HOME/.quasarnode/config/config.toml
Configure Gas Prices
Setting up a gas prices
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.01ibc/0471F1C4E7AFD3F07702BEF6DC365268D64570F7C1FDC98EA6098DD6DE59817B,0.01ibc/FA0006F056DB6719B8C16C551FC392B62F5729978FC0B125AC9A432DBB2AA1A5,0.01ibc/FA7775734CC73176B7425910DE001A1D2AD9B6D9E93129A5D0750EAD13E4E63A\"|" $HOME/.quasarnode/config/app.toml
Pruning Setting
Configure pruning setting
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
$HOME/.quasarnode/config/app.toml
Custom Port
Please note that updating the port is optional!
Configure a custom port
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:10658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:10657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:10660\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:10656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":10666\"%" $HOME/.quasarnode/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:10617\"%; s%^address = \":8080\"%address = \":10680\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:10690\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:10691\"%; s%:8545%:10645%; s%:8546%:10646%; s%:6065%:10665%" $HOME/.quasarnode/config/app.toml
Download Snapshots
Download latest chain snapshot
curl -L https://snap.nodex.one/quasar/quasar-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.quasarnode
[[ -f $HOME/.quasarnode/data/upgrade-info.json ]] && cp $HOME/.quasarnode/data/upgrade-info.json $HOME/.quasarnode/cosmovisor/genesis/upgrade-info.json
Start Service
Letss f*cking goooo!
sudo systemctl start quasar