From e2d9024cca52dc362fbfd5cc363d73d818eb5d8d Mon Sep 17 00:00:00 2001 From: Brandon WELSCH Date: Tue, 4 Aug 2026 15:36:49 +0200 Subject: [PATCH] fix(nextjs): Update nextjs standalone mode to precise hostname set to 0.0.0.0 to avoid boot timeout issue --- src/_posts/languages/nodejs/2000-01-01-nextjs-standalone.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/_posts/languages/nodejs/2000-01-01-nextjs-standalone.md b/src/_posts/languages/nodejs/2000-01-01-nextjs-standalone.md index 57fc09e0a..06b90f4ab 100644 --- a/src/_posts/languages/nodejs/2000-01-01-nextjs-standalone.md +++ b/src/_posts/languages/nodejs/2000-01-01-nextjs-standalone.md @@ -37,12 +37,16 @@ Start the server using Node.js. ```json { "scripts": { - "start": "node .next/standalone/server.js" + "start": "node .next/standalone/server.js --hostname 0.0.0.0" // others scripts } } ``` +{% warning %} + Ensure that the `--hostname` is set to 0.0.0.0 to avoid the [boot timeout issue]({% post_url languages/nodejs/2000-01-01-start %}#nextjs). +{% endwarning %} + {% note %} Reason: after build node_modules will have been removed, so the original command `next start` will error: `"sh: 1: next: not found"` {% endnote %}