Automated setup with the installer

This page will guide you through the DKG Edge Node installation process for MacOS and Linux

Supported operating systems

  • macOS

  • Ubuntu 22.04 and Ubuntu 24.04

1. Pre-installation Requirements

Before getting started with the installation, there are a few important preparations to make. The process requires certain inputs such as wallet addresses and funds. The following sections will walk you through each of these prerequisites step by step.

1.1. Software dependencies:

1.2. Edge node keys (wallets):

The Edge Node uses three types of keys: a management key, an operational key, and a publishing key. The management and operational keys need a small amount of the utility token based on the blockchain you will be using (NEURO, Base ETH, xDai) to sign transactions for certain operations, while publishing key requires both the utility and TRAC tokens to perform publishing operations. To check your wallets funds on Neuroweb testnet, use Subscan explorer.

2. Download the OriginTrail DKG Edge Node installer

Once you have your wallets funded and ready, you may proceed with cloning, configuring and running the Edge node installer by following the instructions provided below.

2.1 - Clone the edge-node-installer repository using git:

git clone https://github.com/OriginTrail/edge-node-installer.git && cd edge-node-installer

3. Configure the environment (.env)

3.1 - Create .env file using .env.example:

cp .env.example .env

The .env.example is used as a guide template, but is well documented and should help you understand what each of the variables mean.

3.2 - Populate .env file:

To simplify the development setup, we’ve provided the env-setup.js script. This script will automatically generate and populate all required .env parameters, including:

  • Management keys

  • Operational keys

  • Publishing keys (for all supported chains)

  • Node name (same across all chains)

To populate your .env file, run:

Once Node.js and npm are successfully installed, you can use the following command to populate your .env file:

npm install ethers && node env-setup.js

3.3 Funding your keys:

Once the .env file is populated with the mandatory parameters, you will have to fund the keys (wallets) which were added to the .env file.

  1. Open your .env file using nano or any text editor.

  2. Locate the following wallet entries for each blockchain:

    • OPERATIONAL_KEY_PUBLIC_ADDRESS

    • MANAGEMENT_KEY_PUBLIC_ADDRESS

    • PUBLISH_WALLET_01_PUBLIC_KEY

  3. Fund wallets for at least one blockchain in the .env file using our faucet. Instructions on how to use the Faucet can be found on the Faucet documentation page. Our faucet can provide you with the testnet tokens as follows:

    1. Neuroweb: TRAC and NEURO

    2. Gnosis Chiado: TRAC and xDai

    3. Base Sepolia: TRAC (ETH for Base Sepolia can be received via the faucets provided in the official Base documentation)

OPERATIONAL_KEY_PUBLIC_ADDRESS and MANAGEMENT_KEY_PUBLIC_ADDRESS require a small amount of native token (e.g., NEURO, ETH, xDAI) while PUBLISH_WALLET_01_PUBLIC_KEY requires both native and TRAC token in order to be able to publish Knowledge Assets.

3.4 - Configure LLM functionality:

Edge Node components require a large language model (LLM) to operate. To ensure full functionality, you must provide at least one of the supported external API keys below:

  • OpenAI API Key – Used to access OpenAI’s GPT models. Example: sk-4hsR2exampleXv29NSHtDyzt0NlFgk1LXj6zS7

  • Anthropic API Key – Used to access Anthropic’s Claude models. Example: claude-56a8e5eexamplef27b5b6e47b1

Optional .env parameters:

The Edge Node supports additional external services and tools that can be configured via the .env file before running the installer. Below is a list of supported services represented as configuration parameters:

# Unstructured.io - can be obtained from https://unstructured.io/api-key-free 
# (used by default for parsing PDF documents)
UNSTRUCTURED_API_URL=""

# HuggingFace - can be obtained from https://huggingface.co/settings/tokens 
# (used if you use vector search in your dRAG pipeline)
HUGGINGFACE_API_KEY=""

4. Run installation:

Once all the required parameters have been configured in the .env file, simply run the installer and wait for it to finish the Edge node setup.

bash edge-node-installer.sh

Edge node installer will deploy each component within the edge_node directory: drag-api, edge-node-auth-service, ka-mining-api, ot-node.

Edge node services will be available and listening on the following local ports upon installation:

  • UI will be available on http://localhost

  • 3001 - Authentication service

  • 3002 - API (backend)

  • 5002 - dRAG

  • 5005 - Knowledge mining

  • 8900 - OT Node

UI (Edge node interface) will be cloned and configured in the following paths:

  • MacOS - /opt/homebrew/etc/nginx/servers/edge-node-ui

  • Linux - /var/www/edge-node-ui

5. Control and Manage Edge Node Services (Linux)

Below is a list of the deployed services and how to manage them using systemd. All Edge Node services are deployed as systemd units, making them easy to manage.

List of Services:

  1. Edge Node API - edge-node-api.service

  2. Authentication Serviceauth-service.service

  3. Knowledge Mining APIka-mining-api.service

  4. DRAG APIdrag-api.service.service

  5. OTNodeotnode.service

Managing Services:

For each service, you can perform the following actions using the respective systemd commands:

  • Check service status: systemctl status <service-name>

  • Start a service (if it is not already running): systemctl start <service-name>

  • Stop a service: systemctl stop <service-name>

  • Restart a service: systemctl restart <service-name>

  • View Service Logs: journalctl -f -u <service-name>

Exploring Edge Node Capabilities

Once the Edge Node is up and running in your local environment, you’re ready to explore its features and capabilities. To get started, refer to the Usage Example section to learn how to interact with the node and understand what it can do.

Need help?

If you encounter any issues during the installation process or have questions about any of the topics above, jump into our official Discord and ask for assistance.

Follow our official channels for updates:

Last updated

Was this helpful?