Deplying Astro / node project with Server Side Rendering (SSR)

Hey guys,

I am trying to deploy the frontend of my webapp. Its Astro with SSR enabled.

How do I get around this error:

==> Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don’t need to receive traffic on any port, create a background worker instead.

I am at a loss. I tried everything, from not specifying ports to let Render handle it, to having a fallback port, but this error keeps coming up.

Any help is appreciated.

Things I’ve tried:

Not specifying port
Setting port to 3000
Setting port to port: process.env.PORT || 3000,
Host: true

I have no ideas.

Hi Mitch,

Have you tried out the guidance in our port binding docs yet? https://docs.render.com/web-services#port-binding

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

Not sure what part you’re referring to, but I have tried setting port: process.env.PORT || 3000, in my astro.config.mjs as stated above (which is pretty much identical to the docs) and it did not work.

I converted the port from string to int and now it works lol.

Glad you got it working! Thanks for sharing your solution.

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.