Hi, what is the reason for wanting to know the IP and port? what is the end goal? Perhaps there is an other / better approach?
NOTE: The IP 127.0.0.1 will obviously work but which IP (or IPs) node-red is accessible on is a completely different kettle of fish (even IF you could get the IP addresses, you still dont know if the IP or Port is blocked by a firewall or non routed for example)
Much of this information is in RED.settings already.
However, the whole thing is complex and has some things to catch you out. I spent quite a lot of time trying to get this right for uibuilder vNext with input from others on dealing with things like what happens when you are behind a reverse proxy.
Thanks, for trying to help to find an alternative, but I simply need the url with ip and port that‘s all. Instead of the IP, the hostname would be ok, too.