Full Node - Binary (~30 min)
Set network to testnet-beta (stable testing network)
NETWORK="testnet-beta"
Create config directory if it doesn't exist
mkdir -p $HOME/.pocket/config
Download genesis file from URL
GENESIS_FILE_URL="https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/shannon/${NETWORK}/genesis.json" curl -s -o $HOME/.pocket/config/genesis.json "$GENESIS_FILE_URL"
Extract initial version of pocketd to start synching from genesis
POCKETD_GENESIS_VERSION=$(jq -r '.app_version' < $HOME/.pocket/config/genesis.json)
Snapshot (testnet-beta)
echo "############################################"
Base URL for snapshots
SNAPSHOT_BASE_URL="https://snapshots.us-nj.poktroll.com"
Get latest snapshot information for testnet-beta
LATEST_SNAPSHOT_HEIGHT=$(curl -s "$SNAPSHOT_BASE_URL/testnet-beta-latest-archival.txt") echo "Latest snapshot height: $LATEST_SNAPSHOT_HEIGHT"
Get snapshot version (important for compatibility)
SNAPSHOT_VERSION=$(curl -s "$SNAPSHOT_BASE_URL/testnet-beta-${LATEST_SNAPSHOT_HEIGHT}-version.txt") echo "Snapshot version: $SNAPSHOT_VERSION"
Store the torrent URL for later use
TORRENT_URL="${SNAPSHOT_BASE_URL}/testnet-beta-latest-archival.torrent"
Set the version to use for installation
POCKETD_VERSION=$SNAPSHOT_VERSION echo "Sync from snapshot will use the following version of pocketd as a starting point: $POCKETD_VERSION"
echo "############################################"
Apply Snapshot (common)
Create a directory for the snapshot download
SNAPSHOT_DIR="$HOME/pocket_snapshot" mkdir -p "$SNAPSHOT_DIR" "$HOME/.pocket/data" cd "$SNAPSHOT_DIR"
Download via torrent
aria2c --seed-time=0 --file-allocation=none --continue=true --max-connection-per-server=4 --max-concurrent-downloads=16 --split=16 --bt-enable-lpd=true --bt-max-peers=100 --bt-prioritize-piece=head,tail --bt-seed-unverified "$TORRENT_URL"
Find the downloaded file
DOWNLOADED_FILE=$(find . -type f -name ".tar." | head -n 1)
Extract the snapshot
if [[ "$DOWNLOADED_FILE" == *.tar.zst ]]; then echo "Extracting .tar.zst snapshot..." zstd -d "$DOWNLOADED_FILE" --stdout | tar -xf - -C $HOME/.pocket/data elif [[ "$DOWNLOADED_FILE" == *.tar.gz ]]; then echo "Extracting .tar.gz snapshot..." tar -zxf "$DOWNLOADED_FILE" -C $HOME/.pocket/data else echo "Unknown snapshot format: $DOWNLOADED_FILE" exit 1 fi
Clean up
cd $HOME rm -rf "$SNAPSHOT_DIR"
echo "###" echo "Snapshot applied successfully" echo "###"
Install pocketd (determine version from snapshot or genesis)
pocketd (determine version from snapshot or genesis)Determine your OS type and architecture
OS_TYPE=$(uname -s | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m) if [ "$ARCH" = "x86_64" ]; then ARCH="amd64" elif [ "$ARCH" = "aarch64" ]; then ARCH="arm64" fi
Download and install pocketd with the version determined in the previous step
RELEASE_URL="https://github.com/pokt-network/poktroll/releases/download/v${POCKETD_VERSION}/pocket_${OS_TYPE}_${ARCH}.tar.gz" mkdir -p $HOME/.pocket/cosmovisor/genesis/bin curl -L "$RELEASE_URL" | tar -zxvf - -C $HOME/.pocket/cosmovisor/genesis/bin chmod +x $HOME/.pocket/cosmovisor/genesis/bin/pocketd
Verify the installation
$HOME/.pocket/cosmovisor/genesis/bin/pocketd version
Initialize Cosmovisor with the pocketd binary
cosmovisor init $HOME/.pocket/cosmovisor/genesis/bin/pocketd
Network Configuration (testnet-beta)
Initialize the node with your chosen moniker (node name)
pocketd init "YourNodeMoniker" --network=beta --home=$HOME/.pocket
Get seeds from the official repository
SEEDS_URL="https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/shannon/testnet-beta/seeds" SEEDS=$(curl -s "$SEEDS_URL") sed -i -e "s|^seeds =.|seeds = "$SEEDS"|" $HOME/.pocket/config/config.toml
Get skip upgrade heights url
SKIP_UPGRADES_HEIGHTS_URL="https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/shannon/testnet-beta/skip_upgrade_heights"
Configure external address for P2P communication
EXTERNAL_IP=$(curl -s https://api.ipify.org) sed -i -e "s|^external_address =.|external_address = "${EXTERNAL_IP}:26656"|" $HOME/.pocket/config/config.toml
Set Up systemd Service (common)
systemd Service (common)Set a service name (change if running multiple nodes)
SERVICE_NAME="cosmovisor-pocket" # or another name like "cosmovisor-testnet"
Store the current username for use in the service file
USERNAME=$(whoami)
Get skip upgrade heights
SKIP_UPGRADES="" SKIP_UPGRADE_HEIGHTS=$(curl -s "$SKIP_UPGRADES_HEIGHTS_URL") if [ ! -z "$SKIP_UPGRADE_HEIGHTS" ]; then SKIP_UPGRADES="--unsafe-skip-upgrades $SKIP_UPGRADE_HEIGHTS" fi
sudo tee /etc/systemd/system/${SERVICE_NAME}.service > /dev/null <<EOF [Unit] Description=Cosmovisor daemon for pocketd After=network-online.target
[Service] User=${USERNAME} ExecStart=/home/${USERNAME}/.local/bin/cosmovisor run start --home=/home/${USERNAME}/.pocket $SKIP_UPGRADES Restart=always RestartSec=3 LimitNOFILE=infinity LimitNPROC=infinity Environment="DAEMON_NAME=pocketd" Environment="DAEMON_HOME=/home/${USERNAME}/.pocket" Environment="DAEMON_RESTART_AFTER_UPGRADE=true" Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true" Environment="UNSAFE_SKIP_BACKUP=true"
[Install] WantedBy=multi-user.target EOF
sudo systemctl daemon-reload sudo systemctl enable ${SERVICE_NAME}.service sudo systemctl start ${SERVICE_NAME}.service
Firewall (expose P2P port 26656)
[REQUIRED] Expose P2P (UFW)
sudo ufw allow 26656/tcp
OR iptables:
sudo iptables -A INPUT -p tcp --dport 26656 -j ACCEPT sudo iptables-save > /etc/iptables/rules.v4 # Save rules (may require iptables-persistent package)
Install netcat if needed and check port from an external host
sudo apt install -y netcat
OR
sudo apt install netcat-openbsd
nc -zv portquiz.net 26656
OR have someone test:
nc -zv YOUR_EXTERNAL_IP 26656
Check & Monitor the Status of your Node
sudo systemctl status ${SERVICE_NAME}
sudo journalctl -u ${SERVICE_NAME} -f
pocketd status | jq '.sync_info.catching_up'
pocketd status | jq '.sync_info.latest_block_height'
Set network to testnet-alpha (unstable testing network)
NETWORK="testnet-alpha"
Create config directory if it doesn't exist
mkdir -p $HOME/.pocket/config
Download genesis file from URL
GENESIS_FILE_URL="https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/shannon/${NETWORK}/genesis.json" curl -s -o $HOME/.pocket/config/genesis.json "$GENESIS_FILE_URL"
Extract initial version of pocketd to start synching from genesis
POCKETD_GENESIS_VERSION=$(jq -r '.app_version' < $HOME/.pocket/config/genesis.json)
Snapshot (testnet-alpha)
echo "############################################"
Base URL for snapshots
SNAPSHOT_BASE_URL="https://snapshots.us-nj.poktroll.com"
Get latest snapshot information for testnet-alpha
LATEST_SNAPSHOT_HEIGHT=$(curl -s "$SNAPSHOT_BASE_URL/testnet-alpha-latest-archival.txt") echo "Latest snapshot height: $LATEST_SNAPSHOT_HEIGHT"
Get snapshot version (important for compatibility)
SNAPSHOT_VERSION=$(curl -s "$SNAPSHOT_BASE_URL/testnet-alpha-${LATEST_SNAPSHOT_HEIGHT}-version.txt") echo "Snapshot version: $SNAPSHOT_VERSION"
Store the torrent URL for later use
TORRENT_URL="${SNAPSHOT_BASE_URL}/testnet-alpha-latest-archival.torrent"
Set the version to use for installation
POCKETD_VERSION=$SNAPSHOT_VERSION echo "Sync from snapshot will use the following version of pocketd as a starting point: $POCKETD_VERSION"
echo "############################################"
Network Configuration (testnet-alpha)
Initialize the node with your chosen moniker (node name)
pocketd init "YourNodeMoniker" --network=alpha --home=$HOME/.pocket
Get seeds from the official repository
SEEDS_URL="https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/shannon/testnet-alpha/seeds" SEEDS=$(curl -s "$SEEDS_URL") sed -i -e "s|^seeds =.|seeds = "$SEEDS"|" $HOME/.pocket/config/config.toml
Get skip upgrade heights url
SKIP_UPGRADES_HEIGHTS_URL="https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/shannon/testnet-alpha/skip_upgrade_heights"
Configure external address for P2P communication
EXTERNAL_IP=$(curl -s https://api.ipify.org) sed -i -e "s|^external_address =.|external_address = "${EXTERNAL_IP}:26656"|" $HOME/.pocket/config/config.toml
Set network to mainnet (production network)
NETWORK="mainnet"
Create config directory if it doesn't exist
mkdir -p $HOME/.pocket/config
Download genesis file from URL
GENESIS_FILE_URL="https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/shannon/${NETWORK}/genesis.json" curl -s -o $HOME/.pocket/config/genesis.json "$GENESIS_FILE_URL"
Extract initial version of pocketd to start synching from genesis
POCKETD_GENESIS_VERSION=$(jq -r '.app_version' < $HOME/.pocket/config/genesis.json)
Snapshot (mainnet)
echo "############################################"
Base URL for snapshots
SNAPSHOT_BASE_URL="https://snapshots.us-nj.poktroll.com"
Get latest snapshot information for mainnet
LATEST_SNAPSHOT_HEIGHT=$(curl -s "$SNAPSHOT_BASE_URL/mainnet-latest-archival.txt") echo "Latest snapshot height: $LATEST_SNAPSHOT_HEIGHT"
Get snapshot version (important for compatibility)
SNAPSHOT_VERSION=$(curl -s "$SNAPSHOT_BASE_URL/mainnet-${LATEST_SNAPSHOT_HEIGHT}-version.txt") echo "Snapshot version: $SNAPSHOT_VERSION"
Store the torrent URL for later use
TORRENT_URL="${SNAPSHOT_BASE_URL}/mainnet-latest-archival.torrent"
Set the version to use for installation
POCKETD_VERSION=$SNAPSHOT_VERSION echo "Sync from snapshot will use the following version of pocketd as a starting point: $POCKETD_VERSION"
echo "############################################"
Network Configuration (mainnet)
Initialize the node with your chosen moniker (node name)
pocketd init "YourNodeMoniker" --network=main --home=$HOME/.pocket
Get seeds from the official repository
SEEDS_URL="https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/shannon/mainnet/seeds" SEEDS=$(curl -s "$SEEDS_URL") sed -i -e "s|^seeds =.|seeds = "$SEEDS"|" $HOME/.pocket/config/config.toml
Get skip upgrade heights url
SKIP_UPGRADES_HEIGHTS_URL="https://raw.githubusercontent.com/pokt-network/pocket-network-genesis/master/shannon/mainnet/skip_upgrade_heights"
Configure external address for P2P communication
EXTERNAL_IP=$(curl -s https://api.ipify.org) sed -i -e "s|^external_address =.|external_address = "${EXTERNAL_IP}:26656"|" $HOME/.pocket/config/config.toml
6. Choose Sync Method: Genesis vs Snapshot
Before installing pocketd, decide whether to sync from genesis (block 0) or use a snapshot. This choice determines which pocketd version to install.
When syncing from genesis, Cosmovisor will automatically update the pocketd binary at upgrade heights according to the network upgrade plan.
The two sync paths (illustrative):
Sync from Genesis: start at v0.1.0 at height 0, upgrade through intermediate versions until current chain state.
Sync from Snapshot: start from a recent height and version (faster), then follow shared upgrade path to current.
6.1 [Slow & Not Recommended] Sync from Genesis
The genesis file contains the required initial version of pocketd to start syncing from genesis.
POCKETD_VERSION=$POCKETD_GENESIS_VERSION echo "Sync from genesis will use the following version of pocketd as a starting point: $POCKETD_VERSION"
6.2 [Fast & Recommended] Sync from Snapshot
You can visit https://snapshots.us-nj.poktroll.com/ to explore available snapshots. If using snapshots, check the snapshot version first (see per-network tabs above). Use the snapshot flow to download and apply a snapshot, then install pocketd with the snapshot version.
Restart a Full Node After a Reorg
Review this section if:
Your node is not syncing
Your node shows an AppHash error
A reorg may be necessary after protocol upgrades, chain halts, or other issues. If the core team has released a fix, you can either decommission and resync, or keep your Cosmovisor installation and perform the following steps.
Tips
Was this helpful?
