⚙️ Installation on Ubuntu/Debian
Chain ID: polkadot | Node Version: v1.19.2
Recommended Hardware:
Node Type
CPU
RAM
Storage
Mainnet
6
32GB
1TB
Update System and Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install -y \
curl git make wget clang pkg-config libssl-dev build-essential \
apt-transport-https gnupg cmake protobuf-compiler lz4
GO_VERSION=1.24.2
curl -Ls https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
echo 'export PATH=/usr/local/go/bin:$HOME/go/bin:$PATH' | sudo tee /etc/profile.d/golang.sh > /dev/null
echo 'export PATH=/usr/local/go/bin:$HOME/go/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Automatic Installation
source <(curl -s https://raw.githubusercontent.com/validexisinfra/Polkadot/main/installmain.sh)
Install Rust and Required Components
curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
rustup update
rustup component add rust-src
rustup target add wasm32-unknown-unknown
rustup install nightly-2024-01-21
rustup target add wasm32-unknown-unknown --toolchain nightly-2024-01-21
Clone and Build Polkadot SDK
cd ~
git clone https://github.com/paritytech/polkadot-sdk.git
cd polkadot-sdk
git checkout polkadot-v1.19.2
cargo build --release
Install binaries into the system directory
sudo mkdir -p /usr/lib/polkadot
sudo cp target/release/polkadot* /usr/lib/polkadot/
sudo ln -sf /usr/lib/polkadot/polkadot /usr/local/bin/polkadot
Create working directory
mkdir -p $HOME/.polkadot
chown -R $(id -u):$(id -g) $HOME/.polkadot
Configure and Create a Systemd Service
current_user=$(whoami)
STARTNAME="Your_Node_Name"
sudo tee /etc/systemd/system/polkadot.service > /dev/null <<EOF
[Unit]
Description=Polkadot Validator Node
After=network.target
[Service]
Type=simple
User=$current_user
WorkingDirectory=$HOME/.polkadot
ExecStart=/usr/local/bin/polkadot \
--validator \
--name "$STARTNAME" \
--chain=polkadot \
--database RocksDb \
--base-path $HOME/.polkadot \
--state-pruning 64 \
--blocks-pruning 64 \
--public-addr /ip4/$(wget -qO- eth0.me)/tcp/30333 \
--port 30333 \
--rpc-port 9933 \
--prometheus-external \
--prometheus-port=9615 \
--unsafe-force-node-key-generation \
--telemetry-url "wss://telemetry-backend.w3f.community/submit/ 1" \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0"
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
Start and Enable the Service
sudo systemctl daemon-reload
sudo systemctl enable polkadot.service
sudo systemctl restart polkadot.service
sudo journalctl -u polkadot.service -f
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
Last updated