Full Node Cheat Sheet
This cheat sheet provides quick instructions for installing a Full Node using an automated script.
- Pre-Requisites
- Install a Full Node using Cosmovisor
- What Gets Installed
- Useful Commands
- Automatic Upgrades
Pre-Requisites
- Linux-based System: Ensure you have a Debian-based Linux distribution (other distributions may work but are not fully supported).
- Root or Sudo Access: You need administrative privileges to run the installation script.
- Dedicated Server or Virtual Machine: Any provider should work (Vultr and Hetzner have been tested).
Install a Full Node using Cosmovisor
To install and set up a Full Node, follow these steps:
-
Download the Installation Script:
curl -O https://raw.githubusercontent.com/pokt-network/poktroll/main/tools/installer/full-node.sh
-
Run the Script with Sudo Privileges:
sudo bash full-node.sh
-
Follow the Prompts:
- Choose the Network: Select
testnet-alpha
,testnet-beta
, ormainnet
. - Set Username: Input the desired username to run
poktrolld
(default:poktroll
). - Set Node Moniker: Input the node moniker (default: your hostname).
- Confirm Seeds and Genesis File: The script fetches seeds and the genesis file automatically.
- External IP Address: The script detects your external IP address. Confirm or input manually if incorrect.
- Choose the Network: Select
The script will handle the installation of dependencies, user creation, environment variable setup, and configuration of Cosmovisor and poktrolld
.
What Gets Installed
When you run the installation script, the following components are set up:
-
System User: A dedicated user (default:
poktroll
) is created to run the node securely. -
Cosmovisor: A binary manager that handles chain upgrades automatically:
- Location:
/home/poktroll/bin/cosmovisor
- Purpose: Manages different versions of
poktrolld
and handles chain upgrades - Configuration: Set up to automatically download and switch to new binaries during upgrades
- Location:
-
Poktrolld: The core node software:
- Location:
/home/poktroll/.poktroll/cosmovisor/genesis/bin/poktrolld
- Configuration:
/home/poktroll/.poktroll/config/
- Data:
/home/poktroll/.poktroll/data/
- Location:
-
Systemd Service: A service that manages the node:
- Name:
cosmovisor.service
- Status: Enabled and started automatically
- Configured for automatic restarts and upgrades
- Name:
Useful Commands
After installation, you can manage your node using the following commands:
Check the status of your node
sudo systemctl status cosmovisor.service
View the logs
sudo journalctl -u cosmovisor.service -f
Stop the node
sudo systemctl stop cosmovisor.service
Start the node
sudo systemctl start cosmovisor.service
Restart the node
sudo systemctl restart cosmovisor.service
Advanced Operations
Check the current version:
sudo -u poktroll poktrolld version
View the Cosmovisor directory structure:
ls -la /home/poktroll/.poktroll/cosmovisor/
Check if an upgrade is available:
ls -la /home/poktroll/.poktroll/cosmovisor/upgrades/
View node configuration:
cat /home/poktroll/.poktroll/config/config.toml
Automatic Upgrades
Your node is configured to handle chain upgrades automatically through Cosmovisor. When a chain upgrade is proposed and approved:
- Cosmovisor will download the new binary
- The node will stop at the designated upgrade height
- Cosmovisor will switch to the new binary
- The node will restart automatically
No manual intervention is required for standard upgrades.