Skip to content

Files

Latest commit

b7661f2 Β· Aug 24, 2022

History

History

SUI

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 24, 2022

1. Requirements

Officials:

2vCPU/8 GBRAM/50 GBSSD

Running the server on:

2vCPU/8 GBRAM/80 GBSSD

I recommend Hetzner.

I recommend MobaXTerm for SSH terminal.

2. Server Preparation

sudo apt update && sudo apt upgrade -y
sudo apt install make clang pkg-config libssl-dev libclang-dev build-essential git curl ntp jq llvm tmux htop screen unzip cargo cmake -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

In the process, press "y" and press "1".

source "$HOME/.cargo/env"

3. Node Installation

mkdir .sui
git clone https://github.com/MystenLabs/sui.git
cd sui
git remote add upstream https://github.com/MystenLabs/sui
git fetch upstream
git checkout -B devnet --track upstream/devnet
cp crates/sui-config/data/fullnode-template.yaml fullnode.yaml
curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
git checkout 8a29394515eaf520cc6fa54bca8ce0c22db0dbc8
cargo build --release -p sui-node

4. Let's configure our node.

cd
mv sui/fullnode.yaml .sui
mv sui/genesis.blob .sui
nano .sui/fullnode.yaml

Open the file and change the line genesis-file-location: "genesis.blob" on genesis-file-location: "/root/.sui/genesis.blob"

Save and close with CTRL+X,Y, Enter

cp sui/target/release/sui-node /usr/bin

Create a systmed file. Copy everything below in its entirety

tee /etc/systemd/system/suid.service > /dev/null <<EOF
[Unit]
Description=sui
After=network-online.target
[Service]
User=root
ExecStart=/usr/bin/sui-node --config-path /root/.sui/fullnode.yaml
Restart=always
RestartSec=3
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF

5. Launch our node.

sed -i.bak "s/127.0.0.1/0.0.0.0/" /root/.sui/fullnode.yaml
systemctl daemon-reload
systemctl enable suid
systemctl start suid
journalctl -u suid -f

6. Checking our node.

In order to check our node, we need to go to https://node.sui.zvalid.com/ and enter our IP address

If you have the same as in the picture below, all is well and your node is working.

7. Update (if an update came out, then...)

systemctl stop suid
rm -rf /suidb
rm -rf /root/sui/suidb/
rm -rf /root/.sui/genesis.blob
wget -O /root/.sui/genesis.blob https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
cd sui
git fetch upstream
git stash
git checkout -B devnet --track upstream/devnet
cargo build --release -p sui-node
cp target/release/sui-node /usr/bin
systemctl restart suid
journalctl -u suid -f

8. Useful commands.

View version

curl -s -X POST http://127.0.0.1:9000/ -H 'Content-Type: application/json' -d '{ "jsonrpc":"2.0", "method":"rpc.discover","id":1}' | jq .result.info

or

grep 'version =' /root/sui/crates/sui/Cargo.toml -m 1

9. Deleting a node

systemctl stop suid
rm -rf /suidb
rm -rf sui
rm -rf .sui
rm -rf /etc/systemd/system/suid.service

In order to use the wallet, you do not need to connect your node. Just install the extension and make a couple of transactions plus NFT Mint. You can find detailed instructions here.

πŸ‘‰Hetzner β€” server rental

πŸ‘‰SSH terminal MobaxTerm

πŸ‘‰Discord

πŸ‘‰WebSite

πŸ‘‰Official guide

πŸ‘‰GitHub

πŸ‘‰Here you can check your node

πŸ‘‰Wallet Instructions.

πŸ”°My Telegram Channel

Pavel-LV | C.Sailors#7698 / @SeaInvestor