This stack is appropriate for a conventional VPS: Next.js owns application rendering, PM2 restarts and records the process, and Nginx receives public traffic. Keep each role explicit.
Declare the process
Use a PM2 ecosystem file rather than an undocumented command. Set a stable name, release cwd, script (node .next/standalone/server.js or the package start command), production environment, restart delay, memory ceiling, and a kill timeout long enough for graceful drain. Persist PM2 startup configuration after testing reboot behavior.
Put Nginx at the edge
Bind Next.js to a private interface or firewall-restricted port. Proxy requests with the original host and forwarding headers. Configure TLS, body limits, and timeouts deliberately. Disable response buffering for routes that depend on streaming; do not add a broad proxy cache without understanding Next.js cache headers and user-specific responses.
Release without editing live files
Build into versioned release directories and point a stable symlink at the active release. Verify the new process directly before switching. Use controlled reload, watch logs, and roll the symlink back if health, assets, images, or dynamic routes fail.