nre/systemd/README.md
Tested using:
sui user and the /opt/sui directoriessudo useradd sui
sudo mkdir -p /opt/sui/bin
sudo mkdir -p /opt/sui/config
sudo mkdir -p /opt/sui/db
sudo mkdir -p /opt/sui/key-pairs
sudo chown -R sui:sui /opt/sui
wget https://releases.sui.io/$SUI_SHA/sui-node
chmod +x sui-node
sudo mv sui-node /opt/sui/bin
git clone https://github.com/MystenLabs/sui.git && cd sui
git checkout $SUI_SHA
cargo build --release --bin sui-node
mv ./target/release/sui-node /opt/sui/bin/sui-node
/opt/sui/key-pairs/If generated during the Genesis ceremony these will be at SuiExternal.git/sui-testnet-wave3/genesis/key-pairs/
Make sure when you copy them they retain sui user permissions. To be safe you can re-run: sudo chown -R sui:sui /opt/sui
/opt/sui/config/ directory.Add the paths to your private keys to validator.yaml. If you chose to put them in /opt/sui/key-pairs, you can use the following example:
protocol-key-pair:
path: /opt/sui/key-pairs/protocol.key
worker-key-pair:
path: /opt/sui/key-pairs/worker.key
network-key-pair:
path: /opt/sui/key-pairs/network.key
Place genesis.blob in /opt/sui/config/ (should be available after the Genesis ceremony)
Copy the sui-node systemd service unit file
File: sui-node.service
Copy the file to /etc/systemd/system/sui-node.service.
sudo systemctl daemon-reload
sudo systemctl enable sui-node.service
You may need to explicitly open the ports outlined in Sui for Node Operators for the required Sui Node connectivity.
Start the Validator:
sudo systemctl start sui-node
Check that the node is up and running:
sudo systemctl status sui-node
Follow the logs with:
journalctl -u sui-node -f
When an update is required to the Sui Node software the following procedure can be used. It is highly unlikely that you will want to restart with a clean database.
/opt/sui/bin/sudo systemctl stop sui-node
wget https://releases.sui.io/${SUI_SHA}/sui-node
chmod +x sui-node
sudo mv sui-node /opt/sui/bin/
sudo systemctl start sui-node