First Deployment
This guide walks you through deploying your Ever Works to production for the first time.
Pre-Deployment Checklist
Before deploying, ensure you have:
- Completed environment setup
- Tested locally with
npm run dev - Set up your data repository
- Configured at least one authentication provider
- Generated production secrets
- Prepared your domain (if using custom domain)
Deployment Options
Option 1: Vercel (Recommended)
Vercel provides the best experience for Next.js applications.
1. Install Vercel CLI
npm install -g vercel
2. Login to Vercel
vercel login
3. Deploy
vercel
Follow the prompts:
- Link to existing project? No
- Project name:
your-project-name - Directory:
./(current directory) - Override settings? No
4. Set Environment Variables
In the Vercel dashboard:
- Go to your project → Settings → Environment Variables
- Add all production environment variables
- Set different values for Production, Preview, and Development
Critical Production Variables:
NODE_ENV=production
NEXTAUTH_URL=https://your-domain.vercel.app
NEXT_PUBLIC_APP_URL=https://your-domain.vercel.app
AUTH_SECRET=your-production-secret
DATABASE_URL=your-production-database-url
5. Redeploy
vercel --prod
Option 2: Netlify
1. Build Settings
Create netlify.toml:
[build]
command = "npm run build"
publish = ".next"
[build.environment]
NODE_VERSION = "20"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
2. Deploy
Connect your GitHub repository to Netlify and configure build settings.
Option 3: Railway
1. Install Railway CLI
npm install -g @railway/cli
2. Login and Deploy
railway login
railway init
railway up
Option 4: DigitalOcean App Platform
- Connect your GitHub repository
- Configure build settings:
- Build command:
npm run build - Run command:
npm start
- Build command:
- Set environment variables
- Deploy