# Running node-RED as root

**URL:** <https://discourse.nodered.org/t/running-node-red-as-root/29889>\
**Category:** General\
**Created:** [11 July 2020 10:40 UTC](https://discourse.nodered.org/t/running-node-red-as-root/29889 "2020-07-11T10:40:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rog\_Red](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Rog\_Red](https://discourse.nodered.org/u/Rog_Red)\
**Post date:** [11 July 2020 10:40 UTC](https://discourse.nodered.org/t/running-node-red-as-root/29889/1 "2020-07-11T10:40:01Z")

</div>

Hi All,

I want to run Node RED as root (only using this in my local network) on my raspberry pi so that I can use 'node-red-contrib-amazon-echo' so I need to allow access to port 80.  
If I 'sudo su node-red start', I get "Waiting for missing types to be registered:" so none of the nodes will work.  
as a newbie I am obviously missing something.. can someone point me in the right direction?  
Is there an easy way to enable access to port 80?

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [11 July 2020 11:21 UTC](https://discourse.nodered.org/t/running-node-red-as-root/29889/2 "2020-07-11T11:21:12Z")

</div>

Have a look at this link... (I run Amazon Echo on port 8980 as a NORMAL Pi user).

> [@Alexa Voice Command to start the flow?](https://discourse.nodered.org/t/alexa-voice-command-to-start-the-flow/15606/5):
>
> I've used nearly all of them include the offering Simon mentioned. I'm currently using this node... On my Echo Dot I had to run the following as I didn't want to start Node-RED as root. It routes port 8980 to port 80. You need to enter 8980 as the port number in the amazon-alexa-hub You need to run these commands on your Pi if your using a WiFi connection. sudo apt-get install iptables-persistent sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT sudo iptables -A PREROUTING -t nat …

---

<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:** [11 July 2020 11:22 UTC](https://discourse.nodered.org/t/running-node-red-as-root/29889/3 "2020-07-11T11:22:03Z")

</div>

Not certain you absolutely need root.

See [this](https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443)

---

<div class="post-metadata">

**Author:** ![Rog\_Red](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Rog\_Red](https://discourse.nodered.org/u/Rog_Red)\
**Post date:** [11 July 2020 11:47 UTC](https://discourse.nodered.org/t/running-node-red-as-root/29889/4 "2020-07-11T11:47:15Z")

</div>

Thanks dynamicdave.. I now have my Echo online at 8980. Cant discover my amazon-echo-device yet so I'll go back and look at the setting. I think I am a step closer though. Thanks for your help 🙂

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [11 July 2020 11:58 UTC](https://discourse.nodered.org/t/running-node-red-as-root/29889/5 "2020-07-11T11:58:38Z")

</div>

Try creating a new device with the node and then asking Alexa to "discover devices" and see if it is found.

I've just tried my set-up and it's working fine (as there was 'talk' that after the last update by Amazon things had stopped working).

Good luck.

---

<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:** [11 July 2020 15:28 UTC](https://discourse.nodered.org/t/running-node-red-as-root/29889/6 "2020-07-11T15:28:26Z")

</div>

There is another way to allow Node-RED to use port 80 without running as root and that is to run it as a service from systemd. This is how web servers work.

---

<div class="post-metadata">

**Author:** ![Rog\_Red](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@Rog\_Red](https://discourse.nodered.org/u/Rog_Red)\
**Post date:** [12 July 2020 00:26 UTC](https://discourse.nodered.org/t/running-node-red-as-root/29889/7 "2020-07-12T00:26:25Z")

</div>

An update:

Thanks everyone for their comments. I tried the suggestions here but unfortunately (perhaps due to a lack of knowledge on my part) was only able to get Echo to detect my new devices with node-RED running as root. But now it all works so I am happy 🙂 I had to uninstall and re-install all the nodes which were coming up with 'Waiting for missing node types to be registered'. So in case it may help anyone else, I thought I would post the update.  
Thanks for your help!

---

<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:** [26 July 2020 00:26 UTC](https://discourse.nodered.org/t/running-node-red-as-root/29889/8 "2020-07-26T00:26:33Z")

</div>

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