# Best way to install Node-Red on openWRT

**URL:** <https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439>\
**Category:** General\
**Created:** [11 November 2022 10:58 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439 "2022-11-11T10:58:36Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![iotlibre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotlibre/32/70544_2.png) [@iotlibre](https://discourse.nodered.org/u/iotlibre)\
**Post date:** [11 November 2022 10:58 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/1 "2022-11-11T10:58:36Z")

</div>

I am working with Node-Red on various platforms and now I need to install Node-Red on openWRT  
What is the best way to install Node-Red on openWRT?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 November 2022 12:29 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/2 "2022-11-11T12:29:59Z")

</div>

have you tried a google searching `openwrt node-red`?

---

<div class="post-metadata">

**Author:** ![iotlibre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotlibre/32/70544_2.png) [@iotlibre](https://discourse.nodered.org/u/iotlibre)\
**Post date:** [11 November 2022 12:45 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/3 "2022-11-11T12:45:13Z")

</div>

Yes,  
The first option that appears is:

> **[GitHub - dceejay/openwrt-node-red: A packing up of Node-RED for OpenWRT](https://github.com/dceejay/openwrt-node-red)**
>
> A packing up of Node-RED for OpenWRT. Contribute to dceejay/openwrt-node-red development by creating an account on GitHub.

although this software has not been updated for more than two years  
The second option that I am going to try is to install node-npm and from there Node-Red  
Has anyone successfully tried one of these two options?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 November 2022 17:59 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/4 "2022-11-11T17:59:38Z")

</div>

Did you try that solution? Just to let you know the author of that is one of the original developers of Node-RED and is still working on it….  
Although it’s probably an old release….

A github issue opened 8 days ago might be informative:

> <https://github.com/dceejay/openwrt-node-red/issues/7>
>
> Hi Dceejay,
> 
> This is not an issue per say. I'm a noob seeking a little informt…ion. 
> I use the Teltonika RUTX11 product. I am able to load the latest version of your NodeRED (v1.3.1). I believe this can run on any ARM processor, with a UI based off Lua? 
> Last year, Teltonika updated thier system to run on Vue.js 2.6.12. Unfortunately, I am not able to use this code with the new changes. 
> I wanted to know if it is still possible to have this node red code ported across to new implementation. I'm curious to know what is required and will everything have to be re written from scratch?
> 
> Regards,

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 November 2022 21:39 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/5 "2022-11-11T21:39:10Z")

</div>

Hi,  
indeed it is old... as noted in that Issue - "I haven't updated this for a long while so this package itself is well behind the curve, and I don't have an immediate need for it so won't have time to update in the near term. "  
The old one was using node v8 I think which is no longer supported at all... Hopefully the latest nodejs for openwrt uses 14 or better - in which case you should be able to just install Node-RED on top. The main issue used to be (and may still be) that the default image only had a tiny amount of storage so the Node-RED install would blow that when it needed the build tools... so I had to expand the base memory - do the install - then shrink it back down to fit the device I wanted to use.

---

<div class="post-metadata">

**Author:** ![iotlibre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotlibre/32/70544_2.png) [@iotlibre](https://discourse.nodered.org/u/iotlibre)\
**Post date:** [2 December 2022 19:33 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/6 "2022-12-02T19:33:10Z")

</div>

thank you for your answer, it has helped me a lot  
I am working with Energy Communities and looking for solutions for energy measurement and control, for which openWRT seems to me to be a good tool. Unfortunately I am learning and I am getting into the operating system little by little.  
The latest device I have purchased is a GL-inet GL-A1300 which has an IPQ4018 processor. This processor does not support node-npm and therefore I cannot try to install node-red as I would like.  
I'll make sure the next device I buy supports node-npm so I can test your suggestion.

Best regards  
Oscar

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [2 December 2022 20:47 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/7 "2022-12-02T20:47:12Z")

</div>

Hi @iotlibre.

I'm interested in energy monitoring solutions (aren't we all, considering the price!)

Why did you choose openwrt as the platform?

I think the go-to low power platform used to be a raspberry pi. Sadly they are almost unobtainable nowadays.

---

<div class="post-metadata">

