This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Run first node

Steps to set up the first Kore node

To launch a kore node, you must run the kore-http binary, located in the client folder of the repository. To use your Docker image, you must go to the dockerhub page.

If we do not have the image or do not have the latest version, download it with:

docker pull koreadmin/kore-http:0.5-sqlite

We can execute it by launching:

docker run koreadmin/kore-http:0.5-sqlite

However, this will give us an error, since we must specify certain aspects of the configuration.

We can generate the cryptographic key ourselves or let the node generate it. In this tutorial the node will take care of that task.

  • The first thing we must add to the configuration is the private key. We can generate a valid one using kore-tools, which is located in the same repository as the client in the kore-tools directory. Specifically, its keygen binary, which will create the necessary cryptographic material for the node.
  • Once we have the image we must generate a configuration file indicating the following: . listen_addresses Address where the node will listen to communicate with other nodes. . boot_nodes a vector of known nodes, as it is the first node we will leave it empty.
// config.json
{
    "kore": {
      "network": {
          "listen_addresses": ["/ip4/0.0.0.0/tcp/50000"],
          "routing": {
            "boot_nodes": [""]
          }
      }
    }
  }

To raise the node we must indicate from which port of our machine we can access the API, as well as the port where the node will listen. Finally, it is important to indicate the configuration file.

docker run -p 3000:3000 -p 50000:50000 -e KORE_PASSWORD=polopo -e KORE_FILE_PATH=./config.json -v ./config.json:/config.json koreadmin/kore-http:0.5-sqlite