How can i dns port 8080 or any other port then 80?

Hi, I am new here and I would like to know how to dns something to my node.js server on port 8080, because port 80 is already used for another node.js server.

DNS doesn’t do ports unless you use a SRV record. But you could try using a Worker to route traffic to a different port.

1 Like

Hi, i dont rly understand and i rly tried reading lots of things on how i can make it work but still nothing.

You can also subscribe to the Portzilla app:

Hi everyone, I’m currently experimenting with Node-JS, and made simple API with express.js that shows the time of the server. I host it on a Raspberry Pi which already has a NGINX website on port 80, so the API is hosted on port 8080.

So my question is: Can I point to mypublicip:8080 (when port 8080 is forwarded on my router of course)? And if not, is it possible to use

Thanks in advance!

Kind regards,

Do both sites (the port 80 one and the port 8080 one) reside on the same server?

1 Like

If both the port 80 and 8080 node.js servers are on devices (same server or not) on the same (e.g. home) network and you want them both remotely accessible as if they were on port 80, use nginx proxy/reverse proxy to serve the 8080 service as something like /api

Caveat there is that any given internet provider may choose to block certain ports (e.g. 25, 80, 443, anything above or below 1024, etc), and they may also do CG-NAT on your home connection. However if you already have something at home remotely accessible on one of those ports, that rules out CG-NAT and some port blocking interference.

If the main domain is already pointing to the port 80 service on your home network you can just nginx proxy as above. If the main domain is actually some different cloud hosted website, it’s probably just easier to port translate on your home router, so 80 in is translated to 8080 on the Pi

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