Skip to main content

Install from Source

tip

These instructions are for special use cases. For most users, Quick Install shows the best way to install Sui.

You can install Sui from source, either locally or directly from GitHub. At minimum, you will need Rust and Cargo installed for the Sui framework:

  • Download and install Rust:

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

    If you have Rust installed, update to the latest version:

    $ rustup update stable
  • Download and install Cargo:

    $ curl https://sh.rustup.rs -sSf | sh

    Depending on your operating system, you may require additional prerequisites.

Click to open

Additional prerequisites

Most modern MacOS systems have Homebrew and cURL preinstalled.

  • Download and install Homebrew:

    $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Download and install CMake:

    $ brew install cmake

    Verify installation with

    $ cmake --version
  • Download and install libpq:

    $ brew install libpq

    Verify installation with

    $ libpq --version
  • Download and install PostgreSQL.

You can install from source either directly from GitHub or from your local drive. Regardless of which install from source method you use, the Sui components are found in the ~/.cargo/bin folder.

You can also download the source code to locally access files.

Use Cargo to install Sui directly from the GitHub repo:

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

The tracing feature enables Move test coverage and debugger support in the Sui CLI. These features are not available unless you enable tracing.

Replace the testnet branch in the previous command if necessary. Available options are:

  • main: Latest updates. Least stable.
  • devnet: Includes experimental features.
  • testnet: Includes beta features.
  • mainnet: Stable release.

You can build and install additional packages as needed. Replace sui in the previous command with the package name in the following table.

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.
Install Sui

Install the Sui framework and its required prerequisites on your system.

Install from Binaries

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.