Run a Sui DevNet fullnode locally for testing/experimenting by following the instructions below. This has been tested and should work for:
- linux/amd64
- darwin/amd64
- darwin/arm64
Install Docker / Docker Compose:
Download the latest version of the fullnode config fullnode-template.yaml over the web or by using curl
or wget
, for example:
wget https://github.com/MystenLabs/sui/raw/main/crates/sui-config/data/fullnode-template.yaml
Get the latest version of the Sui DevNet genesis genesis.blob file over the web or:
wget https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
To start the fullnode using Docker, run:
docker-compose up
Once the fullnode is up and running, test some of the JSON-RPC interfaces.
- Get the five most recent transactions:
curl --location --request POST 'http://127.0.0.1:9000/' \
--header 'Content-Type: application/json' \
--data-raw '{ "jsonrpc":"2.0", "id":1, "method":"sui_getRecentTransactions", "params":[5] }'
- Get details about a specific transaction:
curl --location --request POST 'http://127.0.0.1:9000/' \
--header 'Content-Type: application/json' \
--data-raw '{ "jsonrpc":"2.0", "id":1, "method":"sui_getTransaction", "params":["$RECENT_TXN_FROM_ABOVE"] }'
To use the Sui Explorer with your fullnode, follow these steps:
- Open a browser and go to: https://explorer.devnet.sui.io/
- Click the Devnet button in the top right-hand corner of the Explorer and select the Local network from the drop-down menu.
- Close the Choose a Network menu to see the latest transactions.
docker-compose up -d
docker-compose stop
Take everything down, removing the container and volume. Use this to start completely fresh (image, config, or genesis updates):
docker-compose down --volumes
Get the running container ID:
docker ps
Connect to a bash shell inside the container:
docker exec -it $CONTAINER_ID /bin/bash
Inspect the database:
ls -la suidb/
Update the json-rpc-address
in the fullnode config to listen on all addresses:
sed -i 's/127.0.0.1/0.0.0.0/' fullnode-template.yaml
-json-rpc-address: "127.0.0.1:9000"
+json-rpc-address: "0.0.0.0:9000"
Download each package. For example, on macOS use homebrew:
brew install wget curl