Walrus Site Deployment TUTORIAL
[ Preface ]
Using Web3 concepts to optimize (or even replace) existing Web2 services has always been an important direction in blockchain development. In the past, we have often seen many experimental products emerge in the market, but product development was never a simple task, and many attempts easily fade away after sparking initial discussions.
The other day on X, I saw that Walrus (https://www.walrus.xyz/), a decentralized storage service, can be used for website deployment. After trying it out, I found it quite smooth, and I'm writing this simple record with the goal of deploying a website on Walrus.
Note
- This content is performed using Mac, and if you are using a different environment, you can refer to the official documentation (https://docs.walrus.site/walrus-sites/intro.html) for modifications. However, the concepts and steps are basically the same
- Currently (2024/12/01), Walrus Site is still on testnet, and the content in this article may not be applicable when it is officially launched on mainnet

[ Deploying a Website to Walrus ]
1. Environment Setup: The goal is to enable your computer to deploy websites to Walrus
1.1 Install Rust Package Manager Cargo
rustup-init
1.2 Install Sui CLI
1.3 Switch Environment to Testnet
sui client switch --env testnet
1.4 Install Walrus
Here, use the officially pre-compiled binary https://mystenlabs.github.io/walrus-docs/usage/setup.html

1.5 Obtain Sui on Testnet
2. Website Deployment: The purpose is to deploy a specified website to Walrus
2.1 Download and Install the Official Walrus-Sites
cd walrus-sites
cargo build --release
2.2 Deploy the Snake Game Website from Walrus-Sites Example Code
2.3 Obtain Deployed Website URL

The red area in the image is the deployed website URL https://2wrfk752zp9l8x1csitemjl0tom9duh25weja8eoqu5puapb6f.walrus.site/. You can try opening it in your browser to see if the website loads!
The object ID 0x74c1ede4c194f938674b244c060e70130d75e876b00dba316bbb470b637756d7 in the image is the resource ID of this website on SUI
3. Subdomain Name Setting: The Purpose is to Make the Website URL More Readable
https://2wrfk752zp9l8x1csitemjl0tom9duh25weja8eoqu5puapb6f.walrus.site/ is a difficult-to-read URL, which we can improve by using the Sui Name Service to assign a meaningful name.
3.1 Purchase a SuiNS Name: https://testnet.suins.io/

3.2 Link the Purchased SuiNS Name to the Website's Object ID


Now you can access the previously deployed website using the purchased domain https://my-walrus-test.walrus.site/!
[ Conclusion ]
In fact, the Walrus website hosting service has been online for quite some time now, and I'm realizing this a bit late.
Similar to how AI has become a marketing buzzword in recent years, seemingly promising a bright future just by applying its label — the same phenomenon has been frequently observed in blockchain development. As a new type of network infrastructure with inherent economic attributes, blockchain offers developers and users many possibilities that require more services like Walrus.