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)
- macOS - macOS Monterey
- Microsoft Windows - Windows 10 and 11
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.
In the right pane, find the Releases section.
Click the release tagged Latest to open the release's page.
In the Assets section of the release, select the .tgz compressed file that corresponds to your operating system.
Double-click the downloaded file. If the file doesn't automatically expand, manually unzip the file.
Open the expanded folder and double-click the appropriate binary to install, beginning with sui-
<OS>
-<ARCHITECTURE>
:- sui-faucet-
<OS>
-<ARCHITECTURE>
: Local faucet to mint coins on local network. - sui-indexer-
<OS>
-<ARCHITECTURE>
: An indexer for a local Sui network. - sui-
<OS>
-<ARCHITECTURE>
: Main Sui binary. - sui-node-
<OS>
-<ARCHITECTURE>
: Run a local node. - sui-test-validator-
<OS>
-<ARCHITECTURE>
: Run test validators on a local network for development. - sui-tool-
<OS>
-<ARCHITECTURE>
: Provides utilities for Sui.
The Sui binary takes several minutes to download and install files, so make sure you allocate enough time for it to complete. Actual time to complete depends on your network connection and computer specifications.
- sui-faucet-
Confirm the installation
To confirm that Sui installed correctly, type sui
and press Enter. You should see a message about the Sui version installed and help for using Sui commands.
Install 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.
- Linux
- macOS
- Windows
The prerequisites needed for the Linux operating system include:
- cURL
- Rust and Cargo
- Git CLI
- CMake
- GCC
- libssl-dev
- libclang-dev
- libpq-dev
- build-essential
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
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
The prerequisites needed for the macOS operating system include:
- Rust and Cargo
- Brew
- cURL
- CMake
- Git CLI
macOS includes a version of cURL you can use to install Brew. Use Brew to install other tools, including a newer version of cURL.
Brew
Use the following command to install Brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
All macOS prerequisites
With Brew installed, you can install individual prerequisites from the following sections or install them all at once with this command:
brew install curl cmake git
cURL
Use the following command to update the default cURL on macOS:
brew install curl
CMake
Use the following command to install CMake:
brew install cmake
To customize the installation, see Installing CMake on the CMake website.
Git CLI
Use the following command to install Git:
brew install git
After installing Git, download and install the Git command line interface.
The prerequisites needed for the Windows 11 operating system include:
- cURL
- Rust and Cargo
- Git CLI
- CMake
- C++ build tools
- LLVM compiler
cURL
Windows 11 ships with a Microsoft version of cURL already installed. If you want to use the curl project version instead, download and install it from https://curl.se/windows/.
Git CLI
Download and install the Git command line interface.
CMake
Download and install CMake from the CMake website.
Protocol Buffers
Download Protocol Buffers (protoc-xx.x-win32.zip or protoc-xx.x-win64.zip) and add the \bin directory to your Windows PATH environment variable.
Additional tools for Windows
Sui requires the following additional tools on computers running Windows.
- For Windows on ARM64 only - Visual Studio 2022 Preview.
- C++ build tools is required to install Rust.
- The LLVM Compiler Infrastructure. Look for a file with a name similar to LLVM-15.0.7-win64.exe for 64-bit Windows, or LLVM-15.0.7-win32.exe for 32-bit Windows.
Known issue - The sui console
command does not work in PowerShell.
Install Sui binaries from source
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
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 Sui binaries
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:
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui
Next steps
Now that you have Sui installed, it's time to start developing. Check out the following topics to start working with Sui:
- Read about the Sui CLI, the most straightforward way to start exploring Sui networks.
- Learn about the available networks and connect to one.
- Get some coins on a development network.
- Build your first dApp to start your on-chain journey.