Install the Site Builder
The site-builder is a CLI tool that lets you create, edit, and publish Walrus Sites. You can install it using suiup or a pre-built binary.
- Prerequisites
-
Install a recent version of Rust.
Installation
The stable branch of Walrus Sites is mainnet. Before deploying your site to production, make sure you pull the latest mainnet changes.
Using suiup
Install the site-builder using suiup, the recommended tool for managing and switching between different versions of Sui, Walrus, and other ecosystem tools.
First, install suiup:
$ curl -sSfL https://raw.githubusercontent.com/Mystenlabs/suiup/main/install.sh | sh
Make sure $HOME/.local/bin is in your PATH so your terminal can find the suiup binary. To check, run:
$ echo $PATH | tr ":" "\n"
Then, install the site-builder:
$ suiup install site-builder@mainnet
The site-builder will automatically be installed in $HOME/.local/bin. Confirm the installation with the command:
$ site-builder --help
Using a pre-built binary
A site-builderclient binary is available for Ubuntu, macOS (Apple and Intel CPUs), and Windows operating systems. You can download any of the binaries from the Google Cloud Storage (GCS) bucket using the links in the table below.
- Mainnet binaries
- Testnet binaries
| OS | CPU | Architecture |
|---|---|---|
| Ubuntu | Intel 64bit | site-builder-mainnet-latest-ubuntu-x86_64 |
| MacOS | Apple Silicon | site-builder-mainnet-latest-macos-arm64 |
| MacOS | Intel 64bit | site-builder-mainnet-latest-macos-x86_64 |
| Windows | Intel 64bit | site-builder-mainnet-latest-windows-x86_64.exe |
| OS | CPU | Architecture |
|---|---|---|
| Ubuntu | Intel 64bit | site-builder-testnet-latest-ubuntu-x86_64 |
| MacOS | Apple Silicon | site-builder-testnet-latest-macos-arm64 |
| MacOS | Intel 64bit | site-builder-testnet-latest-macos-x86_64 |
| Windows | Intel 64bit | site-builder-testnet-latest-windows-x86_64.exe |
If you prefer, you can also use a curl request to download the latest build from the GCS bucket. Ensure you set the $SYSTEM variable to your current system: ubuntu-x86_64, ubuntu-x86_64-generic, macos-arm64, macos-x86_64.
- Mainnet curl request
- Testnet curl request
$ curl https://storage.googleapis.com/mysten-walrus-binaries/site-builder-mainnet-latest-$SYSTEM -o site-builder
$ chmod +x site-builder
$ curl https://storage.googleapis.com/mysten-walrus-binaries/site-builder-testnet-latest-$SYSTEM -o site-builder
$ chmod +x site-builder
Once you have downloaded the site-builder binary, move it to any directory included in your $PATH environment variable. Standard locations are /usr/local/bin/, $HOME/bin/, or $HOME/.local/bin/. To view locations in your $PATH variable, run the command:
$ echo $PATH | tr ":" "\n"
Verify you can now run site-builder using the following command:
$ site-builder --help
If successful, the console responds:
Usage: site-builder [OPTIONS] <COMMAND>
Commands:
deploy Deploy a new site on Sui
publish Publish a new site on Sui
update Update an existing site
convert Convert an object ID in hex format to the equivalent Base36 format
sitemap Show the pages composing the Walrus site at the given object ID
help Print this message or the help of the given subcommand(s)
⋮
Installing on Windows
You can use Windows PowerShell to download the latest build from the GCS bucket.
(New-Object System.Net.WebClient).DownloadFile("https://storage.googleapis.com/mysten-walrus-binaries/site-builder-mainnet-latest-windows-x86_64.exe", "site-builder.exe")
Move site-builder.exe to a directory in your PATH:
$env:Path -split ';'
You can now run site-builder using the following command in PowerShell (note the lack of .exe extension):
site-builder
Configuration
To use site-builder commands to deploy Walrus Sites, the site-builder tool must be configured. Configuration is done using the sites-config.yaml configuration file. You can download the sites-config.yaml using the following command:
$ curl https://raw.githubusercontent.com/MystenLabs/walrus-sites/refs/heads/$NETWORK/sites-config.yaml -o ~/.config/walrus/sites-config.yaml
Replace $NETWORK with either testnet or mainnet depending on which network you want to deploy your site to. If you plan to test your site on Testnet first, then deploy on Mainnet afterwards, you will need to ensure the sites-config.yaml file contains configurations for both networks.
By default, site-builder requires the sites-config.yaml file to be in one of the following locations:
- The current working directory you are running
site-buildercommands from. You can print the current working directory to the console with the commandpwd. $XDG_CONFIG_HOME/walrus/~/.config/walrus/~/.walrus/
If the configuration file is not in one of these locations, and you do not specify the location of the file with the flag --config, you will see the following error when attempting to run any site-builder command:
Error during execution: could not find a valid sites configuration file; consider using the --config flag to specify the config
Specify a different directory by passing the --config flag to any site-builder command:
$ site-builder --config /path/to/sites-config.yaml deploy <build-directory-of-a-site>