This is a full guide how to Run a Node and setup a “Klever” validator

Klever nodes run inside a docker container, check the System Requirements section to download Klever Toolchain first.
Create statics directory
Create a folder where all the data will be stored:
mkdir -p $(pwd)/node/config $(pwd)/node/db $(pwd)/node/logs
Network genesis config
Download latest config file (http://) and extract into your config directory
curl -k https://backup.testnet.klever.finance/config.testnet.100007.tar.gz \
| tar -xz -C ./node
Create your validator BLS Key
Execute a command inside the docker container to create wallets for validators. The data is then forwarded to the directory created previously.
docker run -it - -rm -v $(pwd)/node/config:/opt/klever-blockchain \
- -user “$(id -u):$(id -g)” \
- -entrypoint=’’ kleverapp/klever-go-testnet:latest keygenerator
Download and extract data backup for fast spin
Download a backup in case it exists. Every time the network is reset, files change as well. So, this backup is necessary.
curl -k https://backup.testnet.klever.finance/kleverchain.latest.tar.gz \
| tar -xz -C ./node
Run your node
The command for running a node comes with a few settings: it includes mappings for cryptographic keys, data directories and logs, as well as network ports, the application that will run when the docker image is executed and the file of node validators signature.
docker run -it - -rm \
- -user “$(id -u):$(id -g)” \
- -name klever-node \
-v $(pwd)/node/config:/opt/klever-blockchain/config/node \
-v $(pwd)/node/db:/opt/klever-blockchain/db \
-v $(pwd)/node/logs:/opt/klever-blockchain/logs \
- -network=host \
- -entrypoint=/usr/local/bin/validator \
kleverapp/klever-go-testnet:latest \
‘ - -log-save’ ‘ - -rest-api-interface=0.0.0.0:8080’
The table below shows what each part of the command is supposed to do.
Command: -v $(pwd)/config:/opt/klever-blockchain/config/node
Function: Import genesis config and the generated .pem file (BLS Key).
Command: -v $(pwd)/node/db:/opt/klever-blockchain/db
Function: Select the destination DB folder.
Command: -v $(pwd)/klv/logs:/opt/klever-blockchain/logs
Function: Save log files and set the log folders
If one wants to monitor the node using log files, the flag --use-log-view
must be passed. Otherwise, the standard view is a visual interface as seen below.
When you are done setting up and running your node, you are expected to see information about your node, the blockchain itself, as well as data from your own computer, just like the example below:

Run node in the background
When running in the background, add parameter --use-log-view
and replace --rm
for -d
docker run -it -d \
- -user “$(id -u):$(id -g)” \
- -name klever-node \
-v $(pwd)/node/config:/opt/klever-blockchain/config/node \
-v $(pwd)/node/db:/opt/klever-blockchain/db \
-v $(pwd)/node/logs:/opt/klever-blockchain/logs \
- -network=host \
- -entrypoint=/usr/local/bin/validator \
kleverapp/klever-go-testnet:latest \
‘ - -log-save’ ‘ - -use-log-view’ ‘ - -rest-api-interface=0.0.0.0:8080’
If you are running your node in the background, you can either verify logs in ./node/logs
folder or use the docker command:
docker logs -f — tail 5 klever-node
How to stop a node
Stop a node with the following command:
docker stop klever-node
How to backup DB folder
First, you need to stop the node:
docker stop klever-node
Then compress the DB folder:
tar -czvf filename.tar.gz $(pwd)/node/db
How to restart a node
Restart the node:
docker restart klever-node
How to Upgrade node (docker image version)
First, stop the node:
docker stop klever-node
Upgrade image:
docker pull kleverapp/klever-go-testnet:latest
Then you can recreate the node with a new image. Don’t forget to delete the container if running in the background:
docker rm klever-node
How to send using CLI
To use your wallet with Klever Toolchain, you will need to map your wallet private key (the .pem file created in the session How to create a wallet) into the toolchain by adding:
-v $(pwd)/wallet:/opt/klever-blockchain
Or if you are using a self-hosted node, use --network=host
to access the local node API. You can also use a public node by adding an environment variable into the toolchain:
-e KLEVR_NODE=
https://node.testnet.klever.finance
Send tokens with the following code:
docker run -it - -rm - -user “$(id -u):$(id -g)” \
-v $(pwd)/wallet:/opt/klever-blockchain \
- -network=host \
- -entrypoint=/usr/local/bin/operator \
kleverapp/klever-go-testnet:latest \
- -key-file=./walletKey.pem \
send klv1h7vx629mwuv4pnecn0k9clxp9rt7rquat3kvydgu8npt20e0ntjq3jhd40 137
On the last line, after the “send” command (send klv1h7vx629mwuv4pnecn0k9clxp9rt7rquat3kvydgu8npt20e0ntjq3jhd40 137
), the code represents the following scheme: [TO] [AMOUNT] [KDA_ID].
[TO]
is the address to whom the tokens are being sent.
[AMOUNT]
is how much is being sent.
[KDA_ID]
is the Asset ID.
If no KDA_ID is passed, as in the example above, the default KDA is KLV.
Here is another example, sending KFI:
docker run -it - -rm - -user “$(id -u):$(id -g)” \
-v $(pwd)/wallet:/opt/klever-blockchain \
- -network=host \
- -entrypoint=/usr/local/bin/operator \
kleverapp/klever-go-testnet:latest \
- -key-file=./walletKey.pem \
send klv1h7vx629mwuv4pnecn0k9clxp9rt7rquat3kvydgu8npt20e0ntjq3jhd40 137 KFI
Become a validator
To become a Klever Validator Node in the testnet, you must first register. Please check https://klever.finance/klever-blockchain-validators-program/
Request faucet
For testnet validator purposes, the faucet to register and self-stake will be sent after having registered to the address provided in the application. Once we review your application, 1.5M TKLV (on testnet) will be sent to the address provided. The remaining stake will be provided by the Klever team once the validator node is up and in sync.
How to register a validator using CLI
Registering a validator is done in this way:
docker run -it - -rm - -user “$(id -u):$(id -g)” \
-v $(pwd)/wallet:/opt/klever-blockchain \
- -network=host \
- -entrypoint=/usr/local/bin/operator \
kleverapp/klever-go-testnet:latest \
- -key-file=./walletKey.pem \
create-validator \
klv1h7vx629mwuv4pnecn0k9clxp9rt7rquat3kvydgu8npt20e0ntjq3jhd40 \
ce3aa977d1028e2a91730259c4b66cd862b77c63253fa12932012288108a0b7f110da4a2e3e1c15cc94802a79afef418f9a724a1ebe1423c0fa897bae669f1735b082ff3f19b3e00acc76a2bb0f31b1856e3e55952655386fbedad9c55322b81 \10 true 10000000 MyNodeName
The command follows this pattern: [BLS_KEY] [COMMISSION] [MAX_DELEGATION][LOGO][OWNER_ADDR][REWARD_ADDR][NAME]
where:
[BLS_KEY]
is the owner's BLS key.
[COMMISSION]
is the commission in percentage.
[MAX_DELEGATION]
informs how much the validator can delegate.
[LOGO]
is the URL for the validator's image.
[OWNER_ADDR]
is the owner's address.
[REWARD_ADDR]
is the address to whom the rewards will be given.
If no [REWARD_ADDR]
is passed, the [OWNER_ADDR]
becomes the reward address.
[NAME] represents the Node name.
- Make sure you have entered the correct BLS pub key
- Same as for send from CLI, one can also use public node to send the transaction
How to freeze KLV for staking
In order to freeze KLV, you should type the following code:
docker run -it - -rm - -user “$(id -u):$(id -g)” \
-v $(pwd)/wallet:/opt/klever-blockchain \
- -network=host \
- -entrypoint=/usr/local/bin/operator \
kleverapp/klever-go-testnet:latest \
- -key-file=./walletKey.pem freeze 1500000
After the “freeze” instruction, there is this structure: [AMOUNT] [KDA-ID].
[AMOUNT] for how much is being frozen.
[KDA-ID] is the Asset ID.
The minimum amount allowed to stake KLV is 1000 KLV.
How to Delegate frozen KLV to node
Delegate to an address [TO], pointing to the bucket [BUCKET_ID] where the frozen KLV is located.
docker run -it - -rm - -user “$(id -u):$(id -g)” \
-v $(pwd)/wallet:/opt/klever-blockchain \
- -network=host \
- -entrypoint=/usr/local/bin/operator \
kleverapp/klever-go-testnet:latest \
- -key-file=./walletKey.pem \
delegate \
klv1h7vx629mwuv4pnecn0k9clxp9rt7rquat3kvydgu8npt20e0ntjq3jhd40 \
9960d5d4eab9dfc067acebb6f764ce61280b573c0d1daafd1c2d3e67defa8944
It’s important to know that there’s a minimum self-staking amount for the validator. The structure for delegate command is:
[DELEGATE TO ADDRESS] [BUCKET ID].
[DELEGATE TO ADDRESS]
is the address you want to delegate the frozen bucket power (in this case your validator address)
[BUCKET ID]
is the bucket hash, which can be found in the frozen TX ID or in Klever testnet explorer.
WIth the operator CLI, you can check the bucket ID with the command tx-by-id
followed by the hash of the freeze transaction:
docker run -it- -rm- -user “$(id -u):$(id -g)” \
-v $(pwd)/wallet:/opt/klever-blockchain \
- -network=host \
- -entrypoint=/usr/local/bin/operator \
kleverapp/klever-go-testnet:latest \
- -key-file=./walletKey.pem \
tx-by-id \
45db3a993b64323df2d9841c0ac9a78c8a1760804557a65ca866163e64138bbf
Bucket ID can be found in the TX Receipt.
Edit the validator settings (change node BLS Pubkey and commission)
You can change the validator configuration using this command:
docker run -it - -rm - -user “$(id -u):$(id -g)” \
-v $(pwd)/wallet:/opt/klever-blockchain \
- -network=host \
- -entrypoint=/usr/local/bin/operator \
kleverapp/klever-go-testnet:latest \
- -key-file=./walletKey.pem \
validator-config \
ce3aa977d1028e2a91730259c4b66cd862b77c63253fa12932012288108a0b7f110da4a2e3e1c15cc94802a79afef418f9a724a1ebe1423c0fa897bae669f1735b082ff3f19b3e00acc76a2bb0f31b1856e3e55952655386fbedad9c55322b81 \10 true 10000000000000 MyNodeName
Here’s the structure: [BLS_KEY] [COMMISSION] [MAX_DELEGATION] [LOGO] [REWARD_ADDR] [NAME], where:
[BLS_KEY]
is the BLS key
[COMMISSION]
is the commission in percentage
[MAX_DELEGATION]
informs how much the validator can delegate
[LOGO] is the URL for the validator’s image.
[REWARD_ADDR] is the address to whom the rewards are given.
[NAME] represents the Node name.
About a KleverChain technology
https://docs.klever.finance/klever-blockchain/about-our-technology