A self-hosted Next.js application needs a completed production build, the appropriate runtime files and a supervised process behind the hosting proxy.
IN THIS ARTICLE
What you need before you begin
Confirm the supported Node version, memory available during build and runtime, and the application’s selected output mode. Keep a tested previous release.
01 Start a self-hosted Next.js production release
Install the locked build dependencies and run the application’s production build. Resolve build errors before replacing the live release.
For a normal Node deployment, start the built application through its production command, commonly
next start, with the assigned listener configuration.If using standalone output, deploy the traced runtime output and the required public and static assets according to that mode’s instructions. Do not assume every repository file is included automatically.
Set private runtime configuration through the approved secret store or panel. Use the same build consistently across instances serving the release.
Supervise the process, configure the reverse proxy and health checks, then switch traffic through the supported deployment mechanism.
Confirm the expected result
Test direct and client-side navigation, a server-dependent action and the expected assets. Confirm the process restarts cleanly and the public endpoint serves the intended release identifier.
Troubleshoot unexpected results
Missing assets can indicate an incomplete standalone package or a mismatched build. A startup memory failure needs a resource and build architecture review rather than a development-mode fallback.
A common question
Should I run next dev in production to avoid a build problem?
Use the supported production build and startup workflow. Development mode is designed for development behavior and is not a substitute for resolving a release failure.