ContentAIDOCS
Deployment

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 main

2. Import on Netlify

  1. Go to app.netlify.com/start
  2. Connect your Git provider and pick the repo
  3. Netlify auto-detects Next.js

Build settings

FieldValue
Build commandpnpm build
Publish directory.next
Node version20 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:

  1. Site settings → Build & Deploy → Build image selection → choose latest image
  2. Add NEXT_USE_NETLIFY_EDGE=true to 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 →

On this page