Run a baker node on Windows#

A baker node is a node that participates in the network by baking (creating) new blocks that are added to the chain. Each baker has a set of cryptographic keys called baker keys that the node needs to bake blocks. You generate the baker keys in the Desktop Wallet when you add a baker account. The baker node will start baking two epochs after the transaction has been approved.

Prerequisites#

Configure a baker node on Windows#

  1. Create baker keys in Concordium Wallet for Mobile, Concordium Legacy Wallet, Desktop Wallet or Concordium Client and associate them with an account either on mainnet or testnet.

    Note

    The baker credentials file must be accessible by the SYSTEM user and can’t be encrypted.

    Warning

    Do not edit the name or contents of the baker-credentials.json file.

  2. Once you’ve created the baker account and exported the baker credentials, you have to change the configuration file for the Concordium Node Service. Open Configure Concordium Node Service from the Start menu, and select Yes when you see the message Do you want to allow this app to make changes to your device?. The configuration file opens.

  3. Add the following in the [node.mainnet] section if the credentials are for mainnet, or the [node.testnet] section if they are for testnet. Make sure that you add the credentials to the network the account was created on.

    baker_credentials = 'C:\path\to\baker-credentials.json'
    

    where you replace C:\path\to\baker-credentials.json with the full path to the baker credentials file.

  4. Save the file.

  5. Stop and restart the node runner service using the Stop Concordium Service Node and the Start Concordium Service Node shortcuts. Don’t use End task in the Task Manager as it might cause errors.

View the node log#

You can find the node logs here:

  • Mainnet: C:\ProgramData\Concordium\Node Runner\mainnet\logs

  • Testnet: C:\ProgramData\Concordium\Node Runner\testnet\logs

Baker node troubleshooting#

If a node fails to start, for example because of a configuration issue, or stops unexpectedly, there will be an Error-level event in the Event Viewer that explains why. The following are common error scenarios and possible solutions.

  • The node doesn’t restart after you’ve set the credentials in the configuration file. This error can occur when the specified location of the credentials file is incorrect. In the Event Viewer an error such as the following might appear. When this happens, change the path in the configuration file.

    ../../_images/Node-setup-win-10.png
  • The node doesn’t start baking, and in the log file you see the message Baker keys are incorrect repeatedly. It takes 1-2 hours after baker keys have been added to an account for the keys to be eligible for baking. If this problem persists beyond two hours, then the keys likely are incorrect. Double check that you are not using keys from testnet on mainnet, or vice-versa.

For more information on the logs, see Run a node on Windows.

Other options for running a baker node#

If you’re not using Windows, you can run a node by using Docker, Ubuntu, or macOS.