# SUI Network - complete guide to run a Node & Validator

By [GLCstaked](https://paragraph.com/@glcstaked) · 2022-08-03

---

[SUI](https://sui.io) is a layer 1 blockchain designed by [Mysten Labs](https://mystenlabs.com/) from the ground up in smart contract specific language called [MOVE](https://docs.sui.io/build/move)

This guide will go over installing a Full Node and Validator from scratch in order to run a Sui network node, assumes a fresh install of Ubuntu 20.04LTS.

**Hardware Requirements**:

Node Requirements: Full node requirements are lower, but storage can be expected to increase over time

CPUs: 2 RAM: 8GB Storage: 50GB

Validator Requirements: Validators perform work and deal with chain consensus, requirements are much higher.

![](https://storage.googleapis.com/papyrus_images/932852a329a334e4652991bde0018db618cdeabe930c7feff43f898593e2a115.png)

Sui Full Node- Build from source
--------------------------------

### 1.     Start Up -initialize device

Update your system

    sudo apt update && sudo apt upgrade -y
    

**Firewall Settings**

We will enable ports 8080 & 9000, don’t forget to enable your SSH port if you also require remote access.

    sudo ufw allow 8080/tcp
    sudo ufw allow 9000/tcp
    sudo ufw allow 9184/tcp
    sudo ufw allow 22/tcp        # sudo ufw allow ssh
    sudo ufw enable
    

Check status

    sudo ufw status  
    

Good idea to check if you can still remote into server at this point before continuing

### 2\. install prerequisite software for Sui

We need a lot of dependencies in order to run SUI

**Install the following packages**

    sudo apt-get update \
    && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get install -y --no-install-recommends \
    tzdata \
    git \
    ca-certificates \
    curl \
    build-essential \
    libssl-dev \
    pkg-config \
    libclang-dev \
    cmake
    

**Install Rust**

We will be using the latest version of the Cargo toolchain to build and manage the dependencies. You will need Cargo to build and install Sui on your machine.

check for current installation

    cargo --version
    rustc --version
    

Download Rust and Cargo from script

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    

you will be prompted with options, select 1 for default installation

run, to include  `PATH` environment variable to include Cargo's bin directory `($HOME/.cargo/bin).`

    source $HOME/.cargo/env
    

    rustup update stable
    

Should you need to uninstall

    rustup self uninstall
    

### 3\. install form Sui from Git

we will first fork the repository to our own account, you need to log into your `github.com` account and fork from

[

GitHub - MystenLabs/sui: Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language - MystenLabs/sui

https://github.com

![](https://storage.googleapis.com/papyrus_images/26ad9bb5ddf0f26eecaf07840481b8886414769dfc9ab069d66b426720ef9367.png)

](https://github.com/MystenLabs/sui)

back to the terminal of your device, clone the forked repository

    git clone https://github.com/<YOUR-GITHUB-USERNAME>/sui.git
    

change to our working directory

    cd sui
    

Set up the Sui repository as a git remote

    git remote add upstream https://github.com/MystenLabs/sui
    

Sync your fork

    git fetch upstream
    

check out the devnet branch

    git checkout --track upstream/devnet
    

make copy of the [fullnode configuration template](https://github.com/MystenLabs/sui/blob/main/crates/sui-config/data/fullnode-template.yaml):

    cp crates/sui-config/data/fullnode-template.yaml fullnode.yaml
    

Download the latest `genesis` state for Devnet by clicking that link or by running the following in your terminal

    curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
    

**Optional - Specify working paths**

skip for now

### 4\. Create a System service to Run Sui

**Create A Service**

We will create a system service to run SUI in the background as a continuous process allowing the node to remain active

    sudo tee <<EOF >/dev/null /etc/systemd/system/sui-node.service
    [Unit]
    Description=Sui node
    After=network-online.target
    [Service]
    User=$USER
    WorkingDirectory=/$HOME/sui
    ExecStart=/$HOME/.cargo/bin/cargo run --release --bin sui-node -- --config-path /$HOME/sui/fullnode.yaml
    Restart=on-failure
    RestartSec=3
    LimitNOFILE=65535
    [Install]
    WantedBy=multi-user.target
    EOF
    

Enable and Start our Service- this will start our node

    sudo systemctl enable sui-node
    sudo systemctl daemon-reload
    sudo systemctl start sui-node
    

To check the status of the service

    sudo systemctl status sui-node
    

To output the logs

    journalctl -u sui-node.service -f
    

Our full node will be running in the background and should look something like this

![](https://storage.googleapis.com/papyrus_images/ec7d679b58a922a9ffe13599fe378284bcfc9f09bbec8dab98f4411df9dddca9.png)

**Find your Node**

check that your node is reachable externally and can be reached by other peers, community member build this tool to check on

[

SUI NODETESTER
--------------

Sui Node Tester With Love From Andrew | zValid

https://node.sui.zvalid.com



](https://node.sui.zvalid.com/)

to do this you may need to change the default settings in your `fullnode.yaml` config, follow the steps under ‘making changes to the node’ to do this. We need to make sure the `metrics-address` and `json-rpc-address` in the `fullnode.yaml` is 0.0.0.0 (it was 127.0.0.1 for me) like so

![](https://storage.googleapis.com/papyrus_images/fdf8d07e5f9f74ed6ce228f8e0c0e8e2389e252edcabb31f6a99f4977848b1ce.png)

### Other Useful Commands

**Making changes to the Node**

Stop the Node service

    sudo systemctl stop sui-node
    

you can confirm its stopped with

    sudo systemctl status sui-node
    

Locate and open the config file, you can find this with `ls -la`, and exploring the folders, it should be here by default though

    cd sui 
    

open the config, and edit in the terminal, `ctrl+o` to write the changes and `ctrl+x` to exit back to the terminal

    nano fullnode.yaml 
    

Restart the service

    sudo systemctl daemon-reload
    sudo systemctl restart sui-node
    

Updating Sui Full Node- for Re-Genesis
--------------------------------------

to upgrade Sui full node, follow this process. NOTE: this is for a re-genesis upgrade which requires a clean db and full restart. Keep and eye on [SUI discord](https://sui.io/#community) for devnet updates.

**Stop the node**

    sudo systemctl stop sui-node
    

**Move to working directory**

    cd sui
    

**Remove the old on-disk database and 'genesis.blob' file**

    rm -r suidb genesis.blob
    

**Fetch the source from the latest release**

    git fetch upstream
    

**Reset branch**

    git checkout -B devnet --track upstream/devnet
    

**Download the latest genesis state for Devnet**

    curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
    

**Restart your node**

    sudo systemctl daemon-reload
    sudo systemctl restart sui-node
    

this will take a while to compile all the packages and start to sync again, NOTE: your full node will once again be running at: [http://127.0.0.1:9000](http://127.0.0.1:9000)

so we need to make changes to the .yml to ’find your node’, follow the sections for making changes and ‘find your node’

Sui Wallet
----------

Sui Wallet is an open-sourced wallet for SUI network, allowing users the ability to create an address, view and manage assets on the Sui network, and interact with dApps. This is now available on [Devnet](https://sui.io/resources-sui/introducing-sui-wallet/?utm_source=twitter&utm_medium=social&utm_campaign=twwallet) for testing, so we can experiment with SUI features on devnet.

Download the Chrome extension from the store

[

Slush - A Sui wallet - Chrome Web Store
---------------------------------------

Your Sui super app

https://chromewebstore.google.com

![](https://storage.googleapis.com/papyrus_images/032b934db116bd623cabf916e381ee0ce83aa253f24bfcd427c2f0ec64832894.jpg)

](https://chrome.google.com/webstore/detail/sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil)

Create a new account, click on the application > get started > create new account

![](https://storage.googleapis.com/papyrus_images/7968aeecda5d10841c37bdb759a7d1ec8d097ad4e065866c6098f963e946c92b.png)

Agree to the terms of service and click ‘Create’

![](https://storage.googleapis.com/papyrus_images/29cd2f3d5444596a586935e81dfbccd09c17c4a87119713920cd2de2f34dd51a.png)

Here you will be prompted with a Seed Phrase, which is the only way to recover your account. Save this and find your wallet address here.

![](https://storage.googleapis.com/papyrus_images/f42a22b3ad60f320a7756e2778b73262c8ba535ff05ee2e480b7de5079d0498e.png)

**Request Tokens**

These are testnet tokens with no value but you can experiment and get involved early to get familiar with SUI before mainnet release

Now head over to the SUI discord, facet channel to request testnet tokens to your wallet like so

![](https://storage.googleapis.com/papyrus_images/162d610c478fdf9cd7ce165afc147d63cf45a57ad999bc039e4128bd67f4b546.png)

There’s a few features within the wallet we can test out, such as minting an NFT

![Found on the top right of the extension, click to expand](https://storage.googleapis.com/papyrus_images/d6dd614d6fc635587dd7b4166c1d68a4eda2f2b95ecbe7eb5f58054c6201d3c1.png)

Found on the top right of the extension, click to expand

### Full Node with Docker compose– (pending)

Sui Validator Node- (pending)
-----------------------------

---

*Originally published on [GLCstaked](https://paragraph.com/@glcstaked/sui-network-complete-guide-to-run-a-node-validator)*
