Set up your custom DKG Node fork & update flow

Learn how to keep your DKG Node up to date with the latest features, bug fixes, and security patches. Includes guidance on safe upgrade practices so your node stays online and reliable.

Keeping your DKG Node up to date

The DKG Node is continuously evolving - new features, performance improvements, and security updates are released frequently. To stay current while keeping your custom modifications intact, you’ll maintain your own private fork of the DKG Node repository.

This setup allows you to:

  • Safely integrate official updates without overwriting local changes.

  • Experiment and customize your node codebase while staying compatible with the latest OriginTrail releases.

  • Stay stable and secure, ensuring your node runs the most reliable version of the network software.

In this section, you’ll learn how to structure your repository, pull updates from the official source, and merge them into your project with confidence.

How updates work

To receive new updates, you must maintain a private fork of the DKG Node monorepo. Your local project will use two git remotes:

  • origin pointing to your custom GitHub repository (private or public)

  • upstream pointing to the official DKG Node repository

This setup lets you safely pull in upstream changes while keeping your customizations.​

How to set up your project with update flow

1. Custom GitHub repository setup

Create a new repository on GitHub (private or public) where you'll store your DKG Node based project.

2. Clone the official DKG Node repo

git clone [email protected]:OriginTrail/dkg-node.git

3. Rename the folder

mv dkg-node your_project_namecd <your_project_name>

4. Configure remotes

Rename the original remote to upstream:

git remote rename origin upstream

5. Add your private repo as origin

git remote add origin [email protected]:your-username/<your-private-repo>.git

6. Push to your private repo

git push -u origin main

Your custom DKG Node repository is now set up with:

  • origin pointing to your private fork

  • upstream pointing to the official DKG Node

Configure and start your custom DKG Node project

Once this setup process is complete, you are ready to configure and run your custom DKG Node using the dkg-cli. The dkg-cli provides automated installation, configuration management, and service control for your DKG Node. Detailed instructions on how to use dkg-cli to configure your node, and manage its services are available in the Installation page under "Getting started" section.

Update your custom DKG Node project

When a new version of DKG Node is released, follow the process steps below to update your custom DKG Node project.

1. Fetch the latest changes from upstream:

git fetch upstream

2. Merge upstream changes into your project

git merge upstream/main

3. Resolve conflicts (if any)

Most projects will encounter differences between upstream and local changes. Review conflict markers in your code, then decide whether to keep, override, or blend changes.

4. Push the updated code to your repo

git push origin main

You’re up to date

At this point, your codebase is synced with the latest official DKG Node while keeping your customizations intact.

⚠️ Tips for smoother updates

  • Pull upstream updates regularly to avoid large conflict sets.

  • Always test your DKG Node after merging updates to ensure compatibility

Last updated

Was this helpful?