Skip to content

Fix: Bind Next.js to 0.0.0.0 instead of localhost#32

Merged
BigSimmo merged 1 commit into
mainfrom
railway/code-change-VVmaRR
Jun 14, 2026
Merged

Fix: Bind Next.js to 0.0.0.0 instead of localhost#32
BigSimmo merged 1 commit into
mainfrom
railway/code-change-VVmaRR

Conversation

@railway-app

@railway-app railway-app Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Problem

The Next.js app was spawned with --hostname localhost, binding it to 127.0.0.1 only. Railway's healthcheck probe connects from outside the container, so it could never reach the app, causing every deployment to fail.

Solution

Changed the --hostname argument in scripts/dev-free-port.mjs from "localhost" to "0.0.0.0", so Next.js listens on all network interfaces. This allows Railway's healthcheck and external traffic to reach the app.

Changes

  • Modified scripts/dev-free-port.mjs

Generated by Railway

@BigSimmo
BigSimmo merged commit ce09f76 into main Jun 14, 2026
8 of 11 checks passed
@BigSimmo
BigSimmo deleted the railway/code-change-VVmaRR branch June 14, 2026 09:36
BigSimmo added a commit that referenced this pull request Jul 22, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
BigSimmo added a commit that referenced this pull request Jul 22, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
BigSimmo added a commit that referenced this pull request Jul 22, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant