Skip to main content

Install from Source

You can install Sui from source, either locally or directly from GitHub.

tip

These instructions are for special use cases. The recommended way to install and manage Sui is suiup. Use it unless you have a specific reason to install from source or binaries.

At minimum, you need Rust and Cargo installed for the Sui framework. Cargo comes bundled with Rust, so installing Rust also installs Cargo:

  • Download and install Rust and Cargo:

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

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

    $ rustup update stable

    Depending on your operating system, you might require additional prerequisites. Expand Additional prerequisites to check the requirements for your operating system.

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 installer places the Sui components 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

The --features tracing flag enables the tracing feature described in the following note.

info

The tracing feature enables trace-based debugging, profiling, and Move test coverage support in the Sui CLI. It adds minimal runtime overhead unless you are actively using those features.

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-nodeRun a local node.
sui-test-validatorRun test validators on a local network for development.
sui-toolProvides utilities for Sui.

How do I verify the installation?​

After installing, open a new terminal and run:

$ sui --version

If the installation succeeded, the command prints the installed Sui version.