# Change NR port to 80 (changes on red.js and settings.js doesn't have effect)

**URL:** https://discourse.nodered.org/t/change-nr-port-to-80-changes-on-red-js-and-settings-js-doesnt-have-effect/77566
**Category:** Dashboard
**Created:** [14 April 2023 13:37 UTC](https://discourse.nodered.org/t/change-nr-port-to-80-changes-on-red-js-and-settings-js-doesnt-have-effect/77566 "2023-04-14T13:37:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![GiovanniG](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@GiovanniG](https://discourse.nodered.org/u/GiovanniG)
#### Post date: [14 April 2023 13:37 UTC](https://discourse.nodered.org/t/change-nr-port-to-80-changes-on-red-js-and-settings-js-doesnt-have-effect/77566/1 "2023-04-14T13:37:07Z")

</div>

Hi, I'm under windows, under "C:\Users\Admin\AppData\Roaming\npm\node\_modules\node-red" I've changed on both files:  
on red.js settings.uiPort = 80;  
and on settings.js uiPort: process.env.PORT || 80  
I've restarted NR and keeps run on 1880, should I restart nodejs too? It means restart PC I suppose.  
Why it doesn't change?

---

<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: [14 April 2023 14:03 UTC](https://discourse.nodered.org/t/change-nr-port-to-80-changes-on-red-js-and-settings-js-doesnt-have-effect/77566/2 "2023-04-14T14:03:27Z")

</div>

When you run node-red in a command window it should tell you which settings.js it is using. That is the one you have to change.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [14 April 2023 14:31 UTC](https://discourse.nodered.org/t/change-nr-port-to-80-changes-on-red-js-and-settings-js-doesnt-have-effect/77566/3 "2023-04-14T14:31:09Z")

</div>

Generally, you cannot use ports \<1024 without running with administrative privileges which opens up other issues and is best not done.

If you wish to hide the Node-RED port from users:

1. You probably shouldn't be using HTTP but rather HTTPS (port 443 by default).
2. You are generally better off using a reverse proxy. IIS can provide that on Windows or you can install NGINX or similar.

The real question is - what are you trying to achieve by removing the port number?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [15 April 2023 07:48 UTC](https://discourse.nodered.org/t/change-nr-port-to-80-changes-on-red-js-and-settings-js-doesnt-have-effect/77566/4 "2023-04-15T07:48:36Z")

</div>

that is the node-red source code. You dont edit that.

You will have a `.node-red` folder likely in `c:\users\Admin\.node-red`

In there will be a `settings.js` file where you can change things.

Alternatively, start node-red with a command line option:

```auto
node-red -p 80

```

See all options here: [Running Node-RED locally : Node-RED](https://nodered.org/docs/getting-started/local#command-line-usage)

* * *

To second what Julian said, what is the goal? To have a prettier URL?

---

<div class="post-metadata">

### Author: ![GiovanniG](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@GiovanniG](https://discourse.nodered.org/u/GiovanniG)
#### Post date: [23 April 2023 18:49 UTC](https://discourse.nodered.org/t/change-nr-port-to-80-changes-on-red-js-and-settings-js-doesnt-have-effect/77566/5 "2023-04-23T18:49:48Z")

</div>

thank you mates, sorry for silly question, I've just found a copy of file and I couldn't imagine the main was on another path. Yes the command windows should tell which file is in use, I'll be more careful in future

---

<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: [7 May 2023 18:50 UTC](https://discourse.nodered.org/t/change-nr-port-to-80-changes-on-red-js-and-settings-js-doesnt-have-effect/77566/6 "2023-05-07T18:50:15Z")

</div>

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