Where to install Node-red

Hi everyone.
I am new to Node-Red and want to know where best to install the program.
I have an Emonpi for energy monitoring.
I also have a Raspberry Pi 4 running Home Assistant that is very much a work in progress
I am new to both the above and want to use Node-Red to help integrate various devices into both Home Assistant and Emoncms and create automations etc.
I use a PC to carry out changes to the EmonPi and Raspberry Pi

Would it be better to locally on my PC or on the EmonPi or Raspberry Pi home assistant

Thanks in advance

Node-red is installed in ~/.node-red on the RasPi.

Have you read the stuff on this link:
https://nodered.org/docs/hardware/raspberrypi

That's not what the OP asked!

To me the is node-red. If I am wrong - which I usually am - ok.

Definitely best on the Pi. Whether as the default stand-alone global installation, part of Home Assistant or as a local install is entirely up to you. If HA will be your focus then maybe you should use that. However, if you want the greatest flexibility, a local install on the Pi would be good. The default global install is somewhere in the middle.

Local install will be the more complex but done once, updates and backups are really easy. For the global install, you can use Dave's install script but then you may not learn how it all works (of course, that might not be important to you anyway). The HA install is the most integrated to HA but Node-RED versions may not happen as quickly and possibly one or two things might not work as most people would describe them in the forum.

Thanks for the link.

Yes i did. Both Emonpi and Home Assistant have guides and are able to run Node-red.

Is there any advantage in running locally on my pc over running it on either device.

That is the userDir where all the data for your Node-RED instance lives. The actual installation is elsewhere depending on how you install it. The 4 most common methods being:

  1. The default global install (maybe using Dave's script on a Pi or Debian device)
  2. A local install as in the example of my alternate install repo
  3. Integrated to HA - I don't know where that goes
  4. Docker

Are all 3 devices running 24/7?

There are 2 potential reasons for running locally. Either you want the capabilities of Node-RED on your PC or you want to develop flows away from your "live" system and the PC is most convenient.

I only wouldn't run on the Pi (assuming it is stable and running 24x7) if that device was already heavily loaded AND your PC is also running 24x7 (which is probably rather wasteful of energy).

Thanks. I have a spare pi, so will have a go at that as it would be easiest.
Can you have two instances running, ie a local install and a HA install

The HA and emonpi run 24/7 the pc no

Only the Pi and EmonPi run 24/7

Sounds sensible.

Yes, you can have as many instances of Node-RED running on a device as you have resources and spare TCP/IP ports for. Each instance on one device has to be on a separate IP Port (actually, there are ways around that but I don't think you are interested in that at the moment. But virtual machines and reverse proxies can provide workarounds).

You can certainly have a local install and an HA install as long as your local install uses a different port (I don't know whether you can change the port in HA).

You can have a single installed version of Node-RED running multiple times. Or you can go the full localised route as I tend to and as illustrated in my alternate install repo where you can have different versions of Node-RED running as well - useful both for backup/recovery and if you want to run test instances for new versions of Node-RED.

Oh, either way, for each instance, you will need a separate userDir folder. That is where all of the settings and flows and other stuff for Node-RED is stored.

Yes you can, but I don't know if there would be any advantage to running it in HA if you also have it running stand alone.

1 Like

Different Dashboards, one NR instance with more secure code than the other, one instance dealing with serial or other legacy hardware and the other focused on processing flows, ...

You are right of course, but in the context of the question I suspect that is not what is being looked for. I may well be wrong however.

Thanks everyone.
I will install on spare pi whilst i learn how to use it.

The install on the HA pi can wait till i know what i am doing as i don't want to screw up my current setup

1 Like

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