Deploy to Netlify
Ship ContentAI to Netlify with the official Next.js runtime.
Netlify fully supports Next.js 16 App Router including API routes. Deployment mirrors Vercel closely.
1. Push to Git
git init
git add .
git commit -m "ContentAI"
git remote add origin git@github.com:<you>/ai-content-generator.git
git push -u origin main2. Import on Netlify
- Go to app.netlify.com/start
- Connect your Git provider and pick the repo
- Netlify auto-detects Next.js
Build settings
| Field | Value |
|---|---|
| Build command | pnpm build |
| Publish directory | .next |
| Node version | 20 or 22 |
Set NODE_VERSION=20 (or higher) in Site settings → Environment variables if the default is older.
3. Environment variables
Same as Vercel — none required by default. Add optional fallback keys under Site settings → Environment variables if you want server-side defaults.
4. Enable Next.js runtime
Netlify auto-installs the Next.js runtime when it detects next in package.json. If API routes return 404s after deploy:
- Site settings → Build & Deploy → Build image selection → choose latest image
- Add
NEXT_USE_NETLIFY_EDGE=trueto env vars
Custom domain
Domain management → Add a domain. HTTPS is automatic via Let's Encrypt.
Deploy previews
Each PR gets a deploy-preview-NN--<site>.netlify.app URL — same model as Vercel.
Common issues
404 on /api/generate
Usually caused by missing or outdated Next.js runtime plugin. Re-deploy with:
netlify deploy --prod --build"dynamic code evaluation is not available" warning
Harmless — Fumadocs' dependency hast-util-to-jsx-runtime triggers it. Does not affect runtime.
Next: Self-hosting →