Deploy to Railway
Click this button to deploy Cap in under 2 minutes:What Gets Deployed
The Railway template creates:- Cap Web - Next.js application (automatically scaled)
- Media Server - FFmpeg processing service
- MySQL Database - Managed MySQL 8.0 instance
- MinIO - S3-compatible object storage
- Automatic SSL - Free SSL certificates for your domain
- Environment Variables - Pre-configured with secure defaults
Deployment Steps
Click Deploy Button
Click the Deploy on Railway button above.You’ll be prompted to:
- Sign in with GitHub (or create a Railway account)
- Select which GitHub organization/account to use
Configure Environment
Railway will show a form with environment variables.Required variables (Railway generates secure defaults):
NEXTAUTH_SECRET- Session encryption keyDATABASE_ENCRYPTION_KEY- Database field encryptionMEDIA_SERVER_WEBHOOK_SECRET- Webhook authenticationMYSQL_PASSWORD- Database passwordMYSQL_ROOT_PASSWORD- Database root passwordMINIO_ROOT_PASSWORD- MinIO admin password
RESEND_API_KEY- For sending login emailsRESEND_FROM_DOMAIN- Your domain for emailsDEEPGRAM_API_KEY- For AI transcriptionGROQ_API_KEY- For AI summaries
You can add optional variables later in the Railway dashboard.
Deploy
Click Deploy to start the deployment.Railway will:
- Provision all services
- Build Docker images
- Configure networking
- Generate a public URL
Get Your URL
Once deployed, Railway provides a public URL like:Click the URL or find it in the Railway dashboard under the
cap-web service.Custom Domain
Railway provides a free.railway.app subdomain, but you can use your own domain:
Add Domain in Railway
- Go to your
cap-webservice in Railway - Click Settings → Domains
- Click Add Domain
- Enter your domain (e.g.,
cap.yourdomain.com)
Configure DNS
Railway will show DNS records to add:Add this record in your domain registrar’s DNS settings.
Update Environment Variables
After DNS propagates:
- Go to
cap-webservice → Variables - Update these variables:
- Railway will automatically redeploy
SSL certificates are automatically provisioned by Railway. No manual configuration needed.
Email Configuration
To send login emails instead of using log links:Create Resend Account
- Sign up at resend.com
- Verify your domain
- Create an API key
Add Environment Variables
In Railway dashboard, add to Railway will redeploy automatically.
cap-web service:AI Features
Enable AI transcription and summaries:Get API Keys
- Deepgram - Sign up for transcription
- Groq - Sign up for fast AI summaries (recommended)
- OpenAI - Alternative for AI summaries
Connect Cap Desktop
Download Cap Desktop
Get the desktop app from cap.so/download
Monitoring & Logs
View Logs
- Go to Railway dashboard
- Click on a service (e.g.,
cap-web) - Click View Logs
- Application startup
- HTTP requests
- Errors and warnings
- Login links (if email not configured)
Metrics
Railway provides built-in metrics:- Click on a service
- Click Metrics tab
- CPU usage
- Memory usage
- Network traffic
- Response times
Alerts
Set up alerts for service failures:- Go to project settings
- Click Integrations
- Add Slack or Discord webhook
Scaling
Automatic Scaling
Railway automatically scales based on:- CPU usage
- Memory usage
- Request volume
Vertical Scaling
Increase resources for individual services:- Click on service (e.g.,
cap-web) - Go to Settings → Resources
- Adjust:
- Memory limit (default: 8GB)
- CPU shares
Database Scaling
For high traffic:- Consider upgrading to Railway’s managed MySQL
-
Or use external managed database:
Update
DATABASE_URLenvironment variable accordingly.
Storage Considerations
The template uses MinIO for object storage, which stores data on Railway’s ephemeral disk.Use External S3
Recommended for production:Choose S3 Provider
- AWS S3 - Most compatible
- Backblaze B2 - Cost-effective
- Cloudflare R2 - Zero egress fees
Costs
Railway pricing:- Free Trial - $5 credit, no credit card required
- Hobby Plan - $5/month + usage
- Pro Plan - $20/month + usage
- Base: $5
- 4 services running 24/7: ~$15-25
- Total: ~$20-30/month
Actual costs vary based on:
- Number of users
- Video upload volume
- Storage usage (if using Railway MinIO)
- Traffic volume
Backups
Railway doesn’t provide automatic backups. Implement backup strategy:Database Backups
Storage Backups
If using Railway MinIO, download volumes periodically:Troubleshooting
Service Won’t Start
- Check logs for errors
- Verify environment variables are set
- Restart service:
- Click service → Settings → Restart
Database Connection Errors
- Verify MySQL service is running
- Check
DATABASE_URLformat: - Railway internal networking uses service names (e.g.,
mysql:3306)
Out of Memory
- Check service metrics
- Increase memory limit in service settings
- Consider splitting services across multiple Railway projects
Deployment Fails
- Check build logs
- Verify Dockerfile syntax
- Try manual redeploy:
- Service → Settings → Redeploy
Migration from Railway
To migrate to self-hosted Docker Compose:Set Up Docker Compose
Follow Docker Compose guide.
Next Steps
Email Setup
Configure email delivery with Resend
S3 Storage
Switch to external S3 for production
Environment Variables
Complete configuration reference
Troubleshooting
Common issues and solutions