🔁 Automatic Restarts with systemd
Prevent downtime by ensuring your node auto-restarts on crash or reboot.
✅ Create/Edit systemd Service
sudo nano /etc/systemd/system/your-node.service
Example config:
[Unit]
Description=Your Node
After=network-online.target
[Service]
User=youruser
ExecStart=/usr/local/bin/your-node
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
✅ Enable & Start It
sudo systemctl daemon-reexec
sudo systemctl enable your-node
sudo systemctl start your-node
Your node will now restart on crash, failure, or reboot. 🚀