Node-RED on PORT 80

3,101 views
Skip to first unread message

Ram

unread,
Mar 25, 2017, 2:25:10 AM3/25/17
to Node-RED
How to get node-red to work on port 80 instead of 1880?

Leif Neland

unread,
Mar 25, 2017, 2:41:41 AM3/25/17
to Node-RED
A better idea perhaps to let apache be proxy, and take care of authentication and access control.

Nick O'Leary

unread,
Mar 25, 2017, 3:46:29 AM3/25/17
to Node-RED

Have a look at the uiPort setting: http://nodered.org/docs/configuration


--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/5c1adbbb-921f-4fb8-a718-0924b7f1b5a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ram

unread,
Mar 25, 2017, 4:38:42 AM3/25/17
to Node-RED
@Nick, If I change uiPort: process.env.PORT || 1880 to 80, I get the following error

25 Mar 08:38:16 - [warn] Communication server error: Error: listen EACCES 0.0.0.0:8025 Mar 08:38:16 - [error] Uncaught Exception:25 Mar 08:38:16 - [error] Error: listen EACCES 0.0.0.0:80 at Object.exports._errnoException (util.js:1029:11) at exports._exceptionWithHostPort (util.js:1052:20) at Server._listen2 (net.js:1251:19) at listen (net.js:1300:10) at doListening (net.js:1399:7) at _combinedTickCallback (internal/process/next_tick.js:83:11) at process._tickCallback (internal/process/next_tick.js:104:9)

Nick O'Leary

unread,
Mar 25, 2017, 4:40:51 AM3/25/17
to Node-RED

Typically only the root user has permission to use ports below 1024.

Read up on allowing other users to access the port.

Nick


Julian Knight

unread,
Mar 25, 2017, 9:13:41 AM3/25/17
to Node-RED
Not really a good idea to try to get that working as port 80 as you have to mess with permissions as Nick says. Much better if you can to run Node-RED behind something like NGINX. You can also look at Phusion Passenger which is designed to help with that kind of thing.

There are a number of advantages to that approach, especially if you are looking to make it available over the Internet. They include added security, proxying TLS, intelligent caching, port and path mapping and clustering. Passenger can also be used to ensure that Node-RED is always running when needed.

Ben Hardill

unread,
Mar 25, 2017, 3:51:19 PM3/25/17
to Node-RED
Using setcap to allow none root to bind to low ports is perfectly safe.

http://stackoverflow.com/a/414258/504554

Julian Knight

unread,
Mar 25, 2017, 7:43:46 PM3/25/17
to Node-RED
Do you not have to give that privilege to node itself? If so, not sure that is necessarily all that safe?
Reply all
Reply to author
Forward
0 new messages