Skip to main content

Installation

Update your server to get the latest version

sudo apt update && sudo apt upgrade -y

Install dependencies

sudo apt install git curl wget tar lz4 unzip jq build-essential pkg-config clang bsdmainutils make ncdu -y

Install Go and Cosmovisor

Install Go

Go is a programming language allowing each node of the Cosmos ecosystem to operate.

cd $HOME
version="1.20.4"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile

Check GO version, it must return : go version go1.20.4 linux/amd6

go version

Install Cosmovisor

go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest

Install Node

Install the current version of node binary.

cd $HOME
git clone https://github.com/planq-network/planq planq
cd planq
git checkout v1.1.0
make install

Configure Node

Initialize Node

Please replace 'YOUR_MONIKER' with your own moniker.

planqd init YOUR_MONIKER --chain-id planq_7070-2

Download Genesis

curl https://raw.githubusercontent.com/planq-network/networks/main/mainnet/genesis.json > ~/.planqd/config/genesis.json

Configure Seed

Using a seed node to bootstrap is usually the best practice. Alternatively, you can use addrbook or persistent_peers.

sed -i 's/seeds = ""/seeds = "ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:20356"/' ~/.planqd/config/config.toml

Download Snapshot

We provide instructions for installing with our snapshot. Alternatively you can use State-sync.

Install lz4 if needed

sudo apt update
sudo apt install snapd -y
sudo snap install lz4

Download the snapshot

curl -L  https://snap.blockval.io/planq/planq_7070-2_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.planqd

Launch Node

Configure Cosmovisor Folder

Create Cosmovisor folders and load the node binary.

# Create Cosmovisor Folders
mkdir -p ~/.planqd/cosmovisor/genesis/bin
mkdir -p ~/.planqd/cosmovisor/upgrades

# Load Node Binary into Cosmovisor Folder
cp ~/go/bin/planqd ~/.planqd/cosmovisor/genesis/bin

Create Service File

Create a planq.service file in the /etc/systemd/system folder with the following code snippet. Make sure to replace USER with your Linux user name. You need sudo previlege to do this step.

[Unit]
Description="planq node"
After=network-online.target

[Service]
User=USER
ExecStart=/home/USER/go/bin/cosmovisor run start --home /home/USER/.planqd
Restart=always
RestartSec=3
LimitNOFILE=4096
Environment="DAEMON_NAME=planqd"
Environment="DAEMON_HOME=/home/USER/.planqd"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target

Start Node Service

# Enable service
sudo systemctl enable planq.service

# Start service
sudo service planq start

# Check logs
sudo journalctl -fu planq