Installation

If you are new to OriginTrail, DKG, knowledge graphs or blockchains we highly recommend you get familiarized with the Key concepts before proceeding.

What are we installing today?

You will be installing the DKG Edge Node on your machine. You can think of the DKG Edge Node as a framework for building neuro-symbolic AI agents based on the OriginTrail Decentralized Knowledge Graph. When you finish, a basic DKG based neuro-symbolic agent will be accessible through a user interface (chatbot), but also via MCP and a classic API. You will be able to customize it to your will by building plugins and extensions.

To install the DKG Edge Node, we will be using the DKG CLI (dkg-cli) - a streamlined command-line interface that automates much of the process and project maintainance. The CLI will automatically install all DKG Edge Node components (DKG Agent, DKG Engine), including databases - by default MySQL, Redis and Blazegraph.

The DKG utilizes blockchain

The DKG Network utilizes blockchains as a trusted environment for incentivisation and securing data exchanges. It's a multichain network, so DKG Nodes support 3 blockchains, but can currently be deployed on a single blockchain at a time (multichain deployment support is on the way).

If you're not too familiar with blockchain technology, and not sure which blockchain to pick to get started with the DKG Node, which one is better for you etc - don't worry, a default blockchain will be chosen for you and you will be able to learn as you go (the DKG Node abstracts a lot of the complexities of blockchain for you). You shouldn't notice a big differences between blockchains while you are in development - this choice matters most when you are ready for your DKG Node deployment to mainnet.

For now you need to know the following:

  • a DKG node requires a blockchain to run

  • because of that, it will require a set of crypto tokens - TRAC for DKG features, and the native token of the chosen blockchain (if you choose the default, it will be NEURO as the native token of Neuroweb)

  • this will not cost you - the development setup leverages the DKG testnet, which utilizes test tokens which have no economic value and you can get for free (more info below). To run an agent on the DKG Mainnet however, you will need "real" tokens

What do you need for the installation?

  • A macOS or Linux machine with at least 8GB RAM and 20GB storage space (Windows version is on the way)

  • Node.js v22.20.0 or higher installed

  • About 15-30 minutes of your time to complete all the steps

OK, let's go!

1. First install the DKG-CLI

npm install -g dkg-cli

2. Generate the DKG Node Configuration

Your DKG Node allows for rich configuration (more on that in the Configuration section later), however this setup focuses on a minimal default configuration.

We recommend setting up your project folder and starting with the default development setup on DKG testnet.

# Make a new folder for your DKG Node project in your working directory
mkdir my_dkg_node
cd my_dkg_node

# If you're just getting started with the default blockchain - Neuroweb Testnet
dkg-cli setup-config --testnet

# Advanced: Pick a blockchain and environment. These are all the possible options for each blockchain
# dkg-cli setup-config --testnet --neuroweb   # NeuroWeb testnet
# dkg-cli setup-config --testnet --base       # Base testnet
# dkg-cli setup-config --testnet --gnosis     # Gnosis testnet
# dkg-cli setup-config --mainnet --neuroweb   # NeuroWeb mainnet
# dkg-cli setup-config --mainnet --base       # Base mainnet
# dkg-cli setup-config --mainnet --gnosis     # Gnosis mainnet

This will create an .env file with pre-generated DKG Node blockchain keys (learn more about DKG Node keys here). This is done for convenience, you can change those keys if you'd like

All DKG node wallets require native blockchain tokens, while the publishing wallet also requires TRAC tokens. Wallets generated by the setup command will be presented to you (as shown in the image below)

3. Funding wallets

As mentioned previously, your DKG Node requires tokens to be able to create Knowledge Assets.

To get tokens for DKG testnet, use the testnet token faucet. For DKG Mainnet deployments we suggest visiting the TRAC token page to check for its availability.

Here's an overview of supported blockchains and the needed tokens per key type.

Blockchain
Operational keys
Publish keys

NeuroWeb

NEURO

NEURO + TRAC

Base

ETH

ETH + TRAC

Gnosis

xDAI

xDAI + TRAC

4. Installing your DKG Node

dkg-cli install

5. Configure your DKG Agent

Run the agent setup script to enable LLM features. You'll be prompted for your LLM provider, API key, model name, and DKG environment (must match your setup-config choice: testnet or mainnet). The agent supports multiple providers; examples listed below.

cd /dkg-node/apps/agent
npm run build:scripts
npm run script:setup

DKG Node supports various LLM providers. Some examples include:

6. Start DKG Agent (MCP Server)

Once all services are up and running, you can start the DKG Agent (MCP Server). To do so, navigate to the dkg-node directory and execute the following command:

npm run dev

This starts the DKG Agent (MCP server) in development mode and exposes the Web UI.

7. UI & API access

Once the npm run dev command has been executed, the DKG Agent (MCP Server) will start, and the Web UI will become available for access. You can then interact with the system through both the web interface and the API as described below.

8. DKG Node management

This section covers the key aspects of managing your DKG Node, including DKG CLI commands, security and networking guidelines, and user management. It provides an overview of the core services, their default ports, and tools for controlling, monitoring, and maintaining your DKG Node environment.

8.1 DKG Node controls (using dkg-cli)

The DKG CLI provides essential commands for managing your DKG Node services, including dkg-engine, Blazegraph, and MySQL. These tools allow you to control, monitor, and inspect service statuses and logs efficiently.

# Checks the status of all DKG Node services (dkg-engine, Blazegraph, or MySQL)
dkg-cli status

# Starts the DKG Node (and all its services - dkg-engine, Blazegraph, MySQL etc)
# Automatically detects your OS and uses the appropriate service manager (systemd on Linux, pm2/brew on macOS)
dkg-cli start

# Start or stop the specified service
dkg-cli start dkg-engine
dkg-cli start blazegraph
dkg-cli start mysql
dkg-cli stop dkg-engine
dkg-cli stop blazegraph
dkg-cli stop mysql

# Restarts all DKG Node services
dkg-cli restart

# Restart a specific service
dkg-cli restart dkg-engine
dkg-cli restart blazegraph
dkg-cli restart mysql

# View logs (live)
dkg-cli logs dkg-engine --follow
dkg-cli logs blazegraph --follow
dkg-cli logs mysql --follow

# View last N lines (e.g., 50 lines)
dkg-cli logs dkg-engine -n 50
dkg-cli logs blazegraph -n 50
dkg-cli logs mysql -n 50

# Show help
dkg-cli --help

8.2 Creating new users

A createUser script is also included to simplify the creation of additional user accounts.

cd /dkg-node/apps/agent
npm run script:createUser
# Enter: email, password, permissions (e.g., `mcp llm blob scope123`)

8.3 Security & networking

.env file:

  • Contains sensitive data (wallet keys, passwords, API keys)

  • Never commit to version control

Services and Ports The following list provides an overview of which services are running locally and the ports they listen on:

  • 8081 — Web UI & API

  • 8900 — DKG Engine API

  • 3306 — MySQL

  • 6379 — Redis

Support

Last updated

Was this helpful?