Follow the instructions here to run your own Sui Full.
Hardware requirements#
Suggested minimum hardware to run a Sui Full node:
- CPUs: 8 physical cores / 16 vCPUs
- RAM: 128 GB
- Storage (SSD): 2 TB NVMe drive
Software requirements#
Sui recommends running Sui Full nodes on Linux. Sui supports the Ubuntu and
Debian distributions. You can also run a Sui Full node on macOS.
Make sure to update Rust.
Use the following command to install additional Linux dependencies.
plain textsudo apt-get update \ && sudo apt-get install -y --no-install-recommends \ tzdata \ libprotobuf-dev \ ca-certificates \ build-essential \ libssl-dev \ libclang-dev \ pkg-config \ openssl \ protobuf-compiler \ git \ clang \ cmake
Configure a Full node#
You can configure a Sui Full node either using Docker or by building from
source.
Using Docker Compose#
Follow the instructions in the Full node Docker Readme to run a Sui Full node using Docker, including resetting the environment.
Setting up a local Sui repository#
You must get the latest source files from the Sui GitHub repository.
- Set up your fork of the Sui repository:
- Go to the Sui repository on GitHub and click the Fork button in the top right-hand corner of the screen.
- Clone your personal fork of the Sui repository to your local machine (ensure that you insert your GitHub username into the URL):
plain textgit clone https://github.com/<YOUR-GITHUB-USERNAME>/sui.git
cd
into yoursui
repository:
plain textcd sui
- Set up the Sui repository as a git remote:
plain textgit remote add upstream https://github.com/MystenLabs/sui
- Sync your fork:
plain textgit fetch upstream
- Check out the branch associated with the network version you want to run (for example,
devnet
to run a Devnet Full node):
plain textgit checkout --track upstream/<BRANCH-NAME>
Setting up a Full node from source#
Open a Terminal or Console to the
sui
directory you downloaded in the previous steps to complete the following:- Install the required Prerequisites.
- Make a copy of the Full node YAML template:
plain textcp crates/sui-config/data/fullnode-template.yaml fullnode.yaml
- Download the genesis blob for the network to use:
plain textcurl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
plain textcurl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/testnet/genesis.blob
plain textcurl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/mainnet/genesis.blob
- Testnet Full nodes only: Edit the
fullnode.yaml
file to include peer nodes for state synchronization. Append the following to the end of the current configuration:
plain textp2p-config: seed-peers: - address: /dns/ewr-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: df8a8d128051c249e224f95fcc463f518a0ebed8986bbdcc11ed751181fecd38 - address: /dns/lax-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: f9a72a0a6c17eed09c27898eab389add704777c03e135846da2428f516a0c11d - address: /dns/lhr-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: 9393d6056bb9c9d8475a3cf3525c747257f17c6a698a7062cbbd1875bc6ef71e - address: /dns/mel-tnt-ssfn-00.testnet.sui.io/udp/8084 peer-id: c88742f46e66a11cb8c84aca488065661401ef66f726cb9afeb8a5786d83456e
- Optional: Skip this step to accept the default paths to resources. Edit the
fullnode.yaml
file to use custom paths.
- Update the
db-path
field with the path to the Full node database.
plain textdb-path: "/db-files/sui-fullnode"
- Update the
genesis-file-location
with the path togenesis.blob
.
plain textgenesis: genesis-file-location: "/sui-fullnode/genesis.blob"
- Optional: To save disk space on your Full node, add the following settings to your
fullnode.yaml
file to enable aggressive pruning:
plain textauthority-store-pruning-config: num-latest-epoch-dbs-to-retain: 3 epoch-db-pruning-period-secs: 3600 num-epochs-to-retain: 0 max-checkpoints-in-batch: 10 max-transactions-in-batch: 1000 use-range-deletion: true
Starting services#
At this point, your Sui Full node is ready to connect to the Sui network.
- Open a Terminal or Console to the
sui
directory.
- Start the Sui Full node:
plain textcargo run --release --bin sui-node -- --config-path fullnode.yaml
- Optional: Publish/subscribe to notifications using JSON-RPC via websocket.
If your setup is successful, your Sui Full node is now connected to the appropriate network.
Your Full node serves the read endpoints of the Sui JSON-RPC API at:
http://127.0.0.1:9000
.Troubleshooting#
If you receive a
cannot find -lpq
error, you are missing the libpq
library. Use sudo apt-get install libpq-dev
to install on Linux, or brew install libpq
on MacOS. After you install on MacOS, create a Homebrew link using brew link --force libpq
. For further context, reference the issue on Stack Overflow.If you receive the following error:
plain textpanicked at 'error binding to 0.0.0.0:9184: error creating server listener: Address already in use (os error 98)
Then update the metrics address in your fullnode.yaml file to use port
9180
.plain textmetrics-address: "0.0.0.0:9180"