Set up a Node v5 on the Mainnet.

The OriginTrail Decentralized Network (ODN) is a permissionless network supporting a Decentralized Knowledge Graph. It is designed for scalability and enables anyone to run a node on the network. You can find all the resources and instructions for the node setup on this page. This process might take a while so please take some time to digest all the content below. If in need of help, do not hesitate to ask on the designated Discord chat.

For first time node runners, we recommend setting up a node on testnet first in order to get familiar with the process. By setting up an OriginTrail node you agree to the terms and conditions of using the ODN as posted here.

Node operational modes

The OriginTrail nodes support two operational modes:

  • Standard mode on a single server instance
  • High-availability mode running on multiple server instances for increased resilience (preferred for enterprise implementations)

The following instructions are focused on the standard (single server) mode. For high-availability mode instructions please visit this link.

1

If you are updating your node from v4 to v5

For node holders already operating v4 OT nodes and willing to upgrade to v5 - Multichain ODN, please follow the instructions here.


2

If you are installing a fresh v5 OT-node

Pre-requirements

Please note that all of the following requirements shall be met in order for You to be able to set up a node on the OriginTrail Mainnet.



1

Hardware Requirements

The recommended minimum specifications are 2.2 GHz CPU, 2GB RAM with at least 20GB storage space.

2

Creating wallets

To run an OriginTrail node, you will need to equip it with cryptographic wallets for each blockchain you want your node to run on (at this point in time your node can run on Ethereum and xDai blockchains). To set up the node, you need two Ethereum wallets (xDai blockchain uses the same type of wallet as Ethereum):

  • Operational wallet: this wallet handles native blockchain tokens (xDai tokens for xDai blockchain, ETH for Ethereum etc.) and is used by your node for operations in the OriginTrail consensus layer (signing, sending transactions etc). You will need to provide the private key for this wallet in your node config file. The operational wallet private key is not in any way sent to the OriginTrail team or stored in any other location, other than your configuration file and locations you decide to keep it. Please, be aware that you are required to keep all your keys and node safe, and that the OriginTrail team does not have any ability to help you recover the private key if lost
  • Management wallet: this wallet is what you will use to manage your node’s funds and identity operations. The node does not require your management wallet private key (it requires only the public key). You should never share your private keys with anyone. We recommend using a different management wallet than your operational wallet, ideally a highly secure hardware wallet.

Tools that can be used to generate Ethereum wallets include: MetaMask, MyEtherWallet, Hardware wallets, and others. Feel free to use whatever you prefer, though note that you will need access to your operational wallet's private key when setting up your node.
You can find more detailed explanation on how wallets are used here.

3

Acquiring tokens & setting up RPC endpoints

In order for an OT node to be able to communicate with blockchains, it must be provided access using JSON RPC protocol and a RPC compatible server. Before you set up your node, you will need to obtain RPC URLs to use for your node for each blockchain. To find out how to do this, please check the following links:

When your node is started, it will need TRAC tokens and native blockchain tokes (initial funds) deposited on the operational wallet of the blockchain you wish to use. Based on the blockchains you decided to use you will need the following funds:

  • For operating your OT node on the xDai blockchain

    Your operational wallet will require at least 3000 TRAC on xDai blockchain and at least 0.01 xDai prior to setting up the node. 3000 TRAC is the required amount for your node to have staked at all times for each blockchain implementation. If you wish to participate in offers, you should supply a higher amount of TRAC tokens.

    • You can find out how to acquire xDai here
    • If you have TRAC on Ethereum and wish to transfer it to xDai, you can use this guide to do so.
  • For operating your OT node on the Ethereum blockchain

    Your operational wallet will require at least 3000 TRAC tokens on Ethereum blockchain and at least 0.05 Ether prior to setting up the node. 3000 TRAC is the required amount for your node to have staked at all times for each blockchain implementation. Iif you wish to participate in offers, you should supply a higher amount of TRAC tokens.

  • Recommended: For operating a dual-chain OT node on both xDai and Ethereum blockchains

    To run a node on both blockchains you will need to acquire funds specified in both of the previous sections. If you decide to do so, you can use the same wallet for both blockchains as they are compatible. In this way your node will be able to participate in both blockchains in the consensus layer and thus qualify for the data holding job within each of the chains’ job markets.

The easiest way to initially deposit the TRAC tokens during node setup is to send the amount of tokens you wish to make available to your node to the operational wallet and setting up the configuration file to contain the “initial_deposit_amount” variable with the desired number of tokens (with 18 decimals). For example, to initially deposit 5000 TRAC during node setup, input the following line in the main section of your config file

“initial_deposit_amount”: “5000000000000000000000”

(more info in the section “Configuring your node” below)

4

Public IP and open communication

It is required to have a public IP address, domain name, or open network communication with the internet. If your server is behind a NAT service, please manually set up port forwarding to all the node’s ports.

5

Docker Installed

The host machine needs to have Docker installed to be able to run the Docker commands specified below. You can find instructions on how to install Docker here:

It is strongly suggested to use the latest official version.

6

Opening communication ports

By default the ot-node Docker container will use 8900, 5278, and 3000 ports. These can be mapped differently in Docker container initialization command. Make sure they are not blocked by firewalls and that they are open to the public.

