External access to ip & port

My little RPi has been doing its dietpi thing for ages on my home network. Nothing going external. I’ve started to put a fresh install together and will have a external address. One thing I can’t get me head round is pointing to an IP & port.

example: If I was to point to a nextcloud instance then I can set a DNS record to point to example.com/nextcloud (I think…not tried it)

If I wanted to point to a node red instance then as it is port 1880 then I can’t point to an IP & Port (or its not a good idea). How do I point my domain to example.com:1880?

If his on Google domains or via something on the server side (apache virtual host?). I’m probably not asking the question right but hopefully it makes sense. I don’t think I’ve seen a similar question in the forum



Basically, if you have DDNS, ensure it is always pointing to your public IP address. Theoretically you could forward every port you like to your DietPi system. This would need to be done on your internet router. Usually there is a function to define port to be forward to a specific system inside your network. If you don’t want to open too many ports on your router, you could think of a revers proxy (typically a web server). Most apps offer configuration example for Apache or Nginx.

1 Like