O
O
Otnode
Search…
Create a node on Ethereum
Here is a video guide I made for v4, it is very similar for ethereum for V5 releasing in 23 March 2021, though I would hold off on setting up nodes on Ethereum until the gas issue is not resolved by the Ethereum developers. You can setup nodes on xDAI instead and on SFC in Q2.
Create operational wallet
Create a new wallet using Mycrypto or Metamask and export the private key, which we will use for the operational wallet for the node. Deposit 3000 TRAC and 0.15 eth. The 3000 TRAC is locked along with the creation of the node identity, which can be retrieved should you decide to stop hosting a node. The ETH is for gas fees during installation and litigation responses.
Register on Infura
Go to Infura.io and create an account. Create a project, copy the HTTPS link under Endpoints – Mainnet. It should look like: https://mainnet.infura.io/v3/xxxxxxxxxxxxxxxxxxxxxx where the red letters are your specific link
Configure the server
Download Termius (or any other terminal client like Kitty) and configure it with the details you received from the VPS hosting (IP, username, password). Click on Hosts, Select New host, Choose a Label for the node and add the IP address from the confirmation e-mail from Digital Ocean or Hetzner that the node is created, choose root as username and input the password, and click on Save on the right top corner.
Once you login follow the configuration logic below. Click on the COPY button after each command and right click into the terminal window to paste it. Then confirm with Enter
1. Update the server programs:
1
apt update && apt upgrade -y
Copied!
Could not load image
This image has an empty alt attribute; its file name is image-4.png
2. Reboot server with below command, close the window and login again
1
reboot
Copied!
3. Install docker (skip this step if you selected the Digital Ocean Server with Docker installation).
The official installation commands for docker can be found here, should the ones in this section become outdated: https://docs.docker.com/engine/install/ubuntu/
1
apt-get install apt-transport-https ca-certificates curl software-properties-common
Copied!
1
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Copied!
1
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Copied!
1
apt-get update
Copied!
1
apt-get install docker-ce
Copied!
4. Setup the firewall
1
ufw allow 8900
Copied!
1
ufw allow 5278
Copied!
1
ufw allow 3000
Copied!
4a. Check if firewall is setup
1
ufw allow 22/tcp
Copied!
1
ufw show added
Copied!
4b. Activate and double check the firewall is properly configured:
1
ufw enable
Copied!
1
ufw status
Copied!
Could not load image
This image has an empty alt attribute; its file name is image-5.png
5. Setup the configuration file
Step A: Check ethgasstation.info to see what is the current GWEI
Your node will create the identity with the FAST value. With 91 GWEI it will use around 0.1 eth to do so. Make sure the max_allowed_gas_price setting below is above the current gwei to allow for the transaction to be processed.
1
nano /root/.origintrail_noderc
Copied!
Paste the below in the text editing tool and update the red letters accordingly:
1
{
2
"blockchain": {
3
"implementations": [
4
{
5
"blockchain_title": "Ethereum",
6
"network_id": "ethr:mainnet",
7
"identity_filepath": "erc725_identity.json",
8
"dh_price_factor" : "0.1",
9
"node_wallet": "xxxxxxxx",
10
"node_private_key": "xxxxxxxx",
11
"management_wallet": "xxxxxxxx"
12
"rpc_server_url": "xxxxxxxxx"
13
}
14
]
15
},
16
"network": {
17
"hostname": "xxx.xxx.xxx.xxx"
18
},
19
"initial_deposit_amount": "5000000000000000000000",
20
"dh_max_holding_time_in_minutes": 5256000,
21
"dh_maximum_dataset_filesize_in_mb": 10
22
}
Copied!
save the file by Ctrl-O and Enter and exit by Ctrl-X
Explanation:
node_wallet – Operational wallet public address
node_private_key – Operational wallet private key. As you will store just 0.1 – 0.15 ETH there for gas fees, even if server gets compromised, the hacker would have access only to this small amount
Note: If your private key start with 0x, remove these two characters when adding it to the configuration file.
management_wallet – this is your management wallet public address – ideally this should be a wallet on your cold storage (Ledger Nano S, etc.)
dh_price_factor – this is the setting of your lambda value – should be less than 1 if you want to accept most of all current jobs. The lower the value, the less paid jobs you are willing to accept.
Important:
“max_allowed_gas_price” – this is the limit of wei the node will set to create the identity, payout jobs, etc. If the value is lower than the current average value of ethgasstation, it will be postponed and tried later. Be careful with that setting, and adjust accordingly to your preference how much you are willing to pay for those transactions. 50000000000 is equal to 50 gwei, so for the node creation you might want to increase to set accordingly.
rpc_server_url – this is your infura https address which you obtained during the registration there.
Hostname – this is your server IP, which you can find in the notification e-mail when you setup the VPS
remoteWhitelist: leave at 127.0.0.1
dh_max_holding_time_in_minutes – the maximum length of jobs you are willing to accept in minutes (for example 550 000 is to accept one year jobs).
disableAutoPayouts – disable automatic payouts so you can process those manually when the ETH network gwei is low.
6. Install JQ to validate whether the configuration file doesn’t contain any errors
1
apt-get install jq
Copied!
1
jq "." /root/.origintrail_noderc
Copied!
Check the brackets, double quotes and commas. Everything except your data has to be exactly like the example above.
7. Initiate the node installation
Before running the command, check what is the GWEI on ethgasstation.info, as this command uses lots of GAS. Ideally you would like to do it when it is around 30 GWEI (late GMT evening time), and adjust the gas setting accordingly.
Important: Once you run this command, the 3000 TRAC will be deposited to the contract and your first task is to copy and back your ERC725 identity and node identity mentioned on Step 8 below, so you can have control over this deposited amount. Should you get an error at this stage, or if the gas setting you used is too low, do not delete the container or destroy the VPS. Instead join the discord channel or the Official Telegram group to ask for assistance
1
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 origintrail/ot-node:release_mainnet
Copied!
Once completed and node has joined the network, exit the log with CTRL +C
Important: If you get a warning that the gwei is too low and it will retry in 30 minutes, and you want to increase the gwei, scroll to the bottom of the guide, End Note 1, what to do.
8. Create identities into files on the root directory
ERC725 identity
1
docker cp otnode:/ot-node/data/erc725_identity.json ~/erc725_identity.json
Copied!
Important: If you interrupted the ERC725 creation and the file was not created, but tokens were sent to the contract, and you get this error: “error: no such container:path: otnode:/ot-node/data/erc725_identity.json”, scroll to the End Note 2 how to extract the ERC725 identity and manually create it.
Node ID
1
docker cp otnode:/ot-node/data/identity.json ~/identity.json
Copied!
9. Read erc725 and node id and copy/paste them in secure document
1
more erc725_identity.json
Copied!
1
more identity.json
Copied!
Or Login to the server using WINSCP or any other FTP application, go to the root folder and download these two files on your local server and archive them with a password.
10. Deposit TRAC from your management wallet to the node
Deposit the amount of TRAC which will be available for jobs through the node profile management page at this URL: https://node-profile.origintrail.io/
The current recommended amount is 5000 – 7000 TRAC, and they have to be present on your management wallet, which should be on a cold storage device like Ledger Nano S. If you have not secured your crypto holdings on cold storage, please do so now as this is the best way to keep your funds secure.
Login with your ERC725 Identity which you extracted above and the operational wallet public address and follow the instructions on the page. You need metamask to initiate the deposit.
Then on the top left section “Deposit TRAC to Your Node”, enter the amount of TRAC present on your management wallet, to be deposited to the contract for your node, and a set of 2 transactions have to be processed. Metamask popup will show up for you to confirm you want to process the transaction. Once the first transaction is processed, a second popup will show for the second transaction.
Note: Users reported that Metamask calculates the transaction with the maximum possible gas fee of 8.9 mil gas, and as such would display the transaction will cost more than $50 USD. Should this happen, click on Edit and adjust the gas limit to 200 000 only.
Once the deposit is completed, restart your node.
11. Restart the node
1
docker stop otnode
Copied!
1
docker start otnode
Copied!
Update the docker container to auto restart the container (new command)
1
docker update --restart=always otnode
Copied!
12. Follow the log to monitor the operation of the node
1
docker logs -f otnode
Copied!
13. Monitor your node
You can add your node to the OT Hub and monitor how many jobs has the node won, initiate manual payouts and quickly check if your node is online. The OT Hub can be found on the link below:
https://othub.origin-trail.network/dashboard
Also in the Node Maintenance section (menu on the right) you can find how to setup notifications on your mobile.
14. Add swap space
Swap space is dedicated space on your hard drive, which is used as RAM should the hardware RAM is fully utilized. This usually slows down the server as the hard drive is slower than the RAM, however the swap would ensure the node will continue operation. I highly recommend to enable 1 GB Swap space on your server.
  • check if there is swap space already enabled (SWAP line should show 0)
