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.

Plugin and theme dependencies

Uploaded plugins and themes declare npm packages in their manifest. Upload merges those names into the CMS root package.json. Your deploy pipeline should run npm install so every declared package lands in shared node_modules.

Typical flow after uploading a theme or plugin in production:

1. Upload ZIP (Dashboard)     → deps added to package.json
2. npm install                → installs pending platform packages
3. Restart CMS                → pick up new node_modules
4. Activate theme / Enable plugin
  • Run npm install after any upload that adds new dependencies
  • Activation/enable is blocked until packages exist in node_modules
  • Commit updated package.json and package-lock.json after uploads in dev/staging
  • Do not run per-plugin npm install — one root install serves all themes and plugins

Checklist

  • Set NODE_ENV=production
  • Use HTTPS in production
  • Rotate JWT_SECRET and never commit secrets
  • Enable MongoDB authentication and network restrictions
  • Run npm install && npm run build before deploying
  • Include plugin/theme npm deps in root package.json (shared node_modules)