Useful commands
Useful set of commands for node operators. From key management to chain governance.

🚨 Maintenance
Get sync info
curl -s http://127.0.0.1:3030/status | jq ".sync_info"
Get version
curl -s http://127.0.0.1:3030/status | jq ".version"
Remove node
Please, before proceeding with the next step! All chain data will be lost! Make sure you have backed up your priv_validator_key.json!
cd $HOME
sudo systemctl stop neard
sudo systemctl disable neard
sudo rm /etc/systemd/system/neard.service
sudo systemctl daemon-reload
rm -f $(which neard)
rm -rf $HOME/.near
rm -rf $HOME/nearcore
⚙️ Service Management
Reload service configuration
sudo systemctl daemon-reload
Enable service
sudo systemctl enable neard
Disable service
sudo systemctl disable neard
Start service
sudo systemctl start neard
Stop service
sudo systemctl stop neard
Restart service
sudo systemctl restart neard
Check service status
sudo systemctl status neard
Check service logs
sudo journalctl -u neard -f --no-hostname -o cat
Last updated
Was this helpful?