What it does
Running a validator means running Docker containers, keeping configuration files up to date and looking after BLS keys. The Node Manager wraps all of this in one interactive script with beginner-friendly prompts and safety checks.
Create nodes
Automated setup with intelligent port assignment and node numbering, normal or fallback, with or without new BLS keys.
Update nodes
Choose a Docker image version, refresh the configuration and restart all nodes. Your blockchain data stays untouched.
Manage nodes
Status table with version, uptime, nonce and sync state. Start, stop, restart, read logs, repair permissions.
Extract BLS keys
Shows the BLS public key of every node, which you need for the validator registration.
Safety first
Existing nodes are detected and never overwritten. A failed creation cleans up after itself.
Smart detection
Finds the next free node number and REST API port by itself, even when you add nodes later.
The script works on one server at a time. If you run nodes on several servers and want a web dashboard with monitoring and alerts, take a look at the Klever Node Hub.
Requirements
- Operating system: Ubuntu 20.04 or newer, Debian 10 or newer. Other distributions are refused.
- Access: root or
sudo. - Docker and jq: installed automatically if they are missing (Docker from the official Docker repository).
- Internet access to Docker Hub (image and tag list) and to the official Klever configuration backup
backup.mainnet.klever.org. If that is unavailable, the script falls back to the configuration files in theklever-io/klever-gorepository on GitHub.
Installation
-
Download the script
Run this on your server, or upload the file with SCP/SFTP.
wget https://klever-radar.de/software/nodes/klever_node_manager.sh
-
Make it executable
chmod +x klever_node_manager.sh
-
Run it
sudo ./klever_node_manager.sh
The script also understands --help and --version.
The script runs as root and installs software. As with any script from the internet, open it and read it first. The source is public on GitHub.
1 · Create new nodes
Choose [1] in the main menu. The script asks for the following, in this order:
- Existing nodesThe script checks for nodes that are already there. If it finds some, it lists them with port and status and asks whether you want to continue.
- Installation directoryPress Enter for the default
/opt. - DockerInstalled automatically if missing.
- Image tagThe script shows the 15 most recent tags of
kleverapp/klever-go(development, testnet, devnet, alpine and validator-only tags are left out). Press Enter forlatest, type a number, or type a tag yourself. The image is then pulled. - Number of nodesHow many nodes should be created in this run.
- Normal or fallbackSee the table below.
- New BLS keys?Only asked for normal nodes. Fallback nodes never generate keys.
- SummaryPath, number, type, key generation, node names and ports. Confirm with
yand the nodes are created.
Normal nodes and fallback nodes
| Normal node | Fallback node | |
|---|---|---|
| Role | Active validator that takes part in consensus | Backup validator that takes over when the main node fails |
| Start option | no --redundancy-level | --redundancy-level=1 |
| BLS key | New key generated by the script, or your own validatorKey.pem | The same validatorKey.pem as your main node |
Example: first installation with three normal nodes
Select option: 1 Checking for existing Klever nodes... No existing nodes found. You can create new nodes. Enter installation directory (default: /opt): /opt Installation directory: /opt Available image tags: [ 1] latest (default) [ 2] v1.7.14 ... Select tag number or type custom tag [latest]: Selected: kleverapp/klever-go:latest How many nodes do you want to create? 3 Are these fallback nodes? (y/n): n Do you need to generate new BLS validator keys? (y/n): y Summary: • Installation path: /opt • Number of nodes: 3 • Node type: Normal (active validator) • Generate new keys: Yes • Node names: node1 - node3 • REST API ports: 8080 - 8082 Proceed with node creation? (y/n): y Creating node1... ✓ Directories created ✓ Configuration downloaded from primary source ✓ Validator keys generated ✓ Container started successfully ✓ Node node1 created successfully! [... node2 and node3 the same ...] ✓ Successfully created: 3 ⚠ IMPORTANT: New 'validatorKey.pem' files have been generated in each node's config directory. Please ensure these keys are backed up securely!
Shortened example. The version numbers in the tag list depend on what is currently published.
Adding more nodes later
If nodes already exist, the script lists them, takes the highest node number and port, and continues after that. With node1 to node3 on ports 8080 to 8082, two new nodes become node4 and node5 on ports 8083 and 8084.
Existing nodes detected: • node1 - Port: 8080 - Status: Running • node2 - Port: 8081 - Status: Running • node3 - Port: 8082 - Status: Running Used ports: 8080 8081 8082 New nodes will automatically use the next available ports starting from 8083. Do you want to continue creating additional nodes? (y/n): y
After the creation
- New keys generated: back up every
validatorKey.pemin/opt/nodeX/config/. - Fallback nodes: copy the
validatorKey.pemof your main node into the config folder of each fallback node, then restart it withdocker restart klever-nodeX. - Own keys for normal nodes: place your
validatorKey.pemin/opt/nodeX/config/and restart the container.
Without the validatorKey.pem you cannot restore your validator on another server.
2 · Update existing nodes
Choose [2] to bring all your nodes to a new Docker image and the latest configuration. The script updates all nodes it finds, one after the other.
- OverviewEvery node is listed with path, container, REST API port, type (normal or fallback) and display name. If all nodes are fallback nodes, the script warns you.
- Image tagThe same tag selection as when creating nodes. The image is pulled.
- Version checkThe summary shows the running and the target version and tells you whether a new image is available.
- ConfirmFor each node the script downloads the latest configuration, stops and removes the old container, repairs permissions and starts a new container with the same settings.
Update Summary: • Total nodes to update: 3 • Normal validators: 2 • Fallback nodes: 1 • Configuration source: backup.mainnet.klever.org (fallback: klever-io/klever-go) • Docker image: kleverapp/klever-go:latest • Running version: v1.7.13 • Target version: v1.7.14 ↑ New image available! Proceed with the update? (y/n): y
Example. The version numbers are illustrative.
Updated
- Configuration files in
/config/ - The Docker image
- The container, which is recreated and restarted
Not changed
- Blockchain database
/db/ - Wallet data
/wallet/ - Your
validatorKey.pem - Logs, ports, redundancy setting, display names
Each node is stopped and started again during the update. Plan updates of validators accordingly.
3 · Manage nodes
Choose [3] for the daily work. The screen shows a status table that refreshes whenever you return to the menu:
Node Status Port Version Uptime Nonce Sync ───────────────────────────────────────────────────────────────────────────── node1 Running 8080 v1.7.14 5d 12h 33951786 Synced node2 Running 8081 v1.7.14 5d 12h 33951786 Synced node3 Stopped 8082 v1.7.14 -- -- -- node4 Running 8083 v1.7.14 2h 34m 33951785 Syncing Options: [1] Start Nodes [5] Refresh Status [2] Stop Nodes [6] Fix Node Permissions [3] Restart Nodes [7] Extract BLS Public Keys [4] View Node Logs [b] Back to Main Menu
Illustrative values. Nonce and sync state come from the REST API of each running node.
| Option | What it does |
|---|---|
| [1] Start, [2] Stop, [3] Restart | Shows a numbered list of your nodes. Pick one node by its number, or a for all nodes, or b to go back. |
| [4] View Node Logs | Pick a node and watch its log live (docker logs -f --tail 100). Leave with Ctrl+C. |
| [5] Refresh Status | Reloads the status table. |
| [6] Fix Node Permissions | Checks and repairs the owner of the node folders (999:999) for all nodes. |
| [7] Extract BLS Public Keys | Shows the BLS public key of every node (see below). |
BLS keys
Every validator node needs a validatorKey.pem in its config folder. The script reads the BLS public key from this file.
You need it when you register your validator on the Klever blockchain.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Node: node1 Path: /opt/node1/config/validatorKey.pem BLS Public Key: a1b2c3d4e5f6... (your key is shown here) Keys found: 1
- Normal validators: let the script generate the key when you create the node, or place your own
validatorKey.pemin/opt/nodeX/config/and rundocker restart klever-nodeX. - Fallback nodes: use the same
validatorKey.pemas your main validator, copy it into the fallback node's config folder and restart the container. - A missing or unreadable key file is reported as not found or could not extract.
Good to know
Permissions
All node folders must belong to user 999:999. The script sets this during creation and updates, and option 3 → [6] repairs it.
/opt/nodeX/config/ -> 999:999 /opt/nodeX/db/ -> 999:999 /opt/nodeX/logs/ -> 999:999 /opt/nodeX/wallet/ -> 999:999
Ports
The first node gets port 8080, every further node the next free port. The script checks that the port is not in use; if it is, that node is skipped.
Directory protection
The script never overwrites an existing node. If /opt/node1/ or the container klever-node1 already exists, that node number is skipped.
Use a different number, or back up and remove the old folder first. If creating a node fails halfway, the half-finished folder is removed again.
Troubleshooting
"This script must be run as root or with sudo"
sudo ./klever_node_manager.sh
A node will not start
- Look at the log:
docker logs klever-node1
- Repair the permissions: option 3 → [6] Fix Node Permissions.
- Check that the key file is there:
ls -la /opt/node1/config/
The port is already in use
The script notices this and skips the node. To find out what is using the port:
sudo ss -tuln | grep :8080
Then stop the other service or create the node with a different number.
The tag list could not be loaded
If Docker Hub cannot be reached, the script says so and asks for the tag directly. Press Enter for latest or type a tag.
Useful Docker commands
# Running containers docker ps # All containers, including stopped ones docker ps -a # Stop, start or restart a node docker stop klever-node1 docker start klever-node1 docker restart klever-node1 # Live log, last 100 lines docker logs -f --tail 100 klever-node1 # Node folder and config files ls -la /opt/node1/ ls -la /opt/node1/config/
Function overview
| Function | Description |
|---|---|
| Create Nodes | Creates new validator nodes with automatic setup, optional key generation and smart port assignment. |
| Update Nodes | Updates configuration and Docker image of all nodes while preserving the blockchain data and your settings. |
| Start / Stop / Restart | Starts, stops or restarts one node or all nodes. |
| View Logs | Live log viewer for debugging and monitoring. |
| Status Overview | All nodes with status, port, version, uptime, nonce and sync state. |
| Fix Permissions | Repairs the folder permissions (999:999) of all nodes. |
| Extract BLS Keys | Shows the BLS public key of every node, needed for the validator registration. |
More than one server? The Node Hub gives you one web dashboard for all your servers, with monitoring and alerts.
The Node Manager is a community tool by CryptoJaeger and not an official Klever product. Questions and feedback: forum.klever.org/t/klever-node-management-suite.