Sui Devnet Fullnode Install Guide

Artifact Staking
3 min readFeb 22, 2023

--

First Published February 22, 2023

This is a quick guide for setting up a fullnode on the Sui Devnet. We will be compiling from source on Ubuntu 22.04.

A devnet on any blockchain can be a very fluid situation and code, processes, and techniques can rapidly evolve. We will take steps to keep this guide updated with critical changes, however we can not promise that this will be up to date at all times.

Prerequisites

We strongly recommend that you run your node from a cloud provider or from a data center. Under no circumstances should you attempt to run a node from your home. The vast majority of homes do not have redundant power and internet connectivity, which means that it is likely that your node will be disconnected from the network at some point in time and you will not earn rewards.

A Quick Note on Cloud Providers

Generally speaking AWS and Hetzner are heavily used by validators across the entire cryptoverse. Feel free to use a major provider, but in the interest of decentralization we ask you to consider a mid-tier cloud provider such as VULTR, OVH, Contabo, Digital Ocean, or Linode.

Hardware Requirements

As of the time of this writing, the hardware requirements for Sui devnet are quite small. Please check the official documentation for the most up to date information.

CPU: 4 cores (Intel Xeon Skylake or newer).
Memory: 8GiB RAM.
300GB SSD
Operating System: Ubuntu 22.04 LTS

Initial Setup

Once you have logged into your Ubuntu 22.04 virtual server as root, the first step is to update your OS and install packages.

sudo apt-get install cmake && sudo apt-get install gcc && sudo apt-get install libssl-dev && sudo apt-get install pkg-config && sudo apt-get install libclang-dev && sudo apt-get install git-all && sudo apt-get install -y --no-install-recommends tzdata ca-certificates build-essential pkg-config cmake

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
rustup update stable

Check out the Sui source code

git clone https://github.com/MystenLabs/sui.git
cd sui
git checkout --track origin/devnet

Build Sui-Node Binary. This process will take 5–30 minutes depending on your hardware.

cargo build -p sui-node --release

Set up your working directory

cd ~
mkdir devnet
cd devnet

Copy node binary to working directory

cp ~/sui/target/release/sui-node ~/devnet/

Pull down the genesis.blob to the working directory

curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob

Copy the fullnode.yaml to the working directory

cp ~/sui/crates/sui-config/data/fullnode-template.yaml fullnode.yaml

You will need to edit the fullnode.yaml file to point to your working directory.

sudo nano fullnode.yaml

To exit nano: press CTL + X then press Y then press ENTER

Set up sui-node as a service

sudo tee /etc/systemd/system/suid.service > /dev/null <<EOF  
[Unit]
Description=Sui Daemon
After=network-online.target

[Service]
User=validator
ExecStart=/root/devnet/sui-node --config-path /root/devnet/fullnode.yaml
Restart=always
RestartSec=5
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target
EOF

Execute the service and view the log

sudo -S systemctl daemon-reload
sudo -S systemctl enable suid
sudo -S systemctl start suid
sudo journalctl -f -u suid

To exit the log stream: press CTL + C

Check to see if your node is catching up. Run this command a few times and you will notice that the checkpoint is incrementing up. If the checkpoint number does not change, then your node is not synching.

curl -q localhost:9184/metrics 2>/dev/null |grep '^highest_synced_checkpoint'

You can stop the Sui service with

sudo -S systemctl stop suid

That is it! Enjoy your new node and happy staking!!! 🥩🥩🥩

--

--

Artifact Staking

Artifact Staking is a cutting edge, forward leaning blockchain infrastructure provider.