New Utility: alternate-node-red-installer

Hi all, as I'm needing to install some clean installations of Node-RED for testing, I thought that I would finally get round to writing a proper tool for installing multiple independent instances of Node-RED.

I've just finished that off and published to GitHub and npm so you should be able to use it straight away if you have a need for such a thing. It gives you a command-line installer that takes a single parameter controlling the root folder for installation. It should work on all platforms.

This follows the installation approach that I've used for a couple of years now as I don't like to do global installs of server packages. A global install of Node-RED also restricts you to only having a single version installed which is not ideal for testing.

The advantages of this approach I believe are:

  • You can have as many different versions of Node-RED installed as you like making it easy to compare behaviours.
  • Everything is in one place which makes backup and restore (including a known, working version of Node-RED itself) really simple.
  • Everything is in a place that you have chosen. No wasted time hunting for folders in weird places.
  • Users don't need admin rights to install an instance of Node-RED.

Hope others find this useful. Let me know in this thread if you do or indeed if you don't!

As always, feedback and suggestions (preferably polite ones :slight_smile:) are welcome.


Is it possible to use this to run an earlier copy of Node-RED (e.g 0.20.8)?

Well the script itself will install the latest version. However, it is dead simple to then install whatever version you like.

So just let the script run, cd into the resulting master folder and then use npm install --unsafe-perm --production node-red@xxxx where xxxx is the version you want.

I regularly install a clean version for testing or a previous (or next) version for comparison.

1 Like

Perfect thank you :slight_smile:

Slight issue
Last week I installed it on my Win10 machine so I got 0.20.8

I wanted to update but it didn't work - I still seem to have 0.20.8
(PS same procedure worked fine on a Pi on Tues following launch of 1.0.0)

That's odd, I did that on mine and it worked ok - though I was "upgrading" from the @next version to the live v1

Instead, try a full install. From the master folder:

npm install --production --unsafe-perm node-red

That should work fine.

It did ta :slight_smile:

1 Like

[FeatureRequest] :slight_smile:

Everytime I use the alternate installer, I need to change the port used as I'm installing it on a machine that is already running standard Node-RED on 1880

Could we have a switch (-p ?) on the installer so that it saves me the trouble :slight_smile: of editing the settings.js file?

PS I'd accept a clever awk/sed/grep one liner (assuming in base folder not ./data) that does it in the meantime :slight_smile:

We could :slight_smile: - whether we will depends on me finding some time :face_with_raised_eyebrow:

Of course, there is already a method for setting the port on startup simply by setting the PORT environment variable before starting Node-RED.

So in theory, it would be possible to add this to the start npm script rather than trying to hack the settings.js which I'd prefer to leave alone since it does change from time-to-time.

1 Like

Feature request? Would it be possible to add an argument to the installer with the version to have it installed that way immediately, for example when testing bugs on potentially a specific version of NR? Or maybe add this to the documentation on github :slight_smile:

1 Like

Ah, that sounds like an excellent idea :grinning:

Of course, as Nick and Dave like to say: PR's are always welcome :face_with_raised_eyebrow:

I'll add an issue when I get some time.