logo

Sui devnet guide

This manual will help you to start your node at SUI devnet

Install Linux dependencies

sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
tzdata \
ca-certificates \
build-essential \
libssl-dev \
libclang-dev \
pkg-config \
openssl \
protobuf-compiler \
cmake

Install Rust

sudo curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
rustc --version

Clone github repo

git clone https://github.com/MystenLabs/sui.git

Move to SUI folder and compile it

cd sui
git remote add upstream https://github.com/MystenLabs/sui
git fetch upstream
git checkout --track upstream/devnet
cargo build -p sui-node -p sui --release

Create directory for SUI db and genesis.

mkdir $HOME/.sui

Download genesis file

wget -P $HOME/.sui/genesis.blob  https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob

Make a copy of fullnode.yaml and update path to db and genesis file in it.

cp $HOME/sui/crates/sui-config/data/fullnode-template.yaml $HOME/.sui/fullnode.yaml
sed -i.bak "s|db-path:.*|db-path: \"$HOME\/.sui\/db\"| ; s|genesis-file-location:.*|genesis-file-location: \"$HOME\/.sui\/genesis.blob\"| ; s|127.0.0.1|0.0.0.0|" $HOME/.sui/fullnode.yaml

Create Service file for SUI Node

[Service]
User=$USER
Type=simple
ExecStart=/usr/local/bin/sui-node --config-path $HOME/.sui/fullnode.yaml
Restart=on-failure
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target" > $HOME/suid.service

mv $HOME/suid.service /etc/systemd/system/

Start SUI Full Node in Service.

sudo systemctl daemon-reload
sudo systemctl enable suid
sudo systemctl restart suid
journalctl -u suid -f