# NodeUpdate / BatchUpdate

**URL:** <https://forum.klever.org/t/nodeupdate-batchupdate/4046>\
**Category:** Validators\
**Created:** [October 4, 2025, 2:00pm UTC](https://forum.klever.org/t/nodeupdate-batchupdate/4046 "2025-10-04T14:00:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CryptoJaeger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.klever.org/cryptojaeger/32/73_2.png) [@CryptoJaeger](https://forum.klever.org/u/CryptoJaeger)\
**Post date:** [October 4, 2025, 2:00pm UTC](https://forum.klever.org/t/nodeupdate-batchupdate/4046/1 "2025-10-04T14:00:23Z")

</div>

NodeUpdate / BatchUpdate

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

![klever_update](https://europe1.discourse-cdn.com/flex013/uploads/klever/original/2X/9/9090337a0869f15561a9dca9b8ae34a036fcd08c.gif)

Tested on two machines under Ubuntu 22 and 24.Instructions:

1. 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:

- Using curl:

2. Make the Script Executable:After downloading, change the script’s permissions to allow execution:

bash

```auto
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

```auto
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

```auto
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](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):

```auto
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

```auto
cat update_nodes.sh

```

1. Environment: Ensure Docker is installed. The script installs jq if needed and requires tools like curl, tar, and sudo.
2. 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.

---

<div class="post-metadata">

**Author:** ![MathijsBok](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.klever.org/mathijsbok/32/3_2.png) [@MathijsBok](https://forum.klever.org/u/MathijsBok)\
**Post date:** [October 7, 2025, 2:21pm UTC](https://forum.klever.org/t/nodeupdate-batchupdate/4046/2 "2025-10-07T14:21:00Z")

</div>

[@Validators](https://forum.klever.org/groups/validators) how easy do you want to have it. Just use this tool…

---

<div class="post-metadata">

**Author:** ![Gizmo\_Duck](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.klever.org/gizmo_duck/32/2725_2.png) [@Gizmo\_Duck](https://forum.klever.org/u/Gizmo_Duck)\
**Post date:** [November 6, 2025, 1:51pm UTC](https://forum.klever.org/t/nodeupdate-batchupdate/4046/3 "2025-11-06T13:51:34Z")

</div>

Used this script on one of the nodes and it updated great but now I can’t run the unjail command. Seems its not able to load the wallet key even though the key file is in the same spot it has always been and I’ve verified its correct:

INFO [2025-11-06 13:44:52.260] Loading keyFile = ./walletKey.pem  
WARN [2025-11-06 13:44:52.260] KeyLoaded not found  
commit: v1.7.15-0-gc1de9106, error: owner and signer key does not match XXXXXXXXX

Any idea if the script would have changed permissions or expected location of the key file? Prior to this commands like unjail fired correctly. Also this is just a single klever node on its own VPS.

---

<div class="post-metadata">

**Author:** ![CryptoJaeger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.klever.org/cryptojaeger/32/73_2.png) [@CryptoJaeger](https://forum.klever.org/u/CryptoJaeger)\
**Post date:** [November 6, 2025, 1:55pm UTC](https://forum.klever.org/t/nodeupdate-batchupdate/4046/4 "2025-11-06T13:55:17Z")

</div>

First check whether you are in the correct folder when executing the command.

The update script does not delete any files.

What command did you enter?

---

<div class="post-metadata">

**Author:** ![Gizmo\_Duck](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.klever.org/gizmo_duck/32/2725_2.png) [@Gizmo\_Duck](https://forum.klever.org/u/Gizmo_Duck)\
**Post date:** [November 6, 2025, 2:06pm UTC](https://forum.klever.org/t/nodeupdate-batchupdate/4046/5 "2025-11-06T14:06:55Z")

</div>

update script went fine, but now trying to run unjail in the base folder for the validator (same spot I ran the update script and contains the wallet folder with .pem in it) it cant seem to load the walletKey.pem

If I run this on my other node:

`docker run -it --rm `  
`-v $(pwd)/wallet:/opt/klever-blockchain `  
`–entrypoint=/usr/local/bin/operator `  
`kleverapp/klever-go:latest account address`

in the same address, it will return the loaded key and operator info, but now running it on the updated node I get:

```auto
-v $(pwd)/wallet:/opt/klever-blockchain \
--entrypoint=/usr/local/bin/operator \
kleverapp/klever-go:latest account address

INFO [2025-11-06 14:04:41.092] Loading keyFile = ./walletKey.pem
WARN [2025-11-06 14:04:41.092] KeyLoaded not found
Wallet address:

```

Ive been checking permissions on the wallet folder and walletKey.pem to see if something might have changed but I dont see it. Trying to figure out how to confirm the exact path these docker scripts are wanting to find the .pem to see if it somewhow changed.

EDIT: I may have sorted it. When I run that command it was generating an empty wallet folder inside the node folder, so clearly thats where its looking for the walletKey.pem now. Unsure why previously it was fine with that folder outside of the node folder but, moving the key seems to have got it to load correctly. Unjail command seems to have worked. So Ill just move the pem on the other nodes as well.

---

<div class="post-metadata">

**Author:** ![MathijsBok](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.klever.org/mathijsbok/32/3_2.png) [@MathijsBok](https://forum.klever.org/u/MathijsBok)\
**Post date:** [November 6, 2025, 3:30pm UTC](https://forum.klever.org/t/nodeupdate-batchupdate/4046/6 "2025-11-06T15:30:36Z")

</div>

To be sure:  
you loaded the command in the root folder and not in the node folder right?

---

<div class="post-metadata">

**Author:** ![fbsobreira](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.klever.org/fbsobreira/32/490_2.png) [@fbsobreira](https://forum.klever.org/u/fbsobreira)\
**Post date:** [November 6, 2025, 6:08pm UTC](https://forum.klever.org/t/nodeupdate-batchupdate/4046/7 "2025-11-06T18:08:54Z")

</div>

New node uses user `999` you will need to change wallet ownership first with  
`chown -R 999 wallet￼`

---

<div class="post-metadata">

**Author:** ![CryptoJaeger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.klever.org/cryptojaeger/32/73_2.png) [@CryptoJaeger](https://forum.klever.org/u/CryptoJaeger)\
**Post date:** [November 6, 2025, 10:32pm UTC](https://forum.klever.org/t/nodeupdate-batchupdate/4046/8 "2025-11-06T22:32:32Z")

</div>

I have published a new complete script here with permissions for /wallet.

The CreateNodes and UpdateNodes scripts are no longer necessary.

> [@Klever Node Management Suite](https://forum.klever.org/t/klever-node-management-suite/4115):
>
> Klever Node Management Suite An all-in-one solution for managing Klever validator nodes gear Requirements Supported Systems: Ubuntu 20.04+, Debian 10+ Requirements: Docker (automatically installed if missing) jq (automatically installed if missing) Root/sudo access clipboard Overview This script provides a unified interface for creating, updating, and managing Klever validator nodes on Ubuntu/Debian systems. It automates the entire node lifecycle with safety checks and beginner-friend…
