A Node.js application started in an interactive terminal can depend on that terminal session. A production deployment needs an intentional process lifecycle: how it starts, which account runs it, where logs go and what happens after a failure or server restart.
Write down the working command
Before introducing supervision, confirm the application's documented production command works in the intended directory. Identify the required Node.js version and whether a separate build produces the entry file. A development server is a different execution mode from the project's supported production start.
Record configuration key names and required file permissions. The service account may have a different environment and working directory from your interactive login, which explains many cases where a command works manually but fails as a service.
Choose a setup for the actual operating system
Use the hosting environment's supported service or process-management approach. Windows and Linux use different operational mechanisms. Confirm startup, restart and log behavior for the chosen tool instead of assuming a copied command covers every system.
- Run under an account with the permissions the application needs.
- Define the working directory and production configuration source.
- Keep logs accessible to the people responsible for support.
- Decide how failed starts and repeated crashes are handled.
- Verify that only the intended process owns the application port.
Check recovery and routing separately
In a controlled environment, stop and restart the service and verify its health endpoint. Check the intended behavior after an operating-system reboot before relying on the setup. Then test the public URL through the configured proxy and HTTPS.
For an update, keep the release identity and rollback instructions with the process configuration. If the app fails only through the public hostname, inspect the proxy path using the 502 guide below. If you need assistance, the deployment brief should include the command that worked manually and the service error that did not.