NodeUpdate / BatchUpdate
With this script, you can easily update 1 or more Klever Nodes at the same time.
The script installs jq if necessary.

Tested on two machines under Ubuntu 22 and 24.Instructions:
- Download the Script:Open a terminal and use wget or curl to download the script.
If you don’t have wget installed, you might need to install it or use curl instead.
-
Using wget:
bash
wget https://klever-radar.de/software/nodes/update_nodes.sh -
Using curl:
bash
curl -O https://klever-radar.de/software/nodes/update_nodes.shThis will save the script in your current directory.
2. Make the Script Executable:After downloading, change the script’s permissions to allow execution:
bash
chmod +x update_nodes.sh
3. Run the Script:Since the script requires sudo for operations like Docker management and permission changes, run it with elevated privileges:
bash
sudo ./update_nodes.sh
If you’re not in the directory where you downloaded the script, navigate there first or provide the full path:
bash
sudo /path/to/downloaded/script/update_nodes.sh
What the Script Does:
-
Automatic Detection: The script automatically detects all running Klever Nodes (based on the kleverapp/klever-go image) and captures the parameters and ports of each validator.
-
Overview: It compiles a clear overview of the current configuration (path, container, REST API port, redundancy level, and display name) for each node.
-
Update Process: Upon confirmation, it downloads the latest configuration from https://backup.mainnet.klever.org/config.mainnet.108.tar.gz, stops and removes existing containers, sets permissions to 999:999, pulls the kleverapp/klever-go:latest image, and restarts the nodes with their original parameters.
-
Confirmation: After displaying the overview, it prompts you to choose yes (y) or no (n) to proceed with the update.
Example Output (Excerpt):
Current Node Configuration:
Node node1:
Path: /opt/node1
Container: klever-node1
REST API Port: 8080
Redundancy Level: --redundancy-level=1
Display Name: CryptoJaeger#1
Node node2:
Path: /opt/node2
Container: klever-node2
REST API Port: 8081
Redundancy Level: --redundancy-level=1
Display Name: CryptoJaeger#2
[... other nodes ...]
Update Details:
• REST API Ports: 8080 (node1), 8081 (node2), 8082 (node3), 8083 (node4), 8084 (node5)
• Redundancy Level: --redundancy-level=1 (for all nodes)
• Display Names: CryptoJaeger#1 (node1), CryptoJaeger#2 (node2), ...
• Configuration: Downloaded from https://backup.mainnet.klever.org/config.mainnet.108.tar.gz
• Docker Image: kleverapp/klever-go:latest
• User Permissions: 999:999 for all directories
Do you want to proceed with the update for these nodes? (y/n)
Additional Notes:
Review: It’s good practice to review the script content before execution, especially with sudo. View it with:
bash
cat update_nodes.sh
- Environment: Ensure Docker is installed. The script installs jq if needed and requires tools like curl, tar, and sudo.
- Security: Be cautious with scripts from the internet. This script requires sudo privileges for Docker and file operations, so only proceed if you trust the source.