How to set up a validator node on CENNZnet

Translations of this article can be found here:
This guide will cover how to set up a Validator node on CENNZnet. Specifically how to set up a Validator node in a non-programmatic way which can be done with docker or system admin skills.
There are two ways to set up a validator node on CENNZnet:
Using the CENNZnet API
Using the CENNZnet portal (https://cennznet.io/)
The API method requires JavaScript programming skills. It allows you to automate the process, so you can set up multiple validators more easily. To set up a validator programmatically using CENNZnet’s API, please refer to our technical documentation found on the Wiki here.
The CENNZnet portal method can be done by anyone regardless of coding skill and is quicker to complete.
Requirements:
Familiar with using the command line
Docker or system admin experiences
Setting up a validator node using the CENNZnet.io portal
You can follow a visual guide to the below steps here:
Step 1: Start a validator node
There are two ways to start a validator node:
Start a fresh node: this is a faster process, but you may need to wait a couple of days for it to finish synchronisation, depending on the network conditions.
Start a node from a snapshot: this requires downloading a snapshot (a complete copy of the state of a node) which is currently around 50G. Once you have downloaded the snapshot, you can start a node that’s already synchronised.
Starting a fresh node
Run the following command in your terminal to start a node as a validator and join the CENNZnet Mainnet (Azalea).
# Edit this command before running it:
# 1. Replace “” with the latest version number, for example, “1.4.0”. The release number can be found here.
# 2. Replace “” with a name you’d like to call your node
# 3. Run it and inspect it from Docker dashboard
# Note: the -d option makes the docker container run in detached mode, which means it'll continue running even if you close terminal.
# You can use --it if you'd rather keep the terminal window open and see the output there.
# Please don't shut down the validator node without performing a "chill" action, to avoid penalties.
# Warning: The following command allows for setting session key. This exposes a security risk.
# The RPC methods should be constrained to use on localhost only
# Protect your PRC port with network security rules and the firewall
docker run -p 9944:9944 -p 9933:9933 -d --restart=always \
cennznet/cennznet: \
--chain=/cennznet/genesis/azalea.raw.json \
--validator \
--name= \
--telemetry-url 'ws://cennznet-telemetry.centrality.me:8000/submit 0' \
--rpc-methods=Unsafe \
--ws-external \
--rpc-external \
--rpc-cors=https://cennznet.io
This command won’t create blocks or participate in validating until you have completed all of the steps outlined in this document.
Starting a node from a snapshot
Download the latest archive of validator nodes from here
Unzip the archive
Edit the following command and run it
# Note: the -d option makes the docker container run in detached mode, which means it'll continue running even if you close terminal.
# You can use --it if you'd rather keep the terminal window open and see the output there.
# Please don't shut down the validator node without performing a "chill" action, to avoid penalties.
# Edit this command before running it:
# Replace “” with the latest version number, for example, “1.4.0”. The release number can be found here.
# Replace “” with a name you’d like to call your node
# Replace the “” in the following command with the path to where you’ve unzipped the archive, and run the command in your terminal.
docker run -p 9944:9944 -p 9933:9933 -d --restart=always \
-v :/mnt/cennznet \
cennznet/cennznet: --validator \
--chain=/cennznet/genesis/azalea.raw.json \
--base-path /mnt/cennznet --unsafe-ws-external \
--unsafe-rpc-external \
--rpc-external \
--rpc-cors=https://cennznet.io --rpc-methods=Unsafe \
--telemetry-url 'ws://cennznet-telemetry.centrality.me:8000/submit 0' \
--name
Step 2: Wait for the node to synchronise
The node finishes synchronising when the best block number is the same or close to the target block number. Example output from the node:
INFO ⚙️ Syncing 21.2 bps, target=#1140132 (1 peers), best: #532405 (0xfad8…07ea), finalized #531968 (0x1a24…d249), ⬇ 7.3kiB/s ⬆ 60 B/s
Step 3: Place funds at stake
To become a Validator you need to lock away the minimum threshold stake of 10,000 CENNZ. This is done using a bonding transaction which places an amount of CENNZ into the staking system.
During the bonding transaction, we can also set a controller account and specify the account where you wish to receive staking rewards.

Go to CENNZnet.io
Navigate to Advanced->Extrinsics
In the first row, select the stash account: the account that holds the CENNZ you’d like to stake.
In the second row, select “Staking” and “bond”
In the “controller” field, select a controller account: the account that manages staking for your validator. The controller can be the same as the stash account, but it’s recommended to use a separate controller account as a security best practice.
Set the amount of CENNZ to stake
In the “pay” field, select the account where you would like to receive the staking reward. By default, the staking reward goes back to the stash account. You can choose to replace the default with a different account here.
For more information about stash vs controller account, please refer to our technical document on our Github Wiki here.
Step 4: Claim session keys
Session keys prove that your controller account represents the node that you are running, securely connecting your two accounts for the process of validating.
To claim your session keys you need to link your running validator node with a controller account which will act on behalf of the stash account. The controller account will make a transaction to claim some session keys on behalf of the stash.
Session keys may be rotated using this process at any time.
There are 2 steps in claiming session keys:
Generate a new session key
Set session keys
Step 4.1 Generate a new session key
- Run the following command in the terminal
curl \
-H "Content-Type: application/json" \
-d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params": []}' localhost:9933
- Copy the value of “result” to be used in the next step. This is your new session key. Please make sure you copy the entire session key. You may need to zoom out on the page to copy the whole string.

Go to CENNZnet.io
Navigate to Advanced->Extrinsics
In the first row, select the controller account, which you selected in Step 3
Select “session” and “setKeys”
Set the keys to the value obtained from the last step
Leave the “proof” as default
Click Submit Transaction
Step 5: Signal intent to validate
⚠️ Please note: before starting this action make sure the validator node has synchronised and has it’s session keys configured. Failure to do so can lead to slashes, as your validator node will not be able to complete its duties on the network.
Note: You cannot signal your intent to validate when the election window is closed. Normally the election window is closed in the last 10 minutes of an era. Please wait and try again in the next staking era if you see the error “staking.CallNotAllowed”.
When signalling your intent to validate, the controller account will send a transaction to join the validator candidate pool. This allows your validator to be nominated for the next staking era. To do this:

Go to CENNZnet.io
Navigate to Advanced->Extrinsics
In the first row, select the controller account, which you selected in Step 3
In the second row, select “Staking” and “validate”
In the “commission” field, set the amount of commission, which is the amount of reward your validator will take. The rest of the rewards will be shared between your nominators. This amount is expressed as parts-per-billion and converted to a hexadecimal number.
You can calculate commission value in the Javascript page:
const commission = 20; // Percent
const perbill = 1_000_000_000; // Base
const commissionPerBill = (commission/100)*perbill;
const commissionEncoded = api.registry.createType("Perbill", commissionPerBill);
console.log(`For ${commissionEncoded.toHuman()} commission`);
console.log(`Enter ${commissionEncoded.toHex()}`);

Congratulations! You did it 🎉 Now you have a working validator node on the CENNZnet.
How to stop validating
To stop validating you will need to call the Chill method, which will stop your validator from being elected after the current staking era. When you have successfully chilled your validator node then you can safely take it offline and unstake if you desire.
To call the chill method:
Go to CENNZnet.io
Navigate to Staking->My Stake
Find the entry for your validator and click the cog wheel, this opens the Manage stake window
In the Manage stake window, select the Chill action


Need help?
You can ask questions and get fast support in our Validators channel on the CENNZnet Discord channel here.
You can also learn more about being a validator on CENNZnet vai our validator FAQ here.