![](https://docs.indonode.net/~gitbook/image?url=https%3A%2F%2Fexplorer.indonode.net%2Flogos%2Fplanq.png&width=768&dpr=4&quality=100&sign=2a502115&sv=1)
Version | Chain-id | Wasm |
---|---|---|
1.0.8 | planq_7070-2 | DISABLED |
Setup Server
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y
# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100
# Enable Firewall
sudo ufw enable
# Install Go
ver="1.20.5"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
Node Installation
There is 2 ways to install node , using Cosmovisor or Run the binary directly, you can choose whats you prefer
# Download and install binary
cd $HOME
rm -rf planq/
git clone https://github.com/planq-network/planq.git
cd planq/
git checkout v1.0.8
make build
# Setup Cosmovisor Symlinks
mkdir -p $HOME/.planqd/cosmovisor/genesis/bin
mv build/planqd $HOME/.planqd/cosmovisor/genesis/bin/
rm -rf build
sudo ln -s $HOME/.planqd/cosmovisor/genesis $HOME/.planqd/cosmovisor/current
sudo ln -s $HOME/.planqd/cosmovisor/current/bin/planqd /usr/local/bin/planqd
# Set Configuration for your node
planqd config chain-id planq_7070-2
planqd config keyring-backend file
# Init your node
# You can change "MyNode" to anything you like
planqd init MyNode --chain-id planq_7070-2
# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/planq/genesis.json > $HOME/.planqd/config/genesis.json
curl -Ls https://snapshots.indonode.net/planq/addrbook.json > $HOME/.planqd/config/addrbook.json
#Configure Seeds and Peers
SEEDS=`curl -sL https://raw.githubusercontent.com/planq-network/networks/main/mainnet/seeds.txt | awk '{print $1}' | paste -s -d, -`
PEERS=`curl -sL https://raw.githubusercontent.com/planq-network/networks/main/mainnet/peers.txt | sort -R | head -n 10 | awk '{print $1}' | paste -s -d, -`
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.planqd/config/config.toml
# Set Pruning, Enable Prometheus, Gas Price, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"
sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.planqd/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.planqd/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.planqd/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0aplanq\"/" $HOME/.planqd/config/app.toml
# Set Service file
sudo tee /etc/systemd/system/planqd.service > /dev/null << EOF
[Unit]
Description=planqd 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/.planqd"
Environment="DAEMON_NAME=planqd"
Environment="UNSAFE_SKIP_BACKUP=true"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable planqd
# Download Latest Snapshot
# Downlaod Latest Snapshot
curl -L https://snapshots.indonode.net/planq/planq-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.planqd
[[ -f $HOME/.planqd/data/upgrade-info.json ]] && cp $HOME/.planqd/data/upgrade-info.json $HOME/.planqd/cosmovisor/genesis/upgrade-info.json
# Start the Node
sudo systemctl restart planqd
sudo journalctl -fu planqd -o cat
# Download and install binary
cd $HOME
rm -rf planq/
git clone https://github.com/planq-network/planq.git
cd planq/
git checkout v1.0.8
make install
# Set Configuration for your node
planqd config chain-id planq_7070-2
planqd config keyring-backend file
# Init your node
# You can change "MyNode" to anything you like
planqd init MyNode --chain-id planq_7070-2
# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/planq/genesis.json > $HOME/.planqd/config/genesis.json
curl -Ls https://snapshots.indonode.net/planq/addrbook.json > $HOME/.planqd/config/addrbook.json
#Configure Seeds and Peers
SEEDS=`curl -sL https://raw.githubusercontent.com/planq-network/networks/main/mainnet/seeds.txt | awk '{print $1}' | paste -s -d, -`
PEERS=`curl -sL https://raw.githubusercontent.com/planq-network/networks/main/mainnet/peers.txt | sort -R | head -n 10 | awk '{print $1}' | paste -s -d, -`
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.planqd/config/config.toml
# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"
sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.planqd/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.planqd/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.planqd/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.planqd/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0aplanq\"/" $HOME/.planqd/config/app.toml
# Set Service file
sudo tee /etc/systemd/system/planqd.service > /dev/null <<EOF
[Unit]
Description=planqd node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which planqd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable planqd
# Downlaod Latest Snapshot
curl -L https://snapshots.indonode.net/planq/planq-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.planqd
[[ -f $HOME/.planqd/data/upgrade-info.json ]] && cp $HOME/.planqd/data/upgrade-info.json $HOME/.planqd/cosmovisor/genesis/upgrade-info.json
# Start the Node
sudo systemctl restart planqd
sudo journalctl -fu planqd -o cat
Last updated