**Author:** ![madhouse](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@madhouse](https://discourse.nodered.org/u/madhouse)\
**Post date:** [2 December 2022 22:38 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/8 "2022-12-02T22:38:50Z")

</div>

> [@iotlibre](#):
>
> The latest device I have purchased is a GL-inet GL-A1300 which has an IPQ4018 processor. This processor does not support node-npm and therefore I cannot try to install node-red as I would like.  
> I'll make sure the next device I buy supports node-npm so I can test your suggestion.

Just because you can't easily install Node-Red on it doesn't mean it's totally unusable. Is Node.js something that can be installed on it? I would imagine if you were getting to the point of trying Node-Red, perhaps Node.js was a success. That would at least give you Javascripting abilities, which is still a powerful way of using the device.

Also, what is it you're trying to do with Node-Red? What's the project you're trying to work it into? Perhaps it may not fit on this device by itself. But perhaps there's a way to put Node-Red somewhere else and still utilize it with the device.

---

<div class="post-metadata">

**Author:** ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)\
**Post date:** [2 December 2022 23:17 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/9 "2022-12-02T23:17:17Z")

</div>

GL-Inet MV1000 (Brume), 1GB memory, OpenWRT 21.02:

```auto
$ opkg list node
node - v14.20.1-1 - Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

```

With 256MB of RAM on the A1300 I fear that any joy with node.js would be rather short-lived...

---

<div class="post-metadata">

**Author:** ![madhouse](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@madhouse](https://discourse.nodered.org/u/madhouse)\
**Post date:** [3 December 2022 01:10 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/10 "2022-12-03T01:10:23Z")

</div>

> [@tve](#):
>
> With 256MB of RAM on the A1300 I fear that any joy with node.js would be rather short-lived...

You would be surprised how efficient they try to make it. For perspective, the original Raspberry Pi model B had only 256 MB of RAM. I happen to have one, and it runs Raspian _ **AND** _ Node-Red at the same time rather happily. The only time it has problems is when I try to make the Pi itself render several dozen charts, which isn't a good idea for any small or underpowered system.

That unit of yours sounds quite capable, even if the library you have to choose from is outdated. It's a shame Node-Red doesn't have an install for it. That would make everything a lot easier. What's your project you're trying to build? I always find projects that use underutilized routers or other network devices fascinating. I have a PogoPlug v4 I played with a long time ago. This makes me almost want to dig it out again...

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 December 2022 08:38 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/11 "2022-12-03T08:38:09Z")

</div>

As long as you can get node14 and npm then you should be able to install it using

```auto
npm i -g --unsafe-perm node-red

```

then if you copy the init script form here - [openwrt-node-red/node-red at master · dceejay/openwrt-node-red · GitHub](https://github.com/dceejay/openwrt-node-red/blob/master/node-red) into `/etc/init.d/node-red` that should allow you to run it as a service.

Feel free to borrow as much as you need from that project.. indeed updates/pull requests would be much appreciated 🙂

---

<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:** [3 December 2022 09:24 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/12 "2022-12-03T09:24:29Z")

</div>

Am I right in thinking that there may be problems installing some nodes if the appropriate development tools are not available? Compilers and so on.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 December 2022 13:34 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/13 "2022-12-03T13:34:37Z")

</div>

Yes, of course. The shortcut above will skip them, but they aren't necessary for the core capability (and take up loads of room which may not be available on the smaller devices openwrt typically runs on.) ... Plus I didn't want to add anything that may be architecture specific if I could help it 🙂

---

<div class="post-metadata">

**Author:** ![iotlibre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotlibre/32/70544_2.png) [@iotlibre](https://discourse.nodered.org/u/iotlibre)\
**Post date:** [29 December 2022 18:18 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/14 "2022-12-29T18:18:40Z")

</div>

The project we are working on is for the measurement and control of "energy communities", which is the way in which Spanish law allows us to share centrally generated solar energy by various consumers/citizens.  
The ideal solution is to install Node-Red on a router because it allows us to monitor and control (example: electric car charging or domestic battery discharge) with a single device.  
These are the reference websites. I'm sorry they are only in Spanish, we haven't had time to translate them:

- [Documentacion Iot Libre — IoE\_documentacion documentation](https://iotlibre-documentacion.readthedocs.io/en/latest/index.html)
- [iotlibre · GitHub](https://github.com/iotlibre)

Node-Red is ideal because it relieves computer scientists from configuring everything and allows electrical engineers and other technicians to configure the operation of the network at each of its points.  
Thank you all very much for your help and I wish you that 2023 brings you bags of happiness

---

<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:** [27 February 2023 18:19 UTC](https://discourse.nodered.org/t/best-way-to-install-node-red-on-openwrt/70439/15 "2023-02-27T18:19:01Z")

</div>

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