Home / Services / Planq Node Installation

Planq Node Installation Guide

A comprehensive guide to installing and configuring a Planq blockchain node on your server. Follow these steps to set up your node quickly and efficiently.

System Requirements

  • 4 CPU cores
  • 8GB RAM
  • 200GB SSD storage
  • Stable internet connection

Estimated Time

  • Setup: 15-20 minutes
  • Sync: 2-3 hours
  • Validation: 10 minutes

Installation Steps

1

Update System Packages

First, make sure your system is up to date with the latest packages.

sudo apt update && sudo apt upgrade -y
Copied!
2

Install Dependencies

Install the necessary dependencies for the Planq node software.

sudo apt install curl build-essential git wget jq make gcc tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip lz4 -y
Copied!
3

Install Go

Install Go programming language which is required for building the Planq node.

wget https://go.dev/dl/go1.20.5.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc
Copied!
4

Clone Planq Repository

Clone the official Planq repository to your local machine.

git clone https://github.com/planq-network/planq.git
cd planq
Copied!
5

Build Planq

Build the Planq node software from source.

make install
Copied!
6

Initialize Node

Initialize your Planq node with a custom moniker.

planqd init mynode --chain-id planq_7000-1
Copied!
7

Download Genesis File

Download the genesis file for the Planq network.

wget https://raw.githubusercontent.com/planq-network/networks/main/mainnet/genesis.json -O ~/.planqd/config/genesis.json
Copied!
8

Configure Peers

Add persistent peers to your configuration.

PEERS="$(curl -s https://raw.githubusercontent.com/planq-network/networks/main/mainnet/peers.txt | head -n 10 | awk '{print $1}' | paste -s -d ',' -)"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.planqd/config/config.toml
Copied!
9

Configure State Sync

Enable state sync for faster synchronization.

sed -i.bak -E 's#^(enable[[:space:]]+=[[:space:]]+).*$#\1true#' ~/.planqd/config/config.toml
sed -i.bak -E 's#^(rpc_servers[[:space:]]+=[[:space:]]+).*$#\1"https://rpc.planq.network,https://rpc.planq.network"#' ~/.planqd/config/config.toml
sed -i.bak -E 's#^(trust_height[[:space:]]+=[[:space:]]+).*$#\1"1"#' ~/.planqd/config/config.toml
sed -i.bak -E 's#^(trust_hash[[:space:]]+=[[:space:]]+).*$#\1"0000000000000000000000000000000000000000000000000000000000000000"#' ~/.planqd/config/config.toml
Copied!
10

Create Service File

Create a systemd service file for automatic startup.

sudo tee /etc/systemd/system/planqd.service > /dev/null
[Unit]
Description=Planq Node
After=network.target

[Service]
Type=simple
User=$USER
WorkingDirectory=$HOME
ExecStart=$(which planqd) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
Copied!
11

Start Node Service

Enable and start the Planq node service.

sudo systemctl daemon-reload
sudo systemctl enable planqd
sudo systemctl start planqd
Copied!
12

Check Node Status

Monitor your node's status and logs.

# Check service status
sudo systemctl status planqd

# View logs
sudo journalctl -u planqd -f

# Check sync status
planqd status 2>&1 | jq .SyncInfo
Copied!

Additional Configuration

Configure Pruning

Optimize storage usage by configuring pruning settings.

sed -i.bak -E 's#^(pruning[[:space:]]+=[[:space:]]+).*$#\1"custom"#' ~/.planqd/config/app.toml
sed -i.bak -E 's#^(pruning-keep-recent[[:space:]]+=[[:space:]]+).*$#\1"100"#' ~/.planqd/config/app.toml
sed -i.bak -E 's#^(pruning-keep-every[[:space:]]+=[[:space:]]+).*$#\1"0"#' ~/.planqd/config/app.toml
sed -i.bak -E 's#^(pruning-interval[[:space:]]+=[[:space:]]+).*$#\1"10"#' ~/.planqd/config/app.toml
Copied!

Configure Indexer

Enable the indexer for better query performance.

sed -i.bak -E 's#^(indexer[[:space:]]+=[[:space:]]+).*$#\1"kv"#' ~/.planqd/config/config.toml
Copied!

Set Minimum Gas Prices

Configure minimum gas prices for transactions.

sed -i.bak -E 's#^(minimum-gas-prices[[:space:]]+=[[:space:]]+).*$#\1"0.0001aplanq"#' ~/.planqd/config/app.toml
Copied!

Monitoring Your Node

Enable Prometheus Metrics

Enable Prometheus metrics for monitoring.

sed -i.bak -E 's#^(prometheus[[:space:]]+=[[:space:]]+).*$#\1true#' ~/.planqd/config/config.toml
Copied!

Useful Commands

# Check node status
planqd status 2>&1 | jq .

# Check validator status
planqd query staking validator $(planqd keys show wallet --bech val -a)

# Check node info
planqd query tendermint-validator-set

# Check network info
planqd query staking params

# Check your balance
planqd query bank balances $(planqd keys show wallet -a)
Copied!

Troubleshooting

Common Issues and Solutions

Node Not Syncing

If your node is not syncing, try these steps:

  • Check your internet connection
  • Verify that you have the correct genesis file
  • Ensure your persistent peers are correctly configured
  • Try resetting the node state and resyncing

High Memory Usage

If your node is using too much memory:

  • Adjust the pruning settings
  • Increase your swap space
  • Monitor and kill unnecessary processes
  • Consider upgrading your server's RAM

Connection Issues

If you're having connection problems:

  • Check your firewall settings
  • Verify port forwarding if behind NAT
  • Ensure your node's ports are open
  • Try using different persistent peers

Frequently Asked Questions