How to set different "UI" port and "admin" port


I'm trying to find out if it's possible to configure Node-RED to use different ports for the admin interface and the UI interface. Specifically, I'd like to use for the admin interface and for the UI interface. Does anyone know if this is possible and how to do it?

Thank you.

It is not possible. The admin and ui are each their own separate express apps attached to the same single server. Since there is only 1 server, it can only listen on 1 port.

I don't think this will ever become a feature since it can be handled outside of node-red using something like nginx as a reverse proxy.

Is your main goal to allow external access to the ui (dashboard and http in routes), but restrict access to the admin?

It is exactly as you write, restrict access for the admin, it is under the login and password, but it would be nice not to expose know port like 80 or 1880.

So ui on port 80 and admin on another, if it´s not possible it will use /admin on port 80 for example.

Is there any better idea how to do that?

I'm not sure if I'm on the right track - But...

The Editor can already be password protected : its already built in

http://IP:1880/ <-- will require a password
http://IP:1880/ui <- will not

if this more about protecting the editor then it making more "easy" to access the UI

Securing Node-RED : Node-RED <-

I need to learn to read the full discussion - you are already doing so

it is exactly as you write, restrict access for the admin, it is under the login and password, but it would be nice not to expose know port like 80 or 1880.

Yes, but that depends on how node-red is installed and perhaps your OS. Is it in docker or part of home-assistant or is there some other relevant info you want to share to make it easier for others to give suggestions?

Better than what? Using something like nginx is the best way to do it, as already suggested.

By admin do you mean programming? And the UI do you mean Dashboard?

If so, you can run 2 separate instances (or more) on the same machine or another. Then they would use different ports, of course. Use MQTT signaling between them. One would have your UI (Dashboard) and the other your main programming.

In this way you can have different passwords to keep your code separated. But you need a little programming overhead to pass MQTT Messages to and from your main.

Yes, of course within this forum also information to others who can solve a similar problem.

I personally use Ubuntu 18.04.6 LTS with node-red directly installed, nothing more.

Better than expose port 80 (just have admin hidden under
What would be a basic outline of the setup that needs to be done(within NGINX service)?

Thank you for the tip - this would certainly work, an interesting idea and possibility.

How exactly can you run 2 standalone instances, is there any best practice for this?

Read this. It's not a Node to install, but a set of install scripts and instructions for installing more than 1 instance on any machine. I currently have 1 as a base and then other folders which are copies of the original and run in 1880, 1881, 1882, (skip 1883 for Mosquitto MQTT broker), 1884, 1885 etc. MQTT is great for passing messages back and forth between your instances. These can all be the same Version or different versions of Node-RED.

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