2.8 KiB
2.8 KiB
Live Streaming Setup Guide
Overview
Transform aethex.live into a fully functional live streaming platform.
🎥 Streaming Options
Option 1: OBS Studio → Streaming Service
Recommended for beginners
Services to consider:
- Cloudflare Stream - $5/month, easy setup, global CDN
- Mux - Pay-as-you-go, developer-friendly
- AWS IVS - Scalable, AWS infrastructure
- Twitch API - If you want to use Twitch as backend
Setup with Cloudflare Stream:
- Sign up at cloudflare.com/products/cloudflare-stream
- Get your Stream URL and Key
- Configure OBS Studio:
- Settings → Stream
- Service: Custom
- Server: Your Cloudflare RTMP URL
- Stream Key: Your key
- Update
app/page.tsxwith your HLS playback URL
Option 2: Self-Hosted (Advanced)
For full control
Requirements:
- VPS/Server (DigitalOcean, AWS, etc.)
- Nginx with RTMP module
- Domain with SSL
Stack:
# Install on Ubuntu server
sudo apt update
sudo apt install nginx libnginx-mod-rtmp
See docs/SELF_HOSTED_SETUP.md for full guide.
Option 3: Multiple Stream Sources
Support streaming from:
- OBS Studio
- StreamLabs
- Mobile apps
- Pre-recorded content
💬 Real-Time Features
Chat Implementation
Option A: Firebase (Quickest)
npm install firebase
Option B: WebSocket Server
npm install socket.io
Option C: Third-party (Pusher, Ably)
Viewer Count
- WebSocket connections
- Analytics services
- Real-time database
🚀 Deployment
Deploy Frontend to Vercel
npm install -g vercel
vercel
Deploy to Custom Domain
- Point DNS to Vercel
- Add domain in Vercel dashboard
- SSL auto-configured
Alternative Platforms:
- Netlify - Similar to Vercel
- Cloudflare Pages - Free tier, fast global CDN
- AWS Amplify - If using AWS for streaming
🔐 Backend Needs
Essential APIs:
- Authentication - Clerk, Auth0, or NextAuth.js
- Database - Supabase, Firebase, or PostgreSQL
- Chat Storage - Real-time DB or Redis
- Analytics - Track views, engagement
Example Backend Stack:
Frontend: Next.js (current)
Auth: Clerk
Database: Supabase
Storage: Cloudflare R2
Streaming: Cloudflare Stream
Chat: WebSocket (socket.io)
📊 Monetization Features (Future)
- Subscriptions (Stripe)
- Donations/Tips
- Private streams
- VOD content
- Channel memberships
🎯 Quick Start Checklist
- Choose streaming service
- Set up OBS Studio
- Get HLS stream URL
- Update streamUrl in app/page.tsx
- Set up backend for chat
- Add authentication
- Deploy to Vercel
- Configure custom domain
- Test stream end-to-end
- Set up analytics
🛠️ Next Steps
Run the setup wizard to configure your platform:
npm run setup:streaming
Or manually update configuration in config/streaming.ts