Public domain returns 404 while container returns 401 internally – anyone experienced this?
v7nc35
FREEOP

5 hours ago

Hi Railway Community,

We’re experiencing a strange HTTP routing issue and would appreciate advice from anyone who has encountered something similar.

The problem: Our Railway service deploys successfully, starts normally and responds correctly to HTTP requests inside the container. However, the public Railway-generated domain returns HTTP 404 while the container is running.

Our setup:

  • Project: modularmind-alpaca-paper
  • Environment: paper-staging
  • Service: alpaca-paper-observer
  • Region: iad
  • Public domain: alpaca-paper-observer-paper-staging.up.railway.app
  • Target port: 8787
  • Python HTTP server listening on 0.0.0.0:8787
  • Docker deployment
  • Private Networking enabled (IPv4 & IPv6)
  • Auto Deploy disabled intentionally
  • Restart policy: NEVER

What we’ve verified:

On October 17, 2026:

  • 15:59:09 UTC – Container starts successfully.
  • Internal GET /status to 127.0.0.1:8787 returns HTTP 401, as expected without authentication.
  • Internal response includes X-Observer-Handler: readonly-archive-v1.
  • 15:59:58 and 16:00:02 UTC – External GET /status requests return HTTP 404 in 1–4 ms.
  • No matching external requests appear in our instrumented Python HTTP handler logs.
  • 16:04:09 UTC – Container shuts down normally after its configured 300-second test window.

The browser response is:

{"status": "NOT_FOUND"}

Railway HTTP logs confirm the external 404 responses, with no upstream errors recorded for those requests.

We also noticed a separate message in Railway’s GitHub integration settings:

Could not load branches. Retry

The repository is still connected to main, and manually approved deployments build successfully.

What we’ve already ruled out:

  • The application not starting
  • An incorrect public target port
  • A failed internal HTTP handler
  • Private Networking being disabled
  • A Docker build failure

We’ve also seen related Railway Community posts where similar issues were traced to edge routing, private networking or underlying infrastructure problems. However, we don’t want to assume the cause is identical.

Our questions:

  1. Has anyone experienced a Railway-generated *.up.railway.app domain returning 404 while the application works correctly inside the running container?
  2. Could this indicate a stale edge route or incorrect deployment/upstream mapping?
  3. Is there a safe way to refresh or repair the public routing without recreating the service?
  4. Could the Could not load branches warning be related, or is it likely independent?

We want to preserve the existing persistent volume, application configuration and credentials.

We’d especially appreciate input from Railway staff or anyone who has successfully resolved this exact internal-401/external-404 discrepancy.

Thanks in advance!

$10 Bounty

0 Replies

Railway
BOT

5 hours ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • about 5 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...