Skip to content

Deploying a Nuxt Node server build

development, servers

A Nuxt application using server rendering or server endpoints needs the appropriate server build and a supported Node process. Its generated public files alone do not contain that running backend.

01 Check access and requirements

Use a supported Nuxt branch and compatible Node runtime. Confirm persistent Node hosting, the assigned listener and any native dependencies required by the application.

02 Deploy a Nuxt Node server build

  1. Install the locked dependencies and choose the Nitro Node-server preset appropriate for the deployment. Run the application’s production build.

  2. Deploy the complete generated output required by that preset. For the standard Node-server output, the entry point is .output/server/index.mjs.

  3. Set the production environment and the listener variables supported by the preset and hosting integration. Keep private runtime configuration outside browser-visible values.

  4. Start the entry point through the approved process manager and connect the public HTTPS hostname through the reverse proxy.

  5. Test the server endpoints, rendered pages and assets, then record the restart and previous-release recovery procedure.

03 Confirm the expected result

Open a page directly and navigate to it from another page. Call a harmless server endpoint and confirm the application returns after a controlled process restart.

04 Resolve setup problems

If only static files work, the server process or proxy may be missing. If the process starts but URLs are wrong, inspect base-path and runtime configuration.

05 A common question

Can I upload only .output/public for a server-rendered app?

That directory is appropriate for the output intended for static delivery. A server-rendered deployment also needs the server output and the runtime process that executes it.

06 Example: separate a successful Nuxt build from a working service

A build can finish successfully even when the production process never starts. Check the hosting application configuration for the selected runtime, working directory and startup command appropriate to the project's deployed output.

Then test three layers: the process starts without an error, the hosting route reaches it, and the public HTTPS page behaves correctly. If the public route shows a gateway error while the process log says it is listening, investigate the assigned port and proxy integration rather than repeatedly rebuilding the application.

Where should environment settings go?

Use the hosting platform's supported environment configuration or approved secret storage. Values intended for browser use must be treated as public. Keep database credentials and private API keys on the server side. Do not assume a variable remains secret merely because its name appears in a configuration file.

Test restarts and a fresh deployment in staging, and retain a known-good release for rollback. Send us the startup error, runtime version, deployment mode and relevant public URL when requesting help. Redact tokens and secrets from logs. We can investigate the hosting interface without needing your entire production environment copied into a ticket.

07 Sources and further reading

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support