OpeNext CMS · Developer Docs

Deployment

Build and host OpeNext CMS in production.

Build for production

npm run build
npm run start

The production server uses port 3011 by default. Configure your host or reverse proxy accordingly.

Required environment variables

  • MONGODB_URI — MongoDB connection string (Atlas recommended for production)
  • JWT_SECRET — strong secret for signing auth tokens
  • Any provider-specific keys for email, storage, or AI integrations you enable

Hosting options

  • Vercel — deploy the Next.js app; use MongoDB Atlas for the database
  • Railway / Render — full-stack hosting with managed MongoDB add-ons
  • Docker / VPS — run Node.js with a process manager (PM2) behind nginx

Multi-tenant considerations

Each tenant uses a separate database. Ensure your MongoDB cluster can handle multiple databases and that connection pooling is configured for your expected tenant count.

Checklist

  • Set NODE_ENV=production
  • Use HTTPS in production
  • Rotate JWT_SECRET and never commit secrets
  • Enable MongoDB authentication and network restrictions
  • Run npm run build before deploying