🔧 Unbreak My AppAll fixesFix KitsSponsor

Fixes › Deploys

Replit deploy: app not reachable / port not open

Replit

The error

Your app is not listening on the expected port / deployment health check failed

Why it happens

The server listens on localhost/127.0.0.1 or a hard-coded port. Deployments need it bound to 0.0.0.0 on the port the platform gives you (process.env.PORT), and the health check expects a quick 200 on /.

How to fix it

  1. Listen on 0.0.0.0 and process.env.PORT (with a fallback).
  2. Make sure / responds quickly with 200.
  3. Check the run command in the deployment config starts the production server.
  4. Move secrets into Replit Secrets, which deployments read too.

Fix prompt (paste into Lovable, Bolt, Cursor, Replit or v0)

My Replit deployment fails its health check. Make the server listen on host 0.0.0.0 and port process.env.PORT (fallback 3000), make GET / return 200 fast, set the deployment run command to the production start script, and list any secrets I need to add.

FAQ

Why does it work in the workspace?

The workspace preview is more forgiving about host and port.

Where do env vars go?

Replit Secrets.

Related fixes

Want the full checklist for this area? Get a Fix Kit ($29)

Get one new fix a week

Free newsletter: the newest breakages in Lovable, Bolt, Cursor, Replit and v0 apps, with paste-in fixes.

We only use your email to send the newsletter. Unsubscribe any time. See privacy.