OriginTrail
Search…
Setup instructions Arch Linux
These setup instructions for DKGv6 are "Work in progress" and are subject to change. The development team expects to introduce improvements as well as a more automated process of setting up the DKGv6 node in the future.
Need any assistance with node setup? Join the DKGv6 Discord chat and find help within the OriginTrail tech community!
IMPORTANT: These instructions are not intended for migrating your current v5 node to v6. Attempting this will most likely break your v5 node at this point. You should only use these instructions in order to setup a fresh OriginTrail v6 testnet node.

Prerequisites

  • A dedicated 4GB RAM/2CPUs/50GB HDD Arch Linux server (minimum hardware requirements)

Manual installation steps

First, log in as root and update your system
1
pacman -Syu
Copied!

Prepare Databases

In this section and the one below, you can choose between using GraphDB or Blazegraph. If you choose one, you can ignore the instructions for the other.
In order to download GraphDB, please visit their official website and fill out the form. Installation files will be provided to you via email. Use the standalone version of GraphDB. Save the <graphDB_file>.zip on your root folder.
In order to download blazegraph, run
1
wget https://github.com/blazegraph/database/releases/download/BLAZEGRAPH_2_1_6_RC/blazegraph.jar
Copied!

Step 0: Setup GraphDB or Blazegraph

If you chose to use GraphDB, below are the steps to follow:
1
pacman -S jre-openjdk
2
unzip graphdb-free-9.10.1-dist.zip
Copied!
We will create a system service to allow graphDB to keep running in the background.
1
nano /lib/systemd/system/graphdb.service
Copied!
Paste the following content and save
1
#/lib/systemd/system/graphdb.service
2
​
3
[Unit]
4
Description=GraphDB - OriginTrail V6 Stage 1 Beta Node
5
Documentation=https://github.com/OriginTrail/ot-node
6
After=network.target
7
​
8
[Service]
9
Type=simple
10
User=root
11
WorkingDirectory=/root/graphdb-free-9.10.1/bin/
12
ExecStart=/root/graphdb-free-9.10.1/bin/graphdb
13
Restart=on-failure
14
​
15
[Install]
16
WantedBy=multi-user.target
Copied!
Now let's start the service:
1
systemctl daemon-reload
2
systemctl start graphdb
Copied!
If you chose to use Blazegraph, please follow the steps below:
We will create a system service to allow Blazegraph to keep running in the background.
1
nano /lib/systemd/system/blazegraph.service
Copied!
Paste the following content and save
1
#/lib/systemd/system/blazegraph.service
2
​
3
[Unit]
4
Description=blazegraph - OriginTrail V6 Stage 1 Beta Node
5
Documentation=https://github.com/OriginTrail/ot-node
6
After=network.target
7
​
8
[Service]
9
Type=simple
10
User=root
11
WorkingDirectory=/root/
12
ExecStart=/bin/java -jar /root/blazegraph.jar
13
Restart=on-failure
14
​
15
[Install]
16
WantedBy=multi-user.target
Copied!
Now let's start the service:
1
systemctl daemon-reload
2
systemctl start blazegraph
Copied!
When graphDB or blazegraph are started, please check the status in order to confirm that it is running in the background.
1
systemctl status graphdb
Copied!
1
systemctl status blazegraph
Copied!

Step 1: Installing other requirements

OriginTrail v6 node requires npm and Node.js v14. In order to install them, please execute the following set of commands:
1
pacman -S npm nodejs-lts-fermium
Copied!

Step 2 - Install mysql and create a local operational database

For Arch Linux, MariaDB is a community-developed, commercially supported fork of the MySQL, intended to remain free and open-source software. It meets the same standard enterprise requirements as MySQL, often with additional features, capabilities and options, and shows an improved speed when compared.
1
pacman -S tcl mariadb
2
mariadb-install-db --user=mysql --basedir=/usr --datadir=/var
3
systemctl start mariadb
4
mysql -u root -e "CREATE DATABASE operationaldb /*\!40100 DEFAULT CHARACTER SET utf8 */;"
5
mysql -u root -e "ALTER USER [email protected] IDENTIFIED VIA mysql_native_password;"
6
mysql -u root -e "flush privileges;"
Copied!
Disable binary logging in the mysql config file:
1
nano /etc/my.cnf.d/mysql-clients.cnf
Copied!
Under the line that reads [mysqlbinlog], add the following line:
1
skip-log-bin
Copied!
Close and save the file. Restart the service:
1
systemctl restart mariadb
Copied!

