Run a Node
Hardware Requirements:
The following hardware minimum requirements are recommended for running the node:
Memory: 64 GB RAM
CPU: 16-Core
Disk: 6 TB SDD Storage
Bandwidth: 1 Gbps for Download/100 Mbps for Upload
Setting Up Your Node:
The following tutorial is done on an Ubuntu Linux 20.04 (LTS) x64 instance machine.
Node Installation:
This guide shows how to install and run an Polygon full node.
How to install Polygon from source:
Before you start, you might want to ensure your system is updated. You can also install a utility named
jq
to read and navigate in JSON files and outputs (other utilities could be installed too).sudo apt update && sudo apt upgrade -y && sudo apt install -y build-essential curl wget jq
To install Heimdall, run the below commands:
curl -L https://raw.githubusercontent.com/maticnetwork/install/main/heimdall.sh | bash -s -- <heimdall_version> <network_type> <node_type>
That will install the heimdalld
and heimdallcli
binaries. Verify the installation by checking the Heimdall version on your machine:
heimdalld version --long
Configure heimdall seeds (mainnet)
sed -i 's|^seeds =.*|seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"|g' /var/lib/heimdall/config/config.toml
chown heimdall /var/lib/heimdall
Configure heimdall seeds (amoy)
sed -i 's|^seeds =.*|seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656"|g' /var/lib/heimdall/config/config.toml
chown heimdall /var/lib/heimdall
Open the P2P port (26656 by default)
sudo ufw allow 26656
To install Bor, run the below commands:
curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- <bor_version> <network_type> <node_type>
That will install the bor
binary. Verify the installation by checking the Bor version on your machine:
bor version
Configure bor seeds (mainnet)
sed -i 's|.*\[p2p.discovery\]| \[p2p.discovery\] |g' /var/lib/bor/config.toml
sed -i 's|.*bootnodes =.*| bootnodes = ["enode://b8f1cc9c5d4403703fbf377116469667d2b1823c0daf16b7250aa576bacf399e42c3930ccfcb02c5df6879565a2b8931335565f0e8d3f8e72385ecf4a4bf160a@3.36.224.80:30303", "enode://8729e0c825f3d9cad382555f3e46dcff21af323e89025a0e6312df541f4a9e73abfa562d64906f5e59c51fe6f0501b3e61b07979606c56329c020ed739910759@54.194.245.5:30303"]|g' /var/lib/bor/config.toml
chown bor /var/lib/bor
Configure bor seeds (amoy)
sed -i 's|.*\[p2p.discovery\]| \[p2p.discovery\] |g' /var/lib/bor/config.toml
sed -i 's|.*bootnodes =.*| bootnodes = ["enode://bdcd4786a616a853b8a041f53496d853c68d99d54ff305615cd91c03cd56895e0a7f6e9f35dbf89131044e2114a9a782b792b5661e3aff07faf125a98606a071@43.200.206.40:30303", "enode://209aaf7ed549cf4a5700fd833da25413f80a1248bd3aa7fe2a87203e3f7b236dd729579e5c8df61c97bf508281bae4969d6de76a7393bcbd04a0af70270333b3@54.216.248.9:30303"]|g' /var/lib/bor/config.toml
chown bor /var/lib/bor
Open the port (30303 by default)
sudo ufw allow 30303
Once the has been configured, we are ready to start the node and sync the data:
Start Heimdall Service.
sudo service heimdalld start
Check logs in real time.
journalctl -u heimdalld.service -f
To verify that the heimdall node is synced before proceeding.
curl -s localhost:26657/status | jq .result | jq .sync_info
Make sure that you have "catching_up": false
, otherwise leave it running until it is in sync.
Now once Heimdall is synced, run.
Start Bor.
sudo service bor start
You can check Bor logs here:
journalctl -u bor.service -f
To verify that the bor node is synced before proceeding.
curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://localhost:8545
Make sure that you have "catching_up": false, otherwise leave it running until it is in sync.
Last updated