7

(Optional) Setting up TLS

In order to support end-to-end encryption, your server instance will need a configured TLS certificate inside the node docker instance. This will require a qualified domain name for your node. We strongly recommend setting up TLS encryption for all enterprise users and users willing to participate in the knowledge economic activity. For regular DKG data holder operations, TLS is not mandatory as these nodes are utilized for public data sharing within the OriginTrail Public Decentralized Knowledge Graph.

Instructions on how to setup TLS encryption can be found here.

Configuring the node

To properly configure the OT node, you will need to create a config file in JSON format and provide some basic information about how the node should work. This file will then be passed to the Docker container.


Create the configuration file .origintrail_noderc in your favorite text editor. The bare minimum of settings that needs to be provided is a valid blockchain implementation and domain address.


Create the .origintrail_noderc file with the following content:


                            
{
	"network": {
    	"hostname": "your external IP or domain name here",
    	"remoteWhitelist": [ "IP or host of the service that will be interacting with your node, e.g. SAP server, a Dapp accessing the DKG, data pipeline service etc ", "127.0.0.1"]
	},
	"initial_deposit_amount": "your initial deposit amount in TRAC with 18 decimals, 1 TRAC = 1000000000000000000 ",
	"blockchain": {
    	"implementations": [
                {
                    "blockchain_title": "xDai",
                    "network_id": "xdai:mainnet",
                    "node_wallet": "your xdai wallet address here",
                    "node_private_key": "your xdai wallet's private key here",
                    "management_wallet": "your ethereum management wallet public key here"
                },
                {
                    "blockchain_title": "Ethereum",
                    "network_id": "ethr:mainnet",
                    "rpc_server_url": "url to your RPC server i.e. Infura or own Geth",
                    "node_wallet": "your ethereum wallet address here",
                    "node_private_key": "your ethereum wallet's private key here",
                    "management_wallet": "your ethereum management wallet public key here"
                }
    	    ]
      }
}

                            
                        
  • node_wallet and node_private_key - Node operational Ethereum wallet address and its private key.
  • management_wallet - Node Ethereum/xDai management wallet address.
  • hostname is the public network address or hostname that will be used in P2P communication with other nodes for node’s self identification.
  • remoteWhitelist - list of IPs or hosts of the machines (“host.domain.com”) that are allowed to communicate with REST API.
  • rpc_server_url - an URL to RPC host server, usually Infura or an own-hosted Geth server. For more check our documentation.

You can find more detailed wallets explanation here.



(DISCLAIMER: Your private key is needed for the node operational wallet to be able to sign transactions to the blockchain. The node management wallet takes care of your rewards and its private key is not stored on the node. The operational wallet private key is not in any way sent to the OriginTrail team or stored in any other location, other than this config file and locations you decide to keep it. Please, be aware that you are required to keep all your keys and node safe, and that the OriginTrail team does not have any ability to help you recover the private key if lost).

Running a Docker container

If you have completed the previous steps, everything is prepared for Docker to create and run the OT Node container. Run the following command to start the node installation:

Latest version (v5 - Multi-chain ODN)

sudo docker create -i --log-driver json-file --log-opt max-size=1g --name=otnode -p 8900:8900 -p 5278:5278 -p 3000:3000 -v ~/.origintrail_noderc:/ot-node/.origintrail_noderc origintrail/ot-node:release_mainnet

NOTE: In this example, our configuration file .origintrail_noderc is placed into the home folder of the current user (eg. /home/ubuntu).

The process will download and install the docker container and once it is complete, you can move to the next step.

Starting your OT node

You can start your node in the following two ways:

As a background process (recommended):

To start the node run the following command in your terminal

docker start otnode

This command will start your node as a background process. You will not see any logs from the node immediately, the docker will only display the name of the container (otnode) once the container is started.

You can check if your node is operational by running the following command to check your node logs:

docker logs otnode -f

The initial node setup might take up to 10 minutes after which your node should display the following log line:

OT Node started

Once the node displays the log line above it is fully operational and ready to accept data holding offers. You can exit the logs with ctrl+c and your node will stay running in the background.

In interactive mode

To start the node run the following command in your terminal

docker start -i otnode

This command will start your node in interactive mode and you will see the node’s logs in your terminal.

Caution: this command will not run your node as a background process, which means your node will stop if you close your Terminal/Console.



Checking your OT node status

To check if your node is running in Terminal, run the following command: docker ps node-check-img

Stopping OT node

You can stop your node in the following two ways:

If you started your node with the docker start otnode command and you wish to stop it from running, use the following command in your terminal: docker stop otnode

If you started your node by using the docker start -i otnode command, you can stop it either by closing the Terminal or simply by pressing the ctrl + c.


Note: Stopping your node might incur litigation issues if your node is checked for data it is supposed to be holding (as a data-holder (DH) node). This can cause your node to lose funds.

Backing up your node

The OT-Node comes with tools enabling backup and restore. Detailed instructions on how to perform backup/restore can be found in the official documentation.


Manually Install Mainnet Node via Terminal

If you prefer to manually install each piece of software needed to run an ODN node, you can find detailed instructions in our technical documentation.



Resources