Skip to content

Install Rusk Manually

Rusk contains the software needed to run a Dusk node. Users can set specific compilation flags to configure their node for different roles, allowing it to perform tasks like participating in consensus, validating transactions, and storing historical data.

Rusk supports different feature setups:

The node software has been tested on x86-64/AMD64 and ARM architectures. The above node types have different hardware requirements, which can be found on their respective pages.

To install Rusk, you can either:

  • Use the node installer (recommended)
  • Build from source
  • Use docker (not recommended for production environment)

Requirements

This page is tailored for Linux servers, if you are using another operating system you may encounter compatibility issues.

Node Installer

If you want to spin up a Provisioner node on the Nocturne testnet, you can use the node installer script. This installer will set up Rusk as a service, preconfigure parts of the node, and provide a couple of helper scripts.

You can install Rusk with the default mainnet configuration by pasting the following command in your terminal:

Terminal window
curl --proto '=https' --tlsv1.2 -sSfL https://github.com/dusk-network/node-installer/releases/latest/download/node-installer.sh | sudo bash

Build from source

The majority of Dusk software is written in Rust. To compile our code, we will first need to make sure it’s installed. Refer to Rustup on how to install Rust.

Other Software Requirements: To follow the next steps, you need to have the following software installed:: curl, zip, libssl-dev, rustc, clang, gcc and git

To compile and run the Dusk node from source, run the following commands

Clone the Rusk repository. Make sure you modify the command to suit the branch you want to get. The command below will not necessarily fetch a branch compatible with the latest network release and specifications.

Terminal window
git clone https://github.com/dusk-network/rusk.git
cd rusk

Run the setup script in the scripts folder of rusk, which can take care of dependencies.

Terminal window
bash scripts/dev-setup.sh

Generate the keys used by the circuits:

Terminal window
make keys

Compile all the genesis contracts:

Terminal window
make wasm

Build the node:

Terminal window
cargo b --release -p rusk

Once your node is built, you can either run a Provisioner, an archive node or a Prover.

If you want to run a local cluster instead, you can check out the developer READMEs in the Rusk repository

Networking

As Dusk uses an ultra-efficient P2P UDP network protocol called Kadcast, the network requirements are minimal but should maintain symmetrical, stable, low-latency connections.

For external network connectivity, ensure that your firewall and router’s ports are forwarded correctly:

  • 9000/udp: Required for Kadcast consensus messages.
  • 8080/tcp: Optional HTTPS API for querying the node.

Docker Installation

This guide will take you through the process using Docker, for running a local Dusk node.

Docker packages applications into containers that include all dependencies, ensuring a consistent runtime environment. This ensures that software always runs consistently, regardless of where it is installed.

Prerequisites

  1. 🐳 Docker: If you don’t have Docker installed, please follow the official guide
  2. 🛜 Internet Connection: Required to download the Docker image and necessary files.
  3. 🛠️ Git: Optional, but recommended. Useful for retrieving the node code. Git can be downloaded here
  4. 💻 Terminal: To execute the steps in the Step-By-Step below, you will need to use a terminal application.
  5. 🎛️ x86-AMD64: To create the Docker Image, a processor with the x86-AMD64 architecture is required.

Step-by-Step Instructions

1. Get the Dusk node files

There are two ways to get the software, cloning the repository using git, or simply downloading from github

Terminal window
git clone https://github.com/dusk-network/rusk.git

2. Build Docker Image

With Docker installed and the repository files obtained, let’s build the Docker image. Note that this can take 15 to 20 minutes.

The most up to date commands can be found in the readme of the repository

Troubleshooting Tips

  • Installation Issues: Ensure your operating system is up-to-date, you have adequate permissions and all the necessary prerequisite software is installed.
  • Network Errors: Check your internet connection and verify UDP ports are open if connecting to an external network.