Cloud Run: Container Failed to Start and Listen on PORT

Share
Workaround available Cloud Run, gcloud Updated November 14, 2026Based on 4 user reportsHow we research

Quick answer

Your app must listen on the port given in the PORT environment variable and bind to 0.0.0.0, not 127.0.0.1. Test the image locally and read the Cloud Logging output for startup crashes.

Most likely fix: Listen on PORT and 0.0.0.0

How to fix it

Try these in order — the most common fix is first.

  1. 1. Listen on PORT and 0.0.0.0

    1. Read the PORT environment variable in your code (Cloud Run sets it, default 8080)
    2. Bind the server to 0.0.0.0, not localhost
    Did this fix it?
  2. 2. Run the image locally

    1. Run the container with docker run and the PORT variable set
    2. If it fails locally, fix that first
    Did this fix it?
  3. 3. Build for 64-bit Linux

    1. On Apple Silicon, build with Cloud Build or specify --platform linux/amd64
    2. Redeploy the new image
    Did this fix it?
  4. 4. Check the logs

    1. Open Cloud Logging and filter stdout and stderr for the service
    2. Check Error Reporting for crashes at startup
    Did this fix it?
  5. 5. Python source deployments

    1. Add a web server such as gunicorn (or fastapi and uvicorn) to requirements.txt
    2. Or set the entrypoint with --set-build-env-vars GOOGLE_ENTRYPOINT or a Procfile
    Did this fix it?

Symptoms

Deploy fails with: the user-provided container failed to start and listen on the port defined by the PORT environment variable.

Why it happens

  • App hardcodes a port instead of reading PORT
  • App binds to 127.0.0.1 instead of 0.0.0.0
  • App crashes at startup (missing dependency, bad config)
  • Image built for ARM (Apple Silicon) instead of 64-bit Linux
  • Python source deploy with a default gunicorn entrypoint that doesn't match your app

This guide also covers

  • cloud run container failed to start and listen on the port
  • cloud run deploy failed
  • cloud run port 8080 error
  • cloud run container failed to start

Still not working?

If Google Cloud keeps failing, you're not alone. See every Google Cloud problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other Google Cloud errors