Production Checklist
Before deploying to production, ensure you’ve completed these critical steps:Security Configuration
Change JWT Secret
Change JWT Secret
.env:Enable HTTPS/TLS
Enable HTTPS/TLS
Secure Database
Secure Database
- Use strong database passwords (32+ random characters)
- Enable SSL/TLS for database connections
- Restrict database access to application servers only
- Use connection pooling (Supabase pooler or PgBouncer)
- Enable automatic backups
Environment Variables
Environment Variables
- Never commit
.envfiles to version control - Use platform-specific secrets management:
- Vercel: Environment Variables in dashboard
- Railway: Environment Variables in project settings
- Docker: Use
docker-compose.override.yml(gitignored)
- Rotate secrets regularly
- Use different secrets for different environments
Database Optimization
Run Migrations
Run Migrations
Enable Connection Pooling
Enable Connection Pooling
Set Up Backups
Set Up Backups
WebRTC Configuration
Configure TURN Server
Configure TURN Server
- Twilio Network Traversal Service - $0.0004/GB
- Xirsys - Free tier available
- Self-hosted coturn
Self-Host coturn (Optional)
Self-Host coturn (Optional)
/etc/turnserver.conf:Performance Optimization
Enable Production Mode
Enable Production Mode
- Optimized builds
- Reduced logging
- Better error handling
- Performance optimizations
Build Optimization
Build Optimization
- Client: Vite production build with minification and tree-shaking
- Server: NestJS compilation with TypeScript optimization
Configure CDN (Optional)
Configure CDN (Optional)
- Add your domain to CloudFlare
- Enable “Cache Everything” page rule
- Configure SSL/TLS to “Full (strict)”
Monitoring & Logging
Health Checks
Health Checks
- UptimeRobot (free)
- Pingdom
- Built-in: Railway health checks (configured in
railway.json)
Application Logs
Application Logs
Platform-Specific Deployment
Docker Production Deployment
Vercel Deployment
Vercel is configured viavercel.json:
Set environment variables
VITE_API_URL- Your backend API URLVITE_WS_URL- Your backend WebSocket URL
X-Content-Type-Options: nosniffX-Frame-Options: DENYX-XSS-Protection: 1; mode=block
Railway Deployment
Railway is configured viarailway.json:
Add PostgreSQL
- Click “New Service” > Database > PostgreSQL
- Railway automatically provides
DATABASE_URL
Configure environment
Manual VPS Deployment
For custom infrastructure:Set up server
- Ubuntu 20.04+ or similar
- Node.js 18+
- PostgreSQL 15+
- nginx (reverse proxy)
- PM2 (process manager)
Scaling Considerations
Horizontal Scaling
For high traffic, scale across multiple servers:Load Balancing
Load Balancing
WebSocket Sticky Sessions
WebSocket Sticky Sessions
Database Scaling
Database Scaling
- Enable read replicas for read-heavy workloads
- Use connection pooling (PgBouncer or Supabase pooler)
- Consider database sharding for very large scale
- Monitor query performance with Prisma logging
Vertical Scaling
Optimize resource usage:- CPU: Use PM2 cluster mode to utilize all cores
- Memory: Monitor with
pm2 monitand adjust limits - Database: Increase connection pool size for high concurrency
Security Hardening
Rate Limiting
Rate Limiting
CORS Configuration
CORS Configuration
Security Headers
Security Headers
vercel.json. For nginx:Firewall Rules
Firewall Rules
Post-Deployment Testing
Verify HTTPS
Test WebRTC connectivity
- Create a test room
- Join from different networks (WiFi, mobile)
- Verify video/audio works
- Test screen sharing
- Verify TURN server is used in restrictive networks
Maintenance
Updates and Patches
Monitoring Checklist
Troubleshooting
WebSocket connections failing
WebSocket connections failing
- Verify nginx WebSocket proxy configuration
- Check CORS settings allow WebSocket upgrade
- Ensure sticky sessions are enabled for load balancing
- Check firewall allows WebSocket traffic
Database connection errors
Database connection errors
- Verify connection string and credentials
- Check connection pool limits
- Ensure database is accessible from app server
- Review Prisma connection logs
Video/audio not working
Video/audio not working
- Verify TURN server is configured and accessible
- Check browser console for WebRTC errors
- Test with different networks (WiFi, mobile, VPN)
- Verify HTTPS is enabled (required for WebRTC)
Support
For deployment issues:- Check application logs
- Review Environment Variables
- Verify Database Setup
- Consult platform documentation (Vercel, Railway, etc.)
Need Help?
- Deployment platform
- Error logs
- Configuration (with secrets redacted)