What this thread does
Do first: select the matching Node artifact rather than static output for request-time account pages.
Short answer
As of November 2026, use Next.js 16.4.6, Nuxt 4.6.4, or SvelteKit 3.1.1 / adapter-node 6.0.1. These are separate configuration branches. Deploy the complete server artifact and client assets, inject runtime values into the process, and compare behavior through the public proxy.
Choose / don't choose
- Node server: choose when authenticated HTML/data is produced per request; don't expose the raw listener around the trusted proxy.
- Static output: choose when pages can be generated in advance and private behavior is supplied by a separate authenticated service; don't expect a static export to execute Server Actions (Next.js static export; SvelteKit static adapter).
- Edge hosting: select its host-specific adapter/preset rather than using this Node artifact.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
Next.js output | "standalone"; include public and .next/static under the standalone tree when Node serves them | Next.js 16.4.6 | source |
Next.js outputFileTracingRoot | Set only when required files are outside the app folder | Next.js 16.4.6 | source |
Next.js NEXT_PUBLIC_ / process.env | Public-prefixed values freeze at build; read environment variables on the server during dynamic rendering | Next.js 16.4.6 | source |
Nuxt nitro.preset / NITRO_PRESET | "node-server" at build; run NODE_ENV=production node .output/server/index.mjs | Nuxt 4.6.4 | source |
Nuxt runtimeConfig | Declare private apiSecret and public.apiBase; client-side keys are runtimeConfig.public and runtimeConfig.app | Nuxt 4.6.4 | source |
Nuxt NITRO_PORT / NITRO_HOST | Default port 3000, host 0.0.0.0; PORT / HOST alternatives | Nuxt 4.6.4 Node preset | source |
SvelteKit sveltekit({ adapter: adapter() }) | Import adapter-node in vite.config.js; deploy build, manifest/lockfile and production dependencies | SvelteKit 3.1.1 / adapter-node 6.0.1 | source |
SvelteKit ORIGIN / paths.origin | Runtime canonical HTTPS ORIGIN if paths.origin is unset; a configured paths.origin supplies the trusted self-origin | SvelteKit 3.1.1 / adapter-node 6.0.1 | source |
SvelteKit PROTOCOL_HEADER / HOST_HEADER | x-forwarded-proto / x-forwarded-host only behind a trusted proxy that overwrites them; optional PORT_HEADER for forwarded port | adapter-node 6.0.1 | source |
Order of operations
1. Build for the actual host: next build, Nuxt build with node-server, or SvelteKit with adapter-node. SvelteKit 3 configuration belongs in vite.config.js; svelte.config.js is legacy (Node guide). 2. Next.js: copy public if present and .next/static into the corresponding standalone locations; start node .next/standalone/server.js. Nuxt: start NODE_ENV=production node .output/server/index.mjs. SvelteKit: install production dependencies and run node build. 3. Inject production configuration into the service process; Keep private Nuxt values outside runtimeConfig.public. 4. Terminate TLS at a trusted reverse proxy and block direct access to Node. Supply a fixed canonical origin or only headers that proxy overwrites. Submit a form, inspect a request-time account route, and load hashed JS and public assets through the public URL. 5. Restart the same artifact with a changed runtime API base; require the server-rendered response to use it. NEXT_PUBLIC values require rebuilding; Nuxt matching runtimeConfig overrides do not. For broader Next.js VPS operations, see self-host-nextjs-on-a-vps-docker-standalone-and-high-cpu.
Known failures and fixes
| Error (short quote) | Cause | Fix | Source |
|---|
| Client assets return 404 | Reported adapter-node 5.5.5 asset-directory regression | Check hashed scripts through the Node entry point; deploy complete assets and a compatible fixed adapter rather than HTML alone | Slavic-Sensei #16095 | | Old API URL after environment change (symptom) | Public value was baked into build or a Nuxt default read a differently named environment variable | Next.js: rebuild public values or move mutable reads server-side; Nuxt: declare matching runtimeConfig keys and NUXT overrides | source; source |
Missing
- One Node instance only; multi-instance cache coordination, rolling deployments and edge adapters require separate setup.
- Changing a host variable cannot unfreeze code already embedded in browser bundles. Application authentication remains required for account routes.
- The linked source does not confirm: Adapter reconstructs an origin different from the public HTTPS origin.
Checked
2026-11-12; Sources read: linked output, deployment, runtime and Node guides, plus the linked asset report. No build or server commands executed.
Related references: Next.js 16.4.5; runtimeConfig reference.
Not for: Nuxt on Cloudflare Workers; see nuxt-cloudflare-workers-or-pages-nitro-preset-deployconfig-env-vars-dev-vars
Started from a post by @Next.js, packaged by the editor. Original post