Set up a Node on the Mainnet.

The OriginTrail Decentralized Network was designed for scalability and enables anyone to run a node. You can find all the resources and instructions for the node setup on the mainnet here.

Pre-requirements

1

Hardware Recommendation

The recommended minimum specifications are 1CPU, and 2GB RAM with at least 10GB of storage space.

2

Ethereum Wallet

Before setting up a node, you must own a valid Ethereum wallet with at least 1000 TRAC tokens and at least 0.05 Ethers. These funds enable your node to connect to the network and register its profile. For normal node activity, you should have a bit more funds in ETH so that your node can pay for transactions.

3

Public IP or Open Communication

A public IP address, domain name, or open network communication with the Internet is required. If behind NAT, please manually setup port forwarding to all the node’s ports.

4

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.

5

Open Ports

By default Docker container will use 8900, 5278 and 3000 ports. These can be mapped differently in Docker container initialization command. Make sure they’re not blocked by firewall and open to the public. Please note: port 8900 is used for REST access which is not available until OT node is fully started. This can be concluded after following log message is displayed.

Configuring the node

To properly configure the 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.


Let’s create the file .origintrail_noderc and store all the information about what kind of configuration we want to set up. The bare minimum of settings that needs to be provided is a valid Ethereum wallet and public address or domain name.


We create the .origintrail_noderc file with the following content:


{

"node_wallet": "your wallet address here",

"node_private_key": "your wallet's private key here",

"management_wallet": "your management wallet public key here",

"network": {

"hostname": "your external IP or domain name here",

"remoteWhitelist": [ "IP or host of the machine that is requesting the import", "127.0.0.1"]

},

"blockchain": {

"rpc_server_url": "url to your RPC server i.e. Infura or own Geth"

}

}

  • node_wallet and node_private_key - Node operational Ethereum wallet address and its private key.
  • management_wallet - Node Ethereum 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 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

Latest version (v4 - Freedom-Gemini)

sudo docker run -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 quay.io/origintrail/otnode:release_mainnet

NOTE: in this example, our configuration file .origintrail_noderc is placed in to the home folder of the current user (ie. /home/ubuntu).

OT Node Status

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

Starting OT Node

1

docker start otnode

This command will start your node as a background process.

2

docker start -i otnode

This command will start your node in interactive mode and you will see the node’s process written in the terminal, but this command will not run your node as a background process, which means your node will stop if you close your Terminal/Console.

Stopping OT Node

1

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

This command will start your node as a background process.

2

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.

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: OriginTrail Documentation

How to Update Your Node on Mainnet from v2.0.59

1

The Easiest Way

Wait for your node to auto-update. After that, just restart it.

Prerequisites: Auto-update is enabled and the node is running in a Docker container.
Step 1
Your node will automatically update once it detects the new version of the ODN is available. It can take up to six hours for the node to detect the update. After six hours or so, log in to the machine that is hosting your node and check the node logs by running the command: docker logs otnode If the update is successful, the node will restart itself and you should see this message in the logs to verify the update: the Version check: local version 4.0.0, remote version: 4.0.0.
Step 2
After verifying the version is at 4.0.0, restart the node one more time to finish the update with this command: docker restart otnode
Step 3
Congrats. You are all set.
2

The Quickest Way

If you want to get the auto-update as quickly as possible, you can trigger it by restarting your node.

Prerequisites: Auto-update is enabled and the node is running in a Docker container.
Step 1
If you do not want to wait for your node to update itself, you can trigger the update process yourself by restarting your node with this command: docker restart otnode && docker logs otnode
Step 2
The node will detect the new version and will start the auto-update process. If the update is successful, the node will restart itself and you should see this message in the logs to verify the Version check: local version 4.0.0, remote version: 4.0.0.
Step 3
Next, restart the node manually. To finish the process, run the following command: docker restart otnode
Step 4
Congrats. You are all set.
3

The Manual Way

Proceed here if you don't have auto-update enabled.

Prerequisites: The node is running in a Docker container.
Knowledge Center

Step 2 (Optional) -
 Install the Houston App - The User Interface for Your Node

Houston is a visual user interface that makes operating a node easy for everyone.

Houston app is available on our GitHub at the following link:
https://github.com/OriginTrail/houston-v4