💾Node Installation

Polkadot Mainnet guide

  • Hardware requirements:

Node TypeCPURAMStorage

Mainnet

8

32GB

2TB

Preparing the server

sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y

Docker and docker-compose

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/installers/docker.sh)

Build 02.09.24

cd $HOME
mkdir -p $HOME/.polkadot
chown -R $(id -u):$(id -g) $HOME/.polkadot

#Start
docker run -dit \
--name polkadot_node \
--restart always \
--network host \
-v $HOME/.polkadot:/data -u $(id -u ${USER}):$(id -g ${USER}) \
parity/polkadot:latest --base-path /data \
--validator --name "<moniker>" \
--port 30333 \
--rpc-port 9933 \
--prometheus-port 9615 \
--telemetry-url 'wss://telemetry.polkadot.io/submit/ 1' \
--telemetry-url 'wss://telemetry-backend.w3f.community/submit 1'
  • After launch, we wait for our node to synchronize. You can track our condition using telemetry

  • After the node has synchronized, we pull out the key from our node by entering the command

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9933

Creating a validator

  • Go to the chain and first create a wallet

  • We create a validator. To do this, select Network - Staking - Accounts - Validator

SnapShot Mainnet | RocksDB (pruned) - updated every 24 hours

You can check the size and time of snapshot creation with this command curl -sI https://polkadot.snapshot.stavr.tech/polkadot-snap.tar.lz4 | grep "last" && curl -sI https://polkadot.snapshot.stavr.tech/polkadot-snap.tar.lz4 | grep content-length | awk '{printf "%.2f GB\n", $2/1024/1024/1024}'

cd $HOME
apt install lz4
docker stop polkadot_node
rm -rf $HOME/.polkadot/chains/polkadot/db
curl -o - -L https://polkadot.snapshot.stavr.tech/polkadot-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.polkadot/chains/polkadot/
docker restart polkadot_node && docker logs polkadot_node -fn 100

SnapShot Mainnet | RocksDB (Archive) - updated every 7 days

You can check the size and time of snapshot creation with this command curl -sI https://polkadot-archive.snapshot.stavr.tech/polkadot-archive-snap.tar.lz4 | grep "last" && curl -sI https://polkadot-archive.snapshot.stavr.tech/polkadot-archive-snap.tar.lz4 | grep content-length | awk '{printf "%.2f GB\n", $2/1024/1024/1024}'

cd $HOME
apt install lz4
docker stop polkadot_node
rm -rf $HOME/.polkadot/chains/polkadot/db
curl -o - -L https://polkadot-archive.snapshot.stavr.tech/polkadot-archive-snap.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.polkadot/chains/polkadot/
docker restart polkadot_node && docker logs polkadot_node -fn 100

Monitoring

You can set up your node status alarm here - Monitoring

Security

You can create secure management of your wallet and your node by following this links.

TMKMS Wallet Security

logs

docker logs polkadot_node -fn 100

restart

docker restart polkadot_node

delete node

docker stop polkadot_node
docker rm polkadot_node
rm -rf $HOME/.polkadot
docker system prune -af --volumes

Last updated