Planq Network

SERVICE
CLI

Safe Block

Staking Service

PLANQ NODE INSTALL

It is assumed that you have already upgraded your host and secured your ssh access and all ports.
We’re going to install the pre-requisites, then we’ll install and configure Go and finally we’ll install planqd, configure it and run it from our snapshot.
Install pre-requisites

sudo apt update
sudo apt install git build-essential ufw curl jq lz4 --yes

Install Go

wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
rm go1.20.2.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
cat <> ~/.profile
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source ~/.profile
go version

You will receive this response:
go version go1.20.2 linux/amd64

Install planqd
git clone https://github.com/planq-network/planq.git
cd planq
git checkout v1.1.1
make install
planqd version


You will receive this response:
1.1.1
Init planqd
# CHANGE $NODE_NAME with your “node name”
planqd config chain-id planq_7070-2
planqd init "$NODE_NAME" --chain-id planq_7070-2
Pruning Setting

sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0026aplq"|g' $HOME/.planqd/config/app.toml
sed -i 's|^pruning *=.*|pruning = "custom"|g' $HOME/.planqd/config/app.toml
sed -i 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|g' $HOME/.planqd/config/app.toml
sed -i 's|^pruning-interval *=.*|pruning-interval = "10"|g' $HOME/.planqd/config/app.toml
sed -i 's|^indexer *=.*|indexer = "null"|g' $HOME/.planqd/config/config.toml

Download Genesis, Addrbook, Snapshot and extract it
rm $HOME/.planqd/config/genesis.json
wget https://snapshot.safeblock.space/planq/genesis.json -P $HOME/.planqd/config
wget https://snapshot.safeblock.space/planq/addrbook.json -P $HOME/.planqd/config
wget https://snapshot.safeblock.space/planq/planq-snapshot_10-04-2024.tar.lz4
lz4 -c -d planq-snapshot_10-04-2024.tar.lz4 | tar -x -C $HOME/.planqd
rm planq-snapshot_10-04-2024.tar.lz4
Create Planq Service

# CHANGE $USER with your “username”
sudo tee /etc/systemd/system/planqd.service > /dev/null << EOF

[Unit]
Description=Planq Network
After=network-online.target

[Service]
User=$USER
ExecStart=/home/$USER/go/bin/planqd start
Restart=always
RestartSec=3
LimitNOFILE=10000

[Install]
WantedBy=multi-user.target
EOF

Start Planq Service

Enable planqd in background:
sudo systemctl enable planqd

Start planqd in background:
sudo systemctl start planqd

Check Planq Service

sudo journalctl -fu planqd -o cat
# Ctrl+C to exit

sudo journalctl -fu planqd -o cat | grep index
# Ctrl+C to exit

curl -s http://0.0.0.0:26657/status | jq -r .result.sync_info.catching_up

If response is “true”, you not are synched, wait….
When response is “false”, your node are synched to Planq Network