Skip to main content

Install Sui

The quickest way to install Sui is using the binaries delivered with every release. If you require more control over the install process, you can install from source. To take advantage of containerization, you can utilize the Docker images in the docker folder of the sui repository.

Supported operating systems

Sui supports the following operating systems:

  • Linux - Ubuntu version 20.04 (Bionic Beaver) or later
  • macOS - macOS Monterey or later
  • Microsoft Windows - Windows 10 and 11
Fastest method

Quick install using Homebrew or Chocolatey

Use one of the following commands for Homebrew (MacOS, Linux, or Windows Subsystem for Linux) or Chocolatey (Windows) to install Sui.

brew install sui
note

If you use this method to install Sui, you are all set. The quick install is suitable for most use cases. The remaining installation methods are for those wanting more control over the installation process.

Download binaries from GitHub

Each Sui release provides a set of binaries for several operating systems. You can download these binaries from GitHub and use them to install Sui.

  1. Go to https://github.com/MystenLabs/sui.

  2. In the right pane, find the Releases section.

    Sui releases in GitHub

  3. Click the release tagged Latest to open the release's page.

  4. In the Assets section of the release, select the .tgz compressed file that corresponds to your operating system.

  5. Extract all files from the .tgz file into the preferred location on your system. These instructions assume you extract the files into a sui folder at the user root of your system for demonstration purposes. Replace references to this location in subsequent steps if you choose a different directory.

  6. Navigate to the expanded folder. You should have the following extracted files:

    NameDescription
    move-analyzerLanguage Server Protocol implementation.
    suiMain Sui binary.
    sui-bridgeSui native bridge.
    sui-data-ingestionCapture Full node data for indexer to store in a database.
    sui-faucetLocal faucet to mint coins on local network.
    sui-graphql-rpcGraphQL service for Sui RPC.
    sui-nodeRun a local node.
    sui-test-validatorRun test validators on a local network for development.
    sui-toolProvides utilities for Sui.
  7. Add the folder containing the extracted files to your PATH variable. To do so, you can update your ~/.bashrc to include the location of the Sui binaries. If using the suggested location, you type export PATH=$PATH:~/sui and press Enter.

  8. Start a new terminal session or type source ~/.bashrc to load the new PATH value.

info

Running binaries other than sui might require installing prerequisites itemized in the following section.

Confirm the installation

To confirm that Sui installed correctly, type sui --version in your console or terminal and press Enter. The response should provide the Sui version installed. If the console or terminal responds with a command not found error, make sure the full path to your Sui binaries is included in your PATH variable.

Install from Cargo

Run the following command to install Sui binaries from the testnet branch:

cargo install --locked --git https://github.com/MystenLabs/sui.git --branch testnet sui --features tracing

Enabling the tracing feature is important as it adds Move test coverage and debugger support in the Sui CLI. Without it these two features will not be able to be used.

The install process can take a while to complete. You can monitor installation progress in the terminal. If you encounter an error, make sure to install the latest version of all prerequisites and then try the command again.

To update to the latest stable version of Rust:

rustup update stable

The command installs Sui components in the ~/.cargo/bin folder.

Upgrade from Cargo

If you previously installed the Sui binaries, you can update them to the most recent release with the same command you used to install them (changing testnet to the desired branch):

cargo install --locked --git https://github.com/MystenLabs/sui.git --branch testnet sui --features tracing

The tracing feature is important as it adds Move test coverage and debugger support in the Sui CLI. Unless it is enabled you will not be able to use these two features.

Build from source

Follow the instructions in this topic to install the Rust crates (packages) required to interact with Sui networks, including the Sui CLI.

To install Sui from source, you first need to install its prerequisites for your operating system. After installing the supporting technologies, you can install Sui binaries from source.

You can also download the source code to have local access to files.

Prerequisites

Your system needs the following prerequisites available to successfully install Sui.

Rust and Cargo

Sui requires Rust and Cargo (Rust's package manager) on all supported operating systems. The suggested method to install Rust is with rustup using cURL.

Some other commands in the installation instructions also require cURL to run. If you can't run the cURL command to install Rust, see the instructions to install cURL for your operating system in the following section before you install Rust.

Use the following command to install Rust and Cargo on macOS or Linux:

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

If you use Windows 11, see information about using the Rust installer on the Rust website. The installer checks for C++ build tools and prompts you to install them if necessary. Select the option that best defines your environment and follow the instructions in the install wizard.

For additional installation options, see Install Rust.

Sui uses the latest version of Cargo to build and manage dependencies. See the Cargo installation page on the Rust website for more information.

Use the following command to update Rust with rustup:

rustup update stable

Additional prerequisites by operating system

Select the appropriate tab to view the requirements for your system.

The prerequisites needed for the Linux operating system include:

  • cURL
  • Rust and Cargo
  • Git CLI
  • CMake
  • GCC
  • libssl-dev
  • libclang-dev
  • libpq-dev (optional)
  • build-essential
info

The Linux instructions assume a distribution that uses the APT package manager. You might need to adjust the instructions to use other package managers.

Install the prerequisites listed in this section. Use the following command to update apt-get:

sudo apt-get update

All Linux prerequisites

Reference the relevant sections that follow to install each prerequisite individually, or run the following to install them all at once:

sudo apt-get install curl git-all cmake gcc libssl-dev pkg-config libclang-dev libpq-dev build-essential

cURL

Install cURL with the following command:

sudo apt-get install curl

Verify that cURL installed correctly with the following command:

curl --version

Git CLI

Run the following command to install Git, including the Git CLI:

sudo apt-get install git-all

For more information, see Install Git on Linux on the GitHub website.

CMake

Use the following command to install CMake.

sudo apt-get install cmake

To customize the installation, see Installing CMake on the CMake website.

GCC

Use the following command to install the GNU Compiler Collection, gcc:

sudo apt-get install gcc

libssl-dev

Use the following command to install libssl-dev:

sudo apt-get install libssl-dev

If the version of Linux you use doesn't support libssl-dev, find an equivalent package for it on the ROS Index.

(Optional) If you have OpenSSL you might also need to also install pkg-config:

sudo apt-get install pkg-config

libclang-dev

Use the following command to install libclang-dev:

sudo apt-get install libclang-dev

If the version of Linux you use doesn't support libclang-dev, find an equivalent package for it on the ROS Index.

libpq-dev (optional)

info

You need libpq-dev only if you plan to use the --with-indexer and --with-graphql flags with sui start. See Local Network for more information.

Use the following command to install libpq-dev:

sudo apt-get install libpq-dev

If the version of Linux you use doesn't support libpq-dev, find an equivalent package for it on the ROS Index.

build-essential

Use the following command to install build-essential:

sudo apt-get install build-essential

Using Sui from command line

With Sui installed, you can interact with Sui networks using the Sui CLI. For more details, see the Sui CLI reference.

Next steps

Now that you have Sui installed, it's time to start developing. Check out the following topics to start working with Sui: