Complete guide for deploying sites to Walrus using Walgo.
- Deployment Overview
- HTTP Deployment
- On-Chain Deployment
- Updating Deployments
- Custom Domains
- Best Practices
- Cost Optimization
Walgo supports two deployment modes:
graph TD
Start[Your Hugo Site] --> Build[walgo build]
Build --> Choice{Deployment Mode?}
Choice -->|Free & Fast| HTTP[HTTP Deployment]
Choice -->|Permanent| OnChain[On-Chain Deployment]
HTTP --> HTTPPub[Upload to Publisher]
HTTPPub --> HTTPAgg[Register with Aggregator]
HTTPAgg --> TempURL[Temporary URL<br/>~30 days]
OnChain --> WalrusUpload[Upload to Walrus]
WalrusUpload --> SuiObject[Create Sui Object]
SuiObject --> PermURL[Permanent URL<br/>+ Object ID]
style HTTP fill:#e1f5ff
style OnChain fill:#ffe1e1
style TempURL fill:#fff4e1
style PermURL fill:#e1ffe1
| Feature | HTTP Mode | On-Chain Mode |
|---|---|---|
| Cost | Free | Requires SUI tokens |
| Setup | None | Wallet configuration |
| Speed | Fast (5-15s) | Moderate (30-60s) |
| Permanence | ~30 days | Epochs (configurable) |
| Updates | Re-deploy only | Update in place |
| Custom Domain | No | Yes (via SuiNS) |
| Object ID | No | Yes |
| Best For | Testing, previews | Production sites |
Perfect for testing and temporary sites.
- Hugo installed
- Site built with
walgo build - Internet connection
No wallet or cryptocurrency required!
# Build your site
walgo build
# Deploy via HTTP
walgo deploy-httpDeploying to Walrus via HTTP...
📤 Uploading files to publisher...
✓ index.html (4.2 KB)
✓ style.css (12.8 KB)
✓ script.js (8.4 KB)
... 234 files total ...
✓ Files uploaded successfully
📡 Registering with aggregator...
✓ Site published
🌐 Your site is live!
URL: https://5tphzvq5shsxzugrz7kqd5bhnbajqfamvtxrn8jbfm3jbibzz1.walrus.site
📊 Deployment Stats:
Files: 234
Total size: 2.4 MB
Upload time: 8.3s
⚠️ Note: HTTP deployments expire after ~30 days
# Use custom endpoints
walgo deploy-http \
--publisher https://custom-publisher.walrus.site \
--aggregator https://custom-aggregator.walrus.sitesequenceDiagram
participant User
participant Walgo
participant Publisher
participant Aggregator
participant Browser
User->>Walgo: walgo deploy-http
Walgo->>Publisher: Upload files
Publisher-->>Walgo: Blob IDs
Walgo->>Aggregator: Register site
Aggregator-->>Walgo: Site URL
Walgo-->>User: Display URL
User->>Browser: Share URL
Browser->>Aggregator: Request site
Aggregator-->>Browser: Serve content
- Temporary - Expires after ~30 days
- No updates - Must re-deploy (gets new URL)
- No custom domains - Can't use SuiNS
- No ownership - Can't prove site ownership
- Testing - Try before on-chain deployment
- Previews - Share with stakeholders
- Learning - Practice without spending tokens
- Temporary - Short-lived content
Permanent, updateable deployments on Sui blockchain.
- Sui Wallet - Configured with
walgo setup - SUI Tokens - For gas and storage fees
- site-builder - Installed via
walgo setup-deps - Built Site - Ready in
public/directory
walgo setup-depsThis installs:
- Walrus site-builder
- Sui CLI
# For testnet
walgo setup --network testnet
# For mainnet (use with caution!)
walgo setup --network mainnetFollow the interactive prompts to:
- Generate new wallet
- Save recovery phrase (IMPORTANT!)
- Note wallet address
Visit the Sui Discord faucet:
https://discord.com/channels/916379725201563759/971488439931392130
Request format:
!faucet <your-wallet-address>
Wait for confirmation (~30 seconds).
walgo doctorCheck the "Wallet" section shows sufficient balance.
# Build your site
walgo build
# Deploy with default settings (5 epochs)
walgo deploy# Deploy for 1 epoch (~30 days)
walgo deploy --epochs 1
# Deploy for 10 epochs (~10 months)
walgo deploy --epochs 10
# Deploy for 50 epochs (~4 years)
walgo deploy --epochs 50Cost increases with epochs!
# Set maximum gas to spend
walgo deploy --gas-budget 100000000
# Let Walgo estimate (default)
walgo deploy# Deploy from dist/ instead of public/
walgo deploy --directory distDeploying to Walrus (on-chain)...
📤 Uploading assets to Walrus...
✓ Processing 234 files...
✓ Uploading to storage nodes...
✓ Blob IDs received
📝 Creating site object on Sui...
✓ Transaction submitted
✓ Transaction confirmed
🌐 Your site is live!
Object ID: 0x7b5a8d3f2c1e9b4a6f5d8c2e1a3b7f9d4c6e8a1b5d7f3c9e2a8b4f6d1c5e7a3b
URL: https://5tphzvq5shsxzugrz7kqd5bhnbajqfamvtxrn8jbfm3jbibzz1.walrus.site
📊 Deployment Stats:
Files: 234
Total size: 2.4 MB
Epochs: 5
Upload time: 34.2s
💰 Cost Breakdown:
Storage cost: 0.12 SUI (5 epochs)
Gas fee: 0.03 SUI
Total: 0.15 SUI
📋 Transaction Details:
Transaction ID: 0xdef456...
Block: 12345678
Timestamp: 2025-01-15 14:30:00 UTC
⚠️ Important: Save your Object ID!
You'll need it to update or manage this site.
# Save object ID to config
echo "walrus:
projectID: \"0x7b5a8d3f2c1e9b4a6f5d8c2e1a3b7f9d4c6e8a1b5d7f3c9e2a8b4f6d1c5e7a3b\"" >> walgo.yamlsequenceDiagram
participant User
participant Walgo
participant SiteBuilder
participant Walrus
participant Sui
participant Browser
User->>Walgo: walgo deploy --epochs 5
Walgo->>SiteBuilder: Execute deployment
SiteBuilder->>Walrus: Upload blobs
Walrus-->>SiteBuilder: Blob IDs
SiteBuilder->>Sui: Create site object
Sui-->>SiteBuilder: Object ID
SiteBuilder-->>Walgo: Deployment info
Walgo-->>User: Display result
User->>Browser: Visit URL
Browser->>Sui: Resolve object
Sui-->>Browser: Blob IDs
Browser->>Walrus: Fetch blobs
Walrus-->>Browser: Site content
Only available for on-chain deployments.
- Same URL - Users keep the same link
- Lower Cost - Only pay for changed files
- Preserve Object ID - Ownership remains
- Custom Domains - No need to re-link SuiNS
# Make changes to your site
# ... edit content ...
# Rebuild
walgo build
# Update existing deployment
walgo update 0x7b5a...Updating site 0x7b5a8d3f2c1e9b4a6f5d8c2e1a3b7f9d4c6e8a1b5d7f3c9e2a8b4f6d1c5e7a3b...
📊 Analyzing changes...
Files changed: 12
Files added: 3
Files removed: 1
Files unchanged: 218
📤 Uploading changes to Walrus...
✓ Uploading 15 files...
✓ Blob IDs received
📝 Updating site object on Sui...
✓ Transaction submitted
✓ Transaction confirmed
🌐 Site updated successfully!
URL: https://5tphzvq5shsxzugrz7kqd5bhnbajqfamvtxrn8jbfm3jbibzz1.walrus.site
(URL unchanged)
💰 Cost:
Storage cost: 0.02 SUI (changed files only)
Gas fee: 0.01 SUI
Total: 0.03 SUI
Transaction ID: 0xabc789...
graph LR
A[Edit Content] --> B[walgo build]
B --> C[walgo update OBJECT_ID]
C --> D{Changed Files?}
D -->|Yes| E[Upload Changes]
D -->|No| F[No Update Needed]
E --> G[Update Object]
G --> H[Same URL, New Content]
style A fill:#e1f5ff
style H fill:#e1ffe1
# Check current status
walgo status 0x7b5a...
# See what changed (Hugo's diff)
git diff- Test locally first - Use
walgo serve - Build before update - Always
walgo buildfirst - Check status - Verify site is active
- Save object ID - Store in
walgo.yaml - Monitor costs - Large updates cost more
Use SuiNS domains for human-readable URLs.
- Own a SuiNS domain - Register at suins.io
- On-chain deployment - Have a site object ID
- Sui wallet - Configured and funded
For detailed instructions, see the SuiNS tutorial.
# Link domain
walgo domain link myblog.sui 0x7b5a...
# Verify link
walgo domain info myblog.suiLinking domain myblog.sui to site 0x7b5a...
✓ Domain ownership verified
✓ Link transaction submitted
✓ Link confirmed
🌐 Domain linked successfully!
Your site is now accessible at:
- https://myblog.sui.walrus.site
- https://5tphzvq5shsxzugrz7kqd5bhnbajqfamvtxrn8jbfm3jbibzz1.walrus.site
Both URLs point to the same site.
# List your domains
walgo domain list
# Unlink domain
walgo domain unlink myblog.sui
# Check domain info
walgo domain info myblog.sui# walgo.yaml
walrus:
suinsDomain: "myblog.sui"# Recommended flow
walgo build # Build locally
walgo serve # Test locally
walgo build --no-optimize # Build without optimization (debug)
walgo deploy-http # Test on Walrus HTTP
# ... verify everything works ...
walgo build # Build with optimization
walgo deploy --epochs 5 # Deploy on-chain# Track deployments in Git
echo "# Deployments
- Testnet: 0x7b5a...
- Mainnet: 0x9c8d...
" > DEPLOYMENTS.md
git add DEPLOYMENTS.md
git commit -m "Add deployment info"# walgo.yaml - Track deployment info
walrus:
projectID: "0x7b5a..." # Save object ID
epochs: 5 # Document epoch choice
network: "testnet" # Clearly mark network
suinsDomain: "myblog.sui" # Track custom domain# Separate configs for each environment
walgo.dev.yaml # Development (HTTP only)
walgo.staging.yaml # Staging (testnet, 1 epoch)
walgo.prod.yaml # Production (mainnet, 50 epochs)
# Deploy to each
walgo build --config walgo.dev.yaml && walgo deploy-http
walgo build --config walgo.staging.yaml && walgo deploy --epochs 1
walgo build --config walgo.prod.yaml && walgo deploy --epochs 50 --network mainnet- Content reviewed and finalized
- Local preview tested (
walgo serve) - Optimization tested (
walgo build) - HTTP deployment tested (
walgo deploy-http) - Configuration file updated
- Sufficient SUI balance (
walgo doctor) - Correct network selected (testnet/mainnet)
- Epoch count decided
- Object ID saved in
walgo.yaml - URL tested in browser
- All pages/links working
- Images loading correctly
- Custom domain linked (if applicable)
- Deployment documented
- Git commit created
On-chain deployments have two costs:
- Storage Cost - Based on data size and epochs
- Gas Fee - Transaction fee (fixed per deployment)
Total Cost = (File Size × Epochs × Storage Rate) + Gas Fee
# Enable aggressive optimization
walgo buildTypical savings:
- HTML: 15-25%
- CSS: 20-40%
- JavaScript: 25-50%
- Total: 20-35% smaller
Before deployment:
# Use ImageOptim, TinyPNG, or similar tools
# Or Hugo's image processing:
# https://gohugo.io/content-management/image-processing/Image optimization can save 50-80% on image files.
# Remove source maps
find public -name "*.map" -delete
# Remove unused themes
rm -rf public/themes/unused-theme/| Duration | Epochs | Use Case |
|---|---|---|
| 1 month | 1 | Testing, short-term |
| 3 months | 3 | Seasonal content |
| 6 months | 6 | Medium-term projects |
| 1 year | 12 | Annual content |
| 2 years | 24 | Long-term blogs |
| 5+ years | 50+ | Permanent archives |
Don't over-provision! You can always update/extend.
# Bad - Multiple small updates
walgo update 0x7b5a... # Update 1
# ... make more changes ...
walgo update 0x7b5a... # Update 2
# ... more changes ...
walgo update 0x7b5a... # Update 3
# Good - Batch changes
# ... make all changes ...
walgo build
walgo update 0x7b5a... # Single update# Test with HTTP first (free)
walgo build
walgo deploy-http
# ... verify changes ...
# Then update on-chain
walgo update 0x7b5a...Example site (2.4 MB, optimized):
| Epochs | Duration | Storage Cost | Gas Fee | Total |
|---|---|---|---|---|
| 1 | ~30 days | 0.024 SUI | 0.03 SUI | 0.054 SUI |
| 5 | ~5 months | 0.120 SUI | 0.03 SUI | 0.150 SUI |
| 10 | ~10 months | 0.240 SUI | 0.03 SUI | 0.270 SUI |
| 50 | ~4 years | 1.200 SUI | 0.03 SUI | 1.230 SUI |
Note: Rates are approximate and may change.
# Check balance
walgo doctor
# Get testnet SUI
# Visit Discord faucet (see setup section)
# Or reduce epochs
walgo deploy --epochs 1# Increase timeout (if supported)
walgo deploy --timeout 300
# Or split into smaller deployments
# (deploy subdirectories separately)# Install dependencies
walgo setup-deps --site-builder# Verify object ID
walgo status 0x7b5a...
# Check network
walgo status 0x7b5a... --network testnet
# Ensure you're on correct network
walgo update 0x7b5a... --network testnet- Wait a moment - Propagation takes 10-30 seconds
- Check status -
walgo status 0x7b5a... - Try direct URL - Use blob ID URL, not custom domain
- Clear browser cache - Force reload (Ctrl+F5)
- Getting Started Guide - Your first deployment
- Configuration Reference - All deployment options
- Commands Reference - Command details
- Troubleshooting Guide - Common issues
- Walrus Documentation: https://docs.walrus.site
- Sui Documentation: https://docs.sui.io
- SuiNS: https://suins.io
- Discord Faucet: Sui Discord