Anyway to remove the "1880" from the node-red url?

I need to make it easier for ppl to access since i'm making a industrial dashboard, right now it is like "industry:1880/dashboard" and i want to make it something like "industry/dashboard". Sorry if it is duplicated post, but when i searched it I either didn't find or dind't really understand and thought it was not the answer to my question...

(I'm not expert, but......)

The 1880 is a port and is used to get to the Node-Red page.

HTML pages are .... 80 usually.

As that is the default it is not needed/used to get to normal (other?) pages.

If you want to access Node-Red you will need to use 1880

You can change the port from settings.js to anything >1024. If you want to use something <1024 you would generally have to run Node-RED as root which is not recommended. However, you can get round that when running a service from systemd - I can't remember the details off the top of my head - it is in another post somewhere.

Alternatively, you can use a reverse proxy and hide everything behind that. That approach brings other benefits too though it does have a higher resource overhead of course.

i've tried switching the port to 80 but it didn't really help for i could not access the page, it would search in the google... malbe i'd need to add something after a tfot? like industry."somethinghere"/dashboard?

(Again: I'm not expert)

You seem to be missing a basic principle of how it works.

HTTP uses port 80.

That is the standard for the internet. Browsers talk on port 80.

Node-Red is a JavaScript platform that may send HTML stuff down to the browser, but it isn't HTML.

It is JavaScript.

@TotallyInformation explained the use of ports.
Anything above 1024 is fine. If you want it below 1024 you need to run Node-Red as ROOT and this is NOT recommended.

I'm way out of my skill set. Read what @TotallyInformation said.

It is just how it is. All Node-Red pages are on port 1880. (Or anything above 1024 if you edit the settings file)

There is nothing magic about port 1880, it can be any free port. Those below 1024 are privileged which is why you need root or the systemd workaround (systemd itself runs as root).

Node-RED will happily run on port 80 or 443 but if you want users not to see the port number in their browsers, you have to follow the standards and, as you say, 80 is the standard for http, 443 is the standard for https. Browsers generally won't show those by convention.

hmmm I guess I will just leave as it is then? It's not like it is super hard to access anyway, i just wanted to make it even easier, and more like a regular website.

It really isn't that hard to do.

I see, i guess i will leave it as it is, cause they'd need to type out ":80" anyway in order to access, since otherwise it would just return a google search

The problem is, i tried that, I changed the port, but as I said it returned a google search instead...

No, that isn't correct. If I'm running Node-RED on a device 192.168.1.20 without TLS configured and I set the port to 80, users can just type the IP address and it will just work.

Then something else is misconfigured. Without knowing the configuration it is hard to be more specific.

the thing is, they referenced the ip of my machine as "industry" so typing out "industry/dashboard" in the google chrome won't do.

OK, for that to work, you need something running on the same network that translates the name industry to an IP address. There are several possible ways of doing that.

The reason the browsers are doing a search is because they don't recognise industry as an address.

Typically you would have industry.my.com or whatever. Single word addresses are rare and hard to configure centrally. You could use the HOSTS file locally though.

Well, since i'm not really the one who takes care of that part i will talk with the IT team and see what we can do.

Make a bookmark in the browser to the :1880 address, it isn't that hard, unless you wan't to give up on all kinds of security risks or setup+maintain all kinds of tools to reduce that risk and make it work.

1 Like

Chrome automatically does a web search when you enter a word without a valid domain (.com, .org). To make it understand "industry" is a local name you will need to add http:// in the beginning. Adding the port is not necessary if it is 80.

2 Likes

I have another web server running at home (on my synology NAS) and have set up a simple redirect to my nodered dashboard. This will allow you to have a much simpler address and then redirect to your dashboard on port 1880 ie I just type in NAS1/dash to take me to my dashboard.

Hi,
If you want to use 1880 but not show it to end-users and use port 80 for them, you could choose to forward port 80 to 1880. You could also forward based on port 80 and portion of a URL.

A web-server like nginx can do this easily, there are probably more web-servers that can do this or port forwarding in linux.

Best regards,
Menno