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

**URL:** <https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360>\
**Category:** General\
**Created:** [8 April 2023 09:44 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360 "2023-04-08T09:44:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabikm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabikm/32/52259_2.png) [@fabikm](https://discourse.nodered.org/u/fabikm)\
**Post date:** [8 April 2023 09:44 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/1 "2023-04-08T09:44:57Z")

</div>

Hello,

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 192.168.0.1:999 for the admin interface and 192.168.0.1:80 for the UI interface. Does anyone know if this is possible and how to do it?

Thank you.

---

<div class="post-metadata">

**Author:** ![kevinGodell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kevingodell/32/27040_2.png) [@kevinGodell](https://discourse.nodered.org/u/kevinGodell)\
**Post date:** [8 April 2023 13:23 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/2 "2023-04-08T13:23:13Z")

</div>

> [@fabikm](#):
>
> Does anyone know if this is possible and how to do it

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?

---

<div class="post-metadata">

**Author:** ![fabikm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabikm/32/52259_2.png) [@fabikm](https://discourse.nodered.org/u/fabikm)\
**Post date:** [8 April 2023 17:08 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/3 "2023-04-08T17:08:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [8 April 2023 17:23 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/4 "2023-04-08T17:23:08Z")

</div>

~~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/](http://IP:1880/) \<-- will require a password~~  
~~[http://IP:1880/ui](http://IP:1880/ui) \<- will not~~

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

~~see~~  
~~[Securing Node-RED : Node-RED](https://nodered.org/docs/user-guide/runtime/securing-node-red#editor--admin-api-security) \<-~~

EDIT:  
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.

---

<div class="post-metadata">

**Author:** ![kevinGodell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kevingodell/32/27040_2.png) [@kevinGodell](https://discourse.nodered.org/u/kevinGodell)\
**Post date:** [8 April 2023 17:49 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/5 "2023-04-08T17:49:11Z")

</div>

> [@fabikm](#):
>
> Is there any better idea how to do that?

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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 April 2023 20:55 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/6 "2023-04-08T20:55:37Z")

</div>

> [@fabikm](#):
>
> Is there any better idea how to do that?

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

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [9 April 2023 01:23 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/7 "2023-04-09T01:23:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fabikm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabikm/32/52259_2.png) [@fabikm](https://discourse.nodered.org/u/fabikm)\
**Post date:** [10 April 2023 21:14 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/8 "2023-04-10T21:14:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fabikm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabikm/32/52259_2.png) [@fabikm](https://discourse.nodered.org/u/fabikm)\
**Post date:** [10 April 2023 21:17 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/9 "2023-04-10T21:17:30Z")

</div>

Better than expose port 80 (just have admin hidden under [www.domain-name.com/admin](http://www.domain-name.com/admin))  
What would be a basic outline of the setup that needs to be done(within NGINX service)?

---

<div class="post-metadata">

**Author:** ![fabikm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabikm/32/52259_2.png) [@fabikm](https://discourse.nodered.org/u/fabikm)\
**Post date:** [10 April 2023 21:22 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/10 "2023-04-10T21:22:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [11 April 2023 19:25 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/11 "2023-04-11T19:25:03Z")

</div>

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.

> **[GitHub - TotallyInformation/alternate-node-red-installer: An alternative...](https://github.com/TotallyInformation/alternate-node-red-installer)**
>
> An alternative installer for Node-RED. Avoids global installs, no admin rights required. - GitHub - TotallyInformation/alternate-node-red-installer: An alternative installer for Node-RED. Avoids gl...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 June 2023 19:25 UTC](https://discourse.nodered.org/t/how-to-set-different-ui-port-and-admin-port/77360/12 "2023-06-10T19:25:54Z")

</div>

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