Getting Your Code
Export to GitHub
- Connect GitHub in settings
- Push your code to a repository
- Clone the repository locally
Download ZIP
- Go to Settings > Export
- Click Download ZIP
- Extract and open in your editor
Running Locally
Prerequisites
- Node.js 18+
- npm or pnpm
Setup
http://localhost:3000
Build for Production
Hosting Options
Vercel (Recommended)
Even for self-managed, Vercel is easy:- Connect GitHub repo to Vercel
- Configure environment variables
- Deploy automatically on push
Netlify
Railway
- Connect GitHub repo
- Railway auto-detects Next.js
- Configure environment variables
DigitalOcean App Platform
- Create new app
- Connect GitHub repository
- Select Next.js buildpack
- Configure environment variables
Docker
AWS (Amplify)
- Connect to Amplify Console
- Select your repository
- Amplify auto-detects Next.js
- Configure build settings
Environment Variables
Required variables for your app to work:Supabase Considerations
Keep Using Supabase Cloud
Your Supabase project continues working:- Database stays on Supabase Cloud
- Auth continues working
- Storage accessible from anywhere
Self-Host Supabase (Advanced)
For complete self-hosting:- Deploy Supabase with Docker
- Configure your own PostgreSQL
- Update environment variables
Custom Domains
On Your Host
Most platforms support custom domains:- Add domain in hosting dashboard
- Configure DNS:
- SSL is usually automatic
Cloudflare (Recommended)
For extra features:- Add site to Cloudflare
- Update nameservers
- Configure DNS to point to your host
- Get free SSL, CDN, and protection
CI/CD Setup
GitHub Actions
Monitoring
Error Tracking
Add error monitoring:- Sentry - Error tracking
- LogRocket - Session replay
- Bugsnag - Error reporting
Analytics
Add analytics:- Vercel Analytics - Simple (Vercel only)
- Plausible - Privacy-focused
- Google Analytics - Comprehensive
Uptime Monitoring
- UptimeRobot - Free monitoring
- Pingdom - Professional monitoring
- Better Uptime - Status pages
Performance
Build Optimization
CDN
Use a CDN for static assets:- Cloudflare (free)
- CloudFront (AWS)
- Fastly
Comparison
| Platform | Ease | Cost | Control |
|---|---|---|---|
| Vercel | ⭐⭐⭐ | $$ | Medium |
| Netlify | ⭐⭐⭐ | $$ | Medium |
| Railway | ⭐⭐ | $$ | High |
| DigitalOcean | ⭐⭐ | $ | High |
| AWS | ⭐ | $$$ | Full |
| Docker/VPS | ⭐ | $ | Full |
Troubleshooting
Build fails
Build fails
- Check Node.js version matches
- Verify all dependencies install
- Check environment variables are set
- Review build logs for specific errors
Database connection fails
Database connection fails
- Verify Supabase URL and key
- Check IP allowlist if using Supabase
- Ensure environment variables are available at runtime
Routes not working
Routes not working
- Ensure platform supports Next.js routing
- Check rewrites configuration
- Verify _next folder is served correctly
Publishing to Vercel
The easiest deployment option

