Guide
Here is a node installation guide
Preparing the server for installation
sudo apt update && sudo apt upgrade -y
sudo apt install wget jq git libclang-dev libpq-dev cmake -y
Installing the latest version of Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Create a folder and clone the repository
mkdir -p $HOME/.sui
git clone https://github.com/MystenLabs/sui
cd sui
git remote add upstream https://github.com/MystenLabs/sui
git fetch upstream
git checkout -B testnet --track upstream/testnet
Build
cargo build --release
Moving binaries after build
mv $HOME/sui/target/release/{sui,sui-node,sui-faucet} /usr/bin/
cd
Downloading Genesis
wget -qO $HOME/.sui/genesis.blob https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob
Copy and change config
cp $HOME/sui/crates/sui-config/data/fullnode-template.yaml \
$HOME/.sui/fullnode.yaml
sed -i -e "s%db-path:.*%db-path: \"$HOME/.sui/db\"%; "\
"s%metrics-address:.*%metrics-address: \"0.0.0.0:9184\"%; "\
"s%json-rpc-address:.*%json-rpc-address: \"0.0.0.0:9000\"%; "\
"s%genesis-file-location:.*%genesis-file-location: \"$HOME/.sui/genesis.blob\"%; " $HOME/.sui/fullnode.yaml
If you have a firewall running, open ports
# Check status
ufw status
#If status active
sudo ufw allow 9000
sudo ufw allow 9184
Create Service file
printf "[Unit]
Description=Sui node
After=network-online.target
[Service]
User=$USER
ExecStart=`which sui-node` --config-path $HOME/.sui/fullnode.yaml
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/suid.service
Run your node
sudo systemctl daemon-reload
sudo systemctl enable suid
sudo systemctl start suid
Check your log
sudo journalctl -fn 100 -u suid
Check yor sync status
curl -slr POST 'http://127.0.0.1:9000/' \ --header 'Content-Type: application/json' \
--data-raw '{ "jsonrpc":"2.0", "id":1, "method":"sui_getTotalTransactionNumber", "params":[] }' | jq ".result"
Сheck the state of the node through the service
You must see this
Do not forget to enter the port, since it is not entered in the field, although it seems that it is entered
Logs
Last updated