Deployed repl gives error 502 on the domain
I just want to test this feature and see what it takes to get it working specifically for nodeJS web repls to see if Replit Deployments are a viable option for hosting my various low traffic nodejs APIs.

After a bit of work (and 15 failed deployments), I got the repl to deploy with a success.
However, the routing server on the deployment does not seem to work.

After an hour of waiting, this still happens. Error 502 means gateway error btw.



I am hacker plan.

The repl loads to webview just fine in dev

Your run command seems to be npm run test, try changing it to node index.js.


Doing so now.

If this doesn’t work, it’s almost definitely an issue with deployments, I’ve pinged the team and hopefully they can get this fixed as soon as possible. :slight_smile:

1 Like

Why does Deployments keep creating new VMs?

Thanks for pinging the team, I appreciate it

Frankly, I have no idea, I don’t know how deployments work at all really. My best guess would be maybe if your using like 4 vCPUs for example, it might create four ‘virtual machines’… But I’m just grasping at straws here and I really have no idea (the team may be able to clarify that too).

1 Like

4 vCPUs would still run on 1 VM otherwise the service wouldn’t be able to intercommunicate between threads to take advantage of the multithreading. Also I’m using 0.5vCPU (shared CPU) so that def shouldn’t be a problem.

Looking forward to the team’s response. Seems like they may be the only ones who can shed light on what the heck’s going on and what more I have to do to give them more of my money XD

1 Like

Hey there, happy to look into this for you.

That is odd that is continuously creating VMs. It’s supposed to just create one, like you might expect. Thanks for sharing… kind of a hilarious bug, but no, it’s not supposed to do that.

The issue is in this block in your .replit file:

externalPort = 8080

8080 is actually your local port, since that’s what your application listens on. You can either update it to this:

localPort = 8080
externalPort = 80

Or, if you remove the [[ports]] block entirely then the deployment will just auto-detect the port for you.

Thanks for reporting, we need to improve our error message for this case!


Yeah haha

I dont want browsers to assume it is HTTP[/s] since it is 80 but alright, I’ve made this modification to the [[ports]] header of the replit file.

I’ve canceled the deployment after an estimated 5000 VMs created and destroyed :slight_smile:

Redeployment success. Thanks Lincoln!

All traffic to your Deployment (and Repls in the Workspace work this same way) will be plain HTTP, regardless of which port it comes in on. We handle the HTTPS aspect of it with our reverse proxies and then forward just the plain HTTP requests to your server.

Glad it works now! If you don’t mind, go ahead and accept the answer so the topic will auto-close.


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