Connecting to the Port

I apologise in advance, I’m very new to ports.
I’ve set my bot up to look at port “3000” but when I try and connect ( it just times out.

I’ve looked around, and apparently, I don’t have to specify the port, it should just detect it if I request to the URL:

Glitch projects use port 3000 before the proxy. After the proxy, they use ports 80 and 443.

To connect to your Glitch project in your browser, you can visit:

1 Like

So the port in process.env.PORT corresponds to what? Is that the local port or the external port?
I’m trying to set the two ports here, so it can communicate with a executable on my pc.

If you are talking to your project from your PC, you should set it to 80 on your PC.

Inside of the Glitch project, it should be 3000.

Could you elaborate on that more please. I don’t quite understand. I really appreciate your help although, thank you.

1 Like

You should only worry about port 3000 on the inside of your Glitch project, its just an internal port.

I get this error tho, when setting the process.env.PORT to 3000: listen tcp :3000: bind: address already in use

My config file, related to the image I sent above is displayed like this:


I’ve been seeing this issue a lot on the forums recently, I would recommend that you contact

Alright, but what are you saying.

The host should be HOST = PORT = 3000?

Hold on! It randomly decided to work!

Glitch projects expose only port 3000. Only 3000.

So you need to make sure that your bot listens to port 3000 and only port 3000.

Then, you can directly visit the URL of your project, there’s no need to add the port number at the end.