1
free -h
Copied!
  • Add 1 GB Swap space
1
fallocate -l 1G /swapfile
Copied!
  • enable the swap file
1
chmod 600 /swapfile
Copied!
  • mark the space as swap file
1
mkswap /swapfile
Copied!
  • enable for utilisation
1
swapon /swapfile
Copied!
  • confirm it is setup (SWAP line should show 1)
1
free -h
Copied!
Could not load image
This image has an empty alt attribute; its file name is image-4.png
  • make it permanent
1
cp /etc/fstab /etc/fstab.bak
Copied!
1
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Copied!
15. Install Fail2ban
This tool allows you to ban any user who failed to login successfully to the server after three attempts. This ensures your server cannot be bruteforced by automated bots, running millions of combinations to try to guess your password.
1
apt install -y fail2ban
Copied!
1
systemctl start fail2ban
Copied!
1
systemctl enable fail2ban
Copied!
Configure the application
1
nano /etc/fail2ban/jail.local
Copied!
Paste the following content in the file editor
1
[sshd]
2
enabled = true
3
port = 22
4
filter = sshd
5
logpath = /var/log/auth.log
6
maxretry = 3
Copied!
Save with CTRL + O and Enter and exit with Ctrl + X. Then restart the process with
1
systemctl restart fail2ban
Copied!
16. Setup e-mail alerting for Digital Ocean
If you are using Digital Ocean, you can setup an alert to notify you by e-mail when your CPU load is below a certain threshold (i.e. 3%), which would most probably mean the node is offline.
In the manage section in the user area, select Monitoring and click on Create Alert Policy.
Configure the alert as below

