Quick Start¶
Deploy your first static site to the Veilid DHT in under 5 minutes.
What you'll build¶
In this quick start, you'll:
- Bundle a simple HTML site
- Publish it to the Veilid DHT
- Start a local gateway
- Access your site in a web browser
Before you start
Make sure you have installed Roselite and have a basic static site ready (even a single HTML file works).
Step 1: Prepare your site¶
Create a simple site or use an existing one:
# Create a simple test site
mkdir my-test-site
cd my-test-site
# Create index.html
cat > index.html << 'EOF'
<!DOCTYPE html>
<html>
<head>
<title>My Roselite Site</title>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
.container { max-width: 600px; margin: 0 auto; }
.hero { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white; padding: 2rem; border-radius: 8px; }
</style>
</head>
<body>
<div class="container">
<div class="hero">
<h1>🚀 Welcome to Roselite!</h1>
<p>This site is hosted on the Veilid DHT with zero censorship.</p>
</div>
<h2>Censorship-Resistant Hosting</h2>
<p>Your content is now distributed across the Veilid network.</p>
</div>
</body>
</html>
EOF
Step 2: Bundle your site¶
Package your site into a Veilid package:
# Bundle the current directory
roselite bundle . --name "My Test Site" --version "1.0.0"
# This creates: my-test-site.veilidpkg
Package created
The .veilidpkg
file contains your entire site optimized for DHT storage.
Step 3: Publish to DHT¶
Deploy your package to the Veilid network:
# Publish the package
roselite publish my-test-site.veilidpkg
# Output will show:
# 📤 Publishing package: my-test-site.veilidpkg
# ✅ Published successfully!
# 🔗 Slug: my-test-site
Published!
Your site is now distributed across the Veilid DHT. Note the slug - you'll need it for access.
Step 4: Start the gateway¶
Launch a local gateway server:
# Start gateway on port 3000
roselite-gateway --port 3000 --domain localhost:3000
# You should see:
# 🌐 Gateway server starting on localhost:3000
# 🚀 Ready to serve Veilid content
Keep this terminal open - the gateway needs to run to serve your content.
Step 5: Access your site¶
Open a new terminal and access your site:
Step 6: Make changes¶
Update your site and redeploy:
# Edit your content
echo '<p>Updated content!</p>' >> index.html
# Re-bundle and publish
roselite bundle . --name "My Test Site" --version "1.0.1"
roselite publish my-test-site.veilidpkg
# Content is updated in the DHT
What just happened?¶
- Bundled: Your static files were packaged into a DHT-optimized format
- Published: The package was distributed across Veilid nodes worldwide
- Served: The gateway retrieved your content from the DHT and served it via HTTP
- Accessed: Your site is now accessible through any Roselite gateway
Next steps¶
🎉 Congratulations! You've successfully deployed a censorship-resistant static site.
Learn more¶
- Architecture Overview - Understanding how it all works
- CLI Reference - Complete command documentation
- Gateway Setup - Advanced gateway configuration
Production deployment¶
- First Deployment Guide - Complete production setup
- Gateway Configuration - Production gateway setup
- Custom Domains - Using your own domain
Advanced features¶
- Multiple Gateways: Deploy on multiple servers for redundancy
- Custom Domains: Use your own domain names
- SSL/TLS: Production HTTPS setup
- CI/CD Integration: Automated deployments
Share your site
Your site URL can be shared with anyone. As long as they have access to a Roselite gateway, they can view your content - even if the original gateway goes down.
Troubleshooting¶
Common issues¶
Gateway connection failed
Issue: Can't connect to gateway
Solution:
Publish failed
Issue: Package publishing fails
Solution:
Site not loading
Issue: Browser shows error or empty page
Solution:
Need more help? Check the troubleshooting guide or open an issue.