Skip to main content

Install Sui

Install the Sui CLI and verify it works. The CLI creates and manages address balances, builds and publishes smart contracts, and queries information from the network.

Looking for something else?

This page covers installation only. For other common tasks:

  • Ubuntu 22.04 (Jammy Jellyfish) or newer

Quick install

You use the Sui CLI to interact with the Sui network, deploy packages, and manage assets. To install the Sui CLI, you can use suiup.

suiup is the most effective installation method, as it allows you to easily install and switch between different versions of not only the Sui CLI but also other Sui stack components like walrus and mvr.

Alternative quick install instructions for Homebrew or Chocolately do not support installing other Sui stack components. You need to install other components through their individual binaries if you'd like to use them in the future.

caution

Installations using Homebrew or Chocolatey might take several minutes if you do not have any of the Sui prerequisites installed. Using suiup is often much faster and highly recommended.

First, install suiup:

$ curl -sSfL \
https://raw.githubusercontent.com/Mystenlabs/suiup/main/install.sh \
| sh

Then, install Sui:

$ suiup install sui@testnet

For alternative installation methods, refer to the suiup repository.

danger

Installing Sui with suiup does not configure the client. To use sui commands, you must configure the Sui client.

To confirm that Sui installed correctly:

  1. Open a terminal or console
  2. Type sui --version and press Enter

If you receive a "command not found" error, verify the Sui binaries directory is in your PATH environment variable.

The quick install is suitable for most use cases. For those wanting more control over the installation process, you can install from source or install binaries.

If Sui is already installed from a previous development environment, be sure to upgrade to the latest version.

Verify the installation

After installing, open a new terminal and run:

$ sui --version

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

Looking for a project to clone?

Before you can create and publish a smart contract, you must configure a Sui client and obtain SUI tokens.

Then, you can create a "Hello, World!" example.

Installation details

suiup installation details

Refer to the suiup repository's README for information regarding installation files and their locations.

Default configuration file

Regardless of whether you used suiup, Homebrew, or Chocolately, Sui stores a primary configuration in the ~/.sui/sui_config/client.yaml file. This file defines settings and preferences for your environment, such as:

  • Network environment details for Mainnet, Testnet, Devnet, and Localnet networks.

  • Active environment, which specifies the network the CLI commands target.

  • Active address, which specifies the Sui address the CLI uses for transactions and queries.

  • Keystore location, which specifies where Sui stores your address' private keys.

Troubleshooting

Click to open
sui: command not found after installation

Open a new terminal window after installing. If the issue persists, verify that the shell can find the sui binary:

$ command -v sui

If no path is printed, the install directory is not in your PATH. The default suiup install location is ~/.local/bin (see suiup README). Add export PATH="$HOME/.local/bin:$PATH" to your shell profile (~/.bashrc, ~/.zshrc, or ~/.bash_profile), then restart your terminal.

Click to open
Client/server API version mismatch

Your local Sui CLI version does not match the network you are targeting. Switch to the correct version with suiup:

$ suiup install sui@testnet

Replace testnet with mainnet or devnet as needed.

Click to open
Homebrew or Chocolatey installation is slow

Homebrew and Chocolatey might compile dependencies from source if the package manager has not cached prebuilt binaries. This can take several minutes. For a faster installation, use suiup instead:

$ curl -sSfL https://raw.githubusercontent.com/MystenLabs/suiup/main/install.sh | sh
$ suiup install sui@testnet
Click to open
Permission denied during installation

Do not use sudo to install Sui. The suiup installer writes to your home directory and does not require elevated privileges. If a previous installation used sudo, remove it first:

$ sudo rm -f /usr/local/bin/sui

Then reinstall with suiup.

Click to open
Multiple Sui versions installed

If you previously installed Sui through Homebrew, Cargo, or a manual binary and also have suiup, you might have conflicting versions. Check which binary is active:

$ which sui
$ sui --version

Remove the older installation method and use suiup exclusively to manage versions. Run suiup install sui@<network> to switch between network-compatible versions.

Next steps

Configure a Sui Client

Configure a Sui client to get a Sui address and connect to Testnet.

Get SUI from Faucet

Obtain SUI from a faucet to deploy packages on Testnet.

Hello, World!

Clone the "Hello, World!" project.