Step 3 - Get the DKG code by cloning the repo and checking out the proper branch

1
git clone https://github.com/OriginTrail/ot-node
2
cd ot-node
3
git checkout v6/release/testnet
Copied!

Step 4 - Install dependencies

1
npm install
Copied!

Step 5 - Ports

Allow traffic on ports 8900 (RPC) and 9000 (libp2p) on your router. Note that all ports are open by default on Arch Linux.

Step 6 - Create .env file:

1
nano .env
Copied!
Paste the following variable into the .env file, save and close:
1
NODE_ENV=testnet
Copied!
Step 7 - Create .origintrail_noderc file
Paste the content below if you are using GraphDB, then add your operational wallet public and private keys :
1
{
2
"blockchain":[
3
{
4
"blockchainTitle": "Polygon",
5
"networkId": "polygon::testnet",
6
"rpcEndpoints": ["https://rpc-mumbai.maticvigil.com/"],
7
"publicKey": "...",
8
"privateKey": "..."
9
}
10
],
11
"graphDatabase": {
12
"username": "admin",
13
"password": ""
14
},
15
"logLevel": "trace",
16
"rpcPort": 8900,
17
"network": {
18
},
19
"ipWhitelist": [
20
"::1",
21
"127.0.0.1"
22
]
23
}
Copied!
Paste the content below if you are using Blazegraph, then add your operational wallet public and private keys :
1
{
2
"blockchain":[
3
{
4
"blockchainTitle": "Polygon",
5
"networkId": "polygon::testnet",
6
"rpcEndpoints": ["https://rpc-mumbai.maticvigil.com/"],
7
"publicKey": "...",
8
"privateKey": "..."
9
}
10
],
11
"graphDatabase": {
12
"implementation": "Blazegraph",
13
"url": "http://localhost:9999/blazegraph",
14
"username": "admin",
15
"password": ""
16
},
17
"logLevel": "trace",
18
"rpcPort": 8900,
19
"network": {
20
},
21
"ipWhitelist": [
22
"::1",
23
"127.0.0.1"
24
]
25
}
Copied!
.origintrail_noderc example can also be found on our GitHub.
OriginTrail v6 testnet node is running on Polygon Mumbai (testnet) network and it is currently not requiring any test TRAC tokens. Make sure that the wallet you are using in your configuration file is funded with test MATIC tokens.

Polygon Mumbai MATIC faucet: https://faucet.polygon.technology/​

Step 8 - Run DB migrations:

1
npx sequelize --config=./config/sequelizeConfig.js db:migrate
Copied!
Step 9 - Start OriginTrail v6 node We will create a service to start the node:
1
nano /lib/systemd/system/otnode.service
Copied!
Paste the following content and save
1
#/lib/systemd/system/otnode.service
2
​
3
[Unit]
4
Description=OriginTrail V6 Stage 1 Beta Node
5
Documentation=https://github.com/OriginTrail/ot-node/
6
After=network.target graphdb.service
7
​
8
[Service]
9
Type=simple
10
User=root
11
WorkingDirectory=/root/ot-node
12
ExecStart=/usr/bin/node /root/ot-node/index.js
13
Restart=on-failure
14
​
15
[Install]
16
WantedBy=multi-user.target
Copied!
1
systemctl daemon-reload
2
systemctl start otnode
Copied!
Verify that the service is up and running:
1
systemctl status otnode
Copied!
Checking node logs: Use the following command to check the logs:
1
journalctl -f -u otnode --all
Copied!
Successfully started
In order to stop your node, use the following command:
1
systemctl stop otnode
Copied!

OPTIONAL:

You can enable all previous services to allow them to start on reboot. Enable GraphDB or Blazegraph depending on your choice above.
1
systemctl enable graphdb
2
systemctl enable blazegraph
3
systemctl enable mariadb
4
systemctl enable otnode
Copied!
To control your journal size over time, I strongly suggest running the following:
1
journalctl --vacuum-size=200M
Copied!
Congratulations. Welcome to v6 beta
We would love to meet you in our Discord chat - join us here.