Sui DevNet Node Installation Guide

Prepare

Install Essential Packages

sudo apt update
sudo apt install -y --no-install-recommends tzdata ca-certificates build-essential pkg-config cmake  libssl-dev gcc libclang-dev

Install Rust

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

Install

Clone Source

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

Install Node and CLI

cargo build -p sui-node --release
cargo build -p sui --release

Move Binaries

sudo cp ~/sui/target/release/sui-node /usr/local/bin/
sudo cp ~/sui/target/release/sui /usr/local/bin/

Initialize

Set Up Folder

cd ~
mkdir .sui
cd .sui
cp ~/sui/crates/sui-config/data/fullnode-template.yaml fullnode.yaml
curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob

Edit fullnode.yaml

Change the following 2 lines in fullnode.yaml to align with your folder structure. Make sure to replace USER with your Linux user name.

db-path: "/home/USER/.sui/suidb"
genesis-file-location: "/home/USER/.sui/genesis.blob"

Launch

Create Service File

Create a sui.service file in the /etc/systemd/system folder with the following code snippet. Make sure to replace USER with your Linux user name. You need sudo previlege to do this step.

[Unit]
Description=Sui Daemon
After=network-online.target

[Service]
User=USER
ExecStart=/usr/local/bin/sui-node --config-path /home/USER/.sui/fullnode.yaml
Restart=always
RestartSec=5
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

Start Service

sudo -S systemctl daemon-reload
sudo -S systemctl enable sui
sudo -S systemctl start sui