sudo apt update
sudo apt install -y --no-install-recommends tzdata ca-certificates build-essential pkg-config cmake libssl-dev gcc libclang-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
rustup update stable
git clone https://github.com/MystenLabs/sui.git
cd sui
git checkout --track origin/devnet
cargo build -p sui-node --release
cargo build -p sui --release
sudo cp ~/sui/target/release/sui-node /usr/local/bin/
sudo cp ~/sui/target/release/sui /usr/local/bin/
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
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"
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
sudo -S systemctl daemon-reload
sudo -S systemctl enable sui
sudo -S systemctl start sui