Crust Wiki

Crust Wiki

  • 文档
  • 主网
  • 贡献
  • Languages icon中文
    • English
    • Help Translate

›构建

概览

  • 开始
  • Shadow Bridge
  • CSM 认领

学习

  • 即将到来

构建

  • 即将到来

节点

  • 即将到来

存储

  • 即将到来

Maxwell

    概览

    • 开始
    • 预览网 Maxwell
    • Crust Grants
    • Ethereum Bridge
    • CRU 转回
    • CRU18 认领
    • CSM 转回
    • Crust 钱包
    • 术语表
    • 社区
    • 贡献

    学习

    • 账户
    • Crust 通证
    • 新增绑定
    • sWorker
    • 担保人
    • 验证人
    • 存储商户
    • GPoS
    • 去中心化存储市场
    • BitSwap
    • 民主指南

    构建

    • 开始
    • Hello Crust
    • Crust Rocky Network
    • 代码示例:使用Crust
    • Crust SDK
    • 总览
    • 部署和运行网站
    • 内容存储与分发
    • NFT数据存储
    • Crust Storage Manager
    • Crust Node

    节点

    • 节点概要
    • 节点硬件指南
    • Owner 节点
    • Member 节点
    • Isolation 节点
    • 验证人指南
    • 担保人指南
    • 参数表
    • Q&A

    存储

    • 概览
    • 存储用户指南
    • 存储商户指南
    • 存储订单清算指南
    • 使用Crust Apps 存储的问题
    • Crust 存储浏览器
    • Q&A
Translate

Hello Crust

This doc will walk you through a typical process to save and publish a simple website in Crust Network, to help you understand the basic steps to use Crust before you write any code. In this tutorial, we will build a simple React website, put to IPFS, and leverage Crust to store and pin it. The techniques you'll learn in the tutorial are fundamental to building with Crust Storage, and mastering it will give you a deep understanding of Crust storage functions.

Hello, Crust

1. Setup Crust CLI

Please make sure you have Node.js env, refer to this to install.

  • Install Crust Command Line
sudo npm i -g @crustio/crust-cli
  • Create a React app
npx create-react-app hello-crust
  • Build it
cd hello-crust/
PUBLIC_URL=./ npm run build

2. Store, Pin and Publish

Please make sure you have IPFS running locally, refer to this to install and run.

  • Login with seeds

SEEDS are 12 secret words of your Crust Account. You can refer to this to create your Crust Account.

crust-cli login [SEEDS]
  • Pin build/
crust-cli pin build/

You'll get an IPFS cid in this step, like QmYene5icko1cusFCG9D92YUyfonN4hmRPNdPkxvJkNjTb.

  • Publish build/
crust-cli publish QmYene5icko1cusFCG9D92YUyfonN4hmRPNdPkxvJkNjTb

Now your website is published into Crust Network. Storage nodes in Crust Network will get notified and try to pull your website to store.

3. Query status

After you publish your website, you can run this command to monitor if your website is picked by any storage nodes

crust-cli status QmYene5icko1cusFCG9D92YUyfonN4hmRPNdPkxvJkNjTb
✅ QmYene5icko1cusFCG9D92YUyfonN4hmRPNdPkxvJkNjTb picked, replicas: 24

4. Access it

Congrats, you can now access your website via any standard IPFS interface and gateway, such as following public IPFS gateway that Crust contributes:

https://crustwebsites.net/ipfs/QmYene5icko1cusFCG9D92YUyfonN4hmRPNdPkxvJkNjTb

hello-crust

Learn

The tutorial above includes the interaction steps with IPFS and Crust Chain using Crust command line tool. You can continue on reading code sample to start coding to do the same thing.

Resources

  • crust-cli
  • crust.js
  • polkadot-api
  • ipfs-http-client
  • create-react-app
← 开始Crust Rocky Network →
  • Hello, Crust
    • 1. Setup Crust CLI
    • 2. Store, Pin and Publish
    • 3. Query status
    • 4. Access it
  • Learn
  • Resources
Docs
Getting StartedCRU ClaimsWebsite Hosting with CrustNFT Data Storage with Crust
Community
DiscordTwitterTelegram
More
CooperationGitHub
Copyright © 2025 Crust Network