End Notes (regular installation stops here):

End Note 1. Increase the gwei limit when installing the node
Important: Before doing this, make sure that:
  • the 3000 TRAC tokens are not submitted to the contract (check the operational wallet on etherscan.io)
  • check the log to confirm the node is between the 30 minutes waiting period (docker logs otnode -f)
Hit Ctrl + C and stop the node with the command below
1
docker stop otnode
Copied!
1
nano /root/.origintrail_noderc
Copied!
Update the “max_allowed_gas_price”: “30000000000” setting to whatever you are comfortable paying. i.e. replace 3 with 5 to increase from 30 gwei to 50 gwei. If you this step with 90 gwei, it will take ~0.1 eth, so be warned.
save the file by Ctrl-O and Enter and exit by Ctrl-X
1
docker start otnode
Copied!
1
docker logs otnode -f
Copied!
End Note 2. Obtain and create manually the ERC725 identity, if you got an error at step 8.
Go to Etherscan.io and search for your operational wallet public address
Click on the ERC20 Token Txns section (1) and locate the outgoing transaction of 3000 TRAC and click on the respective Txn Hash (2) on the left.
Then on the Transaction Hash screen click on the Internal Txns (1) and you will see the ERC725 identity there (2). Click on it.
Click to copy the ERC725 identity (1), which is basically the Contract number on the left of the button.
Then through the terminal application (i.e. Termius) login to the server and enter the following commands while updating the XXXXXX with the identity you copied on the step above
1
echo "{\"identity\":\"XXXXXXXXXXXXXXXXXXX\"}" > erc725_identity.json
Copied!
Insert the identity file into the OT docker container with the following command:
1
docker cp erc725_identity.json otnode:/ot-node/data/
Copied!
Restart the node so the new identity can kick in.
1
docker stop otnode
Copied!
1
docker start otnode
Copied!
1
docker logs otnode -f
Copied!