This guide provides comprehensive instructions for upgrading your KalyChain node to the latest version.
⚠️ Important: Always backup your node data and configuration before performing any upgrade!
- Prerequisites
- Backup Procedures
- Upgrade Methods
- Post-Upgrade Verification
- Troubleshooting
- Rollback Procedures
- Java 21 (OpenJDK recommended)
- Sufficient disk space (at least 10GB free)
- Network connectivity to download new binaries
- Root/sudo access for service management
- Node is currently running and synced
- Recent backup of validator keys (if applicable)
- Backup of current configuration
- Maintenance window scheduled
- Monitoring alerts configured
Use our backup script for comprehensive backup:
# Run the backup script
./scripts/maintenance/backup-node.shIf you prefer manual backup:
# Create backup directory
mkdir -p ~/backups/$(date +%Y%m%d_%H%M%S)
BACKUP_DIR=~/backups/$(date +%Y%m%d_%H%M%S)
# Backup configuration
cp -r ~/node-install/configs $BACKUP_DIR/
cp /etc/systemd/system/kaly.service $BACKUP_DIR/
# Backup validator keys (if applicable)
if [ -f ~/node/data/key ]; then
cp ~/node/data/key* $BACKUP_DIR/
cp ~/node/data/nodeAddress $BACKUP_DIR/
fi
# Backup genesis file
cp ~/node/genesis.json $BACKUP_DIR/The automated upgrade script handles the entire process safely:
# Navigate to repository
cd ~/node-install
# Run the upgrade script
./scripts/upgrade/upgrade.shWhat the script does:
- ✅ Checks prerequisites (Java 21, disk space)
- ✅ Creates automatic backups
- ✅ Downloads latest Besu binary
- ✅ Stops the node service safely
- ✅ Replaces binary and libraries
- ✅ Updates configuration if needed
- ✅ Starts the service
- ✅ Verifies successful upgrade
For advanced users who prefer manual control:
# Update system packages
sudo apt update && sudo apt upgrade -y
# Install/verify Java 21
sudo apt install openjdk-21-jre-headless -y
java -version # Should show OpenJDK 21# Download latest Besu release
cd /tmp
wget https://github.com/KalyCoinProject/kalychain/releases/download/25.7.0/besu-25.7.0.zip
# Verify download
ls -la besu-25.7.0.zip
# Extract archive
unzip besu-25.7.0.zip# Stop the node service
sudo systemctl stop kaly.service
# Verify it's stopped
sudo systemctl status kaly.service# Backup current binary
sudo cp ~/besu/bin/besu ~/besu/bin/besu.backup.$(date +%Y%m%d)
# Backup current libraries
sudo cp -r ~/besu/lib ~/besu/lib.backup.$(date +%Y%m%d)# Remove old binary and libraries
sudo rm -rf ~/besu/bin ~/besu/lib
# Install new binary and libraries
sudo cp -r /tmp/besu-25.7.0/bin ~/besu/
sudo cp -r /tmp/besu-25.7.0/lib ~/besu/
# Fix permissions
sudo chown -R $USER:$USER ~/besu/bin ~/besu/lib
sudo chmod +x ~/besu/bin/besu# Update genesis file if needed (check release notes)
# cp ~/node-install/configs/[node-type]/genesis.json ~/node/genesis.json
# Update service configuration if needed
# sudo systemctl daemon-reload# Start the service
sudo systemctl start kaly.service
# Enable auto-start
sudo systemctl enable kaly.service# Verify service is running
sudo systemctl status kaly.service
# Check recent logs
sudo journalctl -u kaly.service -n 20 --no-pager# Check node status
./scripts/maintenance/check-status.sh
# Test RPC (if enabled)
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
http://localhost:8545# Watch logs in real-time
sudo journalctl -u kaly.service -f
# Look for sync progress messages
# Expected: "Imported block" messages-
Check Java version:
java -version # Should show OpenJDK 21 -
Verify binary permissions:
ls -la ~/besu/bin/besu # Should be executable
-
Check configuration paths:
sudo systemctl cat kaly.service # Verify all paths are correct
-
Check network connectivity:
# Test bootnode connectivity telnet 169.197.143.193 30303 telnet 169.197.143.209 30303 -
Verify genesis file:
# Compare with repository version diff ~/node/genesis.json ~/node-install/configs/[node-type]/genesis.json
-
Check system resources:
# Monitor CPU and memory htop # Check disk I/O iostat -x 1
-
Review configuration:
- Ensure adequate memory allocation
- Verify SSD storage usage
- Check network bandwidth
If the upgrade fails, you can rollback to the previous version:
# Stop current service
sudo systemctl stop kaly.service
# Restore from backup
sudo cp ~/besu/bin/besu.backup.* ~/besu/bin/besu
sudo cp -r ~/besu/lib.backup.* ~/besu/lib
# Fix permissions
sudo chown -R $USER:$USER ~/besu/bin ~/besu/lib
sudo chmod +x ~/besu/bin/besu
# Start service
sudo systemctl start kaly.service# Check service status
sudo systemctl status kaly.service
# Verify version
~/besu/bin/besu --versionNeed help with upgrades?
- 📖 Documentation: Troubleshooting Guide
- 💬 Discord: KalyChain Community
- 📱 Telegram: Support Group
- 🐛 Issues: GitHub Issues
| Version | Release Date | Key Changes |
|---|---|---|
| 25.7.0 | 2024-01-XX | Latest stable release |
| 22.10.3 | 2023-XX-XX | Previous stable release |
Note: Always check the release notes for version-specific upgrade instructions.