Manual setup
Setting up an Edge Node project to explore its capabilities and build your own projects. As an open-source solution, the Edge Node offers complete customization to fit your needs.
Last updated
Was this helpful?
Setting up an Edge Node project to explore its capabilities and build your own projects. As an open-source solution, the Edge Node offers complete customization to fit your needs.
Last updated
Was this helpful?
To manually set up the DKG Edge Node in your local environment, you can choose between the following two options:
[Recommended]
This option allows you to configure the Edge Node services within your local development environment, utilizing a locally deployed DKG network. This setup provides full control over the environment and is ideal for developing custom processing pipelines and testing in a self-contained network.
Operating System: macOS, Linux
RAM: At least 8 GB
CPU: 4
Storage: At least 20 GB of available space
Network: Stable internet connection
Make sure the following services are installed and properly configured:
Git: Version control system
Windows:
Linux: (via a package manager such assudo apt install git
for Ubuntu)
macOS:
MySQL 8: Database service
Windows:
Linux: (via sudo apt install mysql-server
for Ubuntu)
macOS:
Redis: In-memory data structure store ()
Windows:
Linux:
macOS:
Node.js: JavaScript runtime environment
v20.04: Used for the local network/ot-node setup
v22.4.0: Used for Edge Node services
v11: for running Blazegraph triple store
Python v3.11.7
Edge Node services require a V8 DKG Runtime Node endpoint in order to be configured and initialized so for this setup, running a local DKG network is essential.
In order to deploy a local DKG network, do the following:
Clone the OriginTrail node engine: git clone https://github.com/OriginTrail/ot-node
Enter ot-node directory and checkout to v8/develop branch: cd ot-node && git checkout v8/develop
Switch to Node.js v20 and install node modules: npm install
Run blazegraph.jar file with the following command: java -server -Xmx4g -jar blazegraph.jar
in order to start the triple store database (from the directory where Blazegraph is downloaded)
Make sure that the MySQL service is running
In ot-node directory, create .env file in ot-node directory and populate it with the following parameters (If your MySQL is password protected, add the password to REPOSITORY_PASSWORD):
Start the local DKG network by executing the following command from the ot-node directory: bash tools/local-network-setup/setup-macos-environment.sh --nodes=5
Once the network deployment is initiated, you will be provided with the local hardhat blockchain and the amount of local DKG nodes that you defined via --nodes flag
Once the network is up and running, you will select one of the local node endpoints to configure the Edge Node services, which will be explained in the continuation of these instructions.
In order to kick off the installation process, you need to clone all Edge Node services to your local environment using git clone
command.
The instructions for configuring DKG Edge Node services are also available in the README file of each service's GitHub repository, where you can follow the steps provided.
Create database 'edge-node-auth-service'
Create .env file with cp .env.example .env
in the dir.
Generate random strings for the following .env variables:
JWT_SECRET and
SECRET (you can use openssl rand -hex 64
for example)
Install node modules with npm install
(use Node.js v22.4.0)
Setup your database with npx sequelize-cli db:migrate
and npx sequelize-cli db:seed:all
- This will generate a demo user, a wallet with funds for the local network, and configure your local Edge Node Authentication Service to connect to the first node from your local network.
Initiate Edge Node Authentication service with: npm run start
Create .env file with cp .env.example .env
in the service directory
Create the database mentioned in .env
Install node modules with npm install
(use Node.js v22.4.0)
Execute migrations: npx sequelize-cli db:migrate
Setup Runtime node MySQL operational db connection by populating the following values in the .env file:
Initialize Redis and make sure that it's running on its default port 6379
Start the service: npm run start
In order to set up the Edge Node UI locally, please run the following commands:
Create .env file: cp .env.example .env
Install ionic/cli: npm install -g @ionic/cli
Install electron: npm install -g electron
Install node modules: npm install
(use Node.js v22.4.0)
To run the application in your browser: ionic serve
To run the application in your desktop app: npm run start-electron
Once the Edge Node UI is ready, the only accessible screen will be /login. Use the credentials created during the Auth service setup previously.
In order to setup Edge Node UI locally, please follow the steps below:
Create .env file with cp .env.example .env
in the dir.
Add the absolute path to your DAGs folder into the DAG_FOLDER_NAME
variable in the .env
file
Setup Python environment: pyenv local 3.11.7
A virtual environment should be set up to install the required dependencies. You can do this by running the following command: python -m venv .venv && source .venv/bin/activate
Install Python requirements: pip install -r requirements.txt
Setup Apache Airflow service:
Generate default Airflow config: airflow config list --defaults
Open the Airflow configuration file located at "~/airflow/airflow.cfg" file and update the following parameters as presented below:
Initiate Airflow database and create an admin user with:
Initiate Airflow scheduler: airflow scheduler
Pick up new jobs and start them:
Initiate Airflow webserver: airflow webserver --port 8080
Initiate Edge Node Knowledge Mining: python app.py
Create MySQL logging: CREATE DATABASE `ka-mining-api-logging` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
In order to set up the Edge Node dRAG locally, please follow the steps below:
Install node modules: npm install
(use Node.js v22.4.0)
Create .env file: cp .env.example .env
Add your LLM_API_KEY into the .env (dRAG uses LLM to formulate the answer)
Create a database for dRAG logging: CREATE DATABASE drag_logging;
Run migrations: npx sequelize-cli db:migrate
Initiate the service: npm run start
(Optional) If you want to use the vectorization controller, you have to set up the following services: HuggingFace, Zilliz, and Cohere. If you want to customize the experience further, you can also modify the code to use any other service for embedding/vector search and reranking.
Once you've finalized configuring all DKG Edge Node services, please make sure that they are exposed on the following ports:
Operating System: macOS, Linux, Windows with WSL
RAM: At least 8 GB
CPU: 4
Storage: At least 20 GB available space
Network: Stable internet connection
Make sure the following services are installed and properly configured:
Git: Version control system
MySQL 8: Database service
Node.js v22.4.0: JavaScript runtime environment
Python v3.11.7
In order to kick off the installation process, you need to clone all Edge Node services to your local environment using git clone
command.
SSH to the server where you have your V8 DKG Core Node up and running
Edit .origintrail_noderc configuration file with nano
or any other editor
Locate the auth
section in the configuration file and add your local IP as presented below:
Restart your node with otnode-restart
command in order for changes to configuration to be applied
The instructions for configuring DKG Edge Node services are also available in the README file of each service's GitHub repository, where you can follow the steps provided.
Create database 'edge-node-auth-service'
Create .env file with cp .env.example .env
in the dir.
Generate random strings for the following .env variables:
JWT_SECRET and
SECRET (you can use openssl rand -hex 64
for example)
Install node modules with npm install
(use Node.js v22.4.0)
Setup your database with npx sequelize-cli db:migrate
and npx sequelize-cli db:seed:all
- This will generate a demo user, a wallet with funds for the local network, and configure your local Edge Node Authentication Service to connect to the first node from your local network.
Since the node is by default configured to automatically work with your local network, the following variables inside of the UserConfigs table (database: edge-node-auth-service) should be updated to match your pre-deployed V8 DKG Runtime Node information:
"run_time_node_endpoint": http://<your_node_endpoint_or_ip>
"run_time_node_port": 8900
"edge_node_environment": testnet
"blockchain": base:84532
Replace placeholder wallet - The following table "user_wallets" will be populated with a pre-defined wallet address (local network related) which should be replaced by your Base Sepolia wallet with funds (ETH and TRAC)
Initiate Edge Node Authentication Service with: npm run start
Create .env file with cp .env.example .env
in the service directory
Create the database mentioned in .env
Install node modules with npm install
(use Node.js v23)
Execute migrations: npx sequelize-cli db:migrate
Expose V8 DKG Core node operational database (MySQL) to a local Edge Node API service:
SSH to your Runtime Node server
Expose port 3306 on your server to your local IP address (firewall configuration)
Enable MySQL remote connection by changing the bind-address from 127.0.0.0 to 0.0.0.0 in /etc/mysql/mysql.conf.d/mysqld.cnf
Restart mysql.service: systemctl restart mysql.service
Create new MySQL user for Edge Node API service to use:
mysql -u root -p
When asked for the password, use the password you created during the node setup process
Create a user for remote access: CREATE USER'username'@'%' IDENTIFIED BY'your_password';
GRANT ALL PRIVILEGES ON*.*TO'username'@'%'WITH GRANT OPTION;
FLUSH PRIVILEGES;
Setup Runtime Node MySQL operational db connection by populating the following values in the .env file:
Initialize Redis and make sure that it's running on its default port 6379
Start the service: npm run start
In order to set up the Edge Node UI locally, please run the following commands:
Create .env file: cp .env.example .env
Install ionic/cli: npm install -g @ionic/cli
Install electron: npm install -g electron
Install node modules: npm install
(use Node.js v23)
To run the application in your browser: ionic serve
To run the application in your desktop app: npm run start-electron
Once the Edge Node UI is ready, the only accessible screen will be /login. Use the credentials created during the Auth Service setup previously.
In order to setup Edge Node UI locally, please follow the steps below:
Create .env file with cp .env.example .env
in the dir.
Add the absolute path to your DAGs folder into the DAG_FOLDER_NAME
variable in the .env
file
Setup Python environment: pyenv local 3.11.7
A virtual environment should be set up to install the required dependencies. You can do this by running the following command: python -m venv .venv && source .venv/bin/activate
Install Python requirements: pip install -r requirements.txt
Setup Apache Airflow service:
Generate default Airflow config: airflow config list --defaults
Open the Airflow configuration file located at "~/airflow/airflow.cfg" file and update the following parameters as presented below:
Initiate Airflow database and create an admin user with:
Initiate Airflow scheduler: airflow scheduler
Pick up new jobs and start them:
Initiate Airflow webserver: airflow webserver --port 8080
Initiate Edge Node Knowledge Mining: python app.py
Create MySQL logging: CREATE DATABASE `ka-mining-api-logging` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
In order to set up Edge Node dRAG locally, please follow the steps below:
Install node modules: npm install
(use Node.js v22.4.0)
Create .env file: cp .env.example .env
Add your LLM_API_KEY into the .env (dRAG uses LLM to formulate the answer)
Create a database for dRAG logging: CREATE DATABASE drag_logging;
Run migrations: npx sequelize-cli db:migrate
Initiate the service: npm run start
(Optional) In case you want to use the vectorization controller, you have to set up the following services: HuggingFace, Zilliz, and Cohere. If you want to customize the experience further, you can also modify the code to use any other service for embedding/vector search and reranking.
Once you've finalized configuring all DKG Edge Node services, please make sure that they are exposed on the following ports:
Download blazegraph.jar (Triple store db) from the following and save it to the location of your choice locally
Run the following MySQL query on edge-node-auth-service database:
Once the Airflow webserver is initiated, your pipelines should be available on
Edge Node Knowledge Mining README is available .
HuggingFace - used for vectorization embedding model
Zilliz - used for hosting the vector database
Cohere ReRanker - used for improving retrieval results accuracy
Edge Node Authentication Service:
Edge Node API:
Edge Node UI:
Edge Node Knowledge Mining:
Edge Node dRAG:
Prior to proceeding with this setup option, it is essential to have a V8 DKG Core Node operational on the testnet, as this is a critical requirement. If you have not yet deployed a Testnet Core Node, please consult the installation guide available on the following for detailed instructions.
Redis: In-memory data structure store ()
Run the following MySQL query on edge-node-auth-service database:
Instructions on how to use the TRAC faucet can be found .
Once the Airflow webserver is initiated, your pipelines should be available on
HuggingFace - used for vectorization embedding model
Zilliz - used for hosting the vector database
Cohere ReRanker - used for improving retrieval results accuracy
Edge Node Authentication Service:
Edge Node API:
Edge Node UI:
Edge Node Knowledge Mining:
Edge Node dRAG: