Updating from NR v0.20.5 to latest version in a Pi: Anything to worry about?

I have had a very stable and happy experience with NR v0.20.5 for the past very long while but figure it's time to upgrade because, well... because.
This is where I stand:

20 Dec 10:50:28 - [info] Node-RED version: v0.20.5
20 Dec 10:50:28 - [info] Node.js version: v10.24.1
20 Dec 10:50:28 - [info] Linux 4.19.66-v7+ arm LE

Is running the install/update Bash script the way to go? Is there anything obvious that might break?
Are there any precautions I should take first?
Of course I will backup my flows and so on, but I'd prefer to avoid nasty surprises.



Backup your userDir folder except for the node_modules folder. Then it is easy to go back if you need to.

THe script should work but you should do sudo apt update && sudo apt upgrade first to make sure everything else is up to date.

Which version of Raspbian are you using, there may be issues with old versions.

That should be
sudo apt full-upgrade

Not really, apt upgrade is the safer option. full-upgrade may auto-remove some packages that you might wish to retain.

full-upgrade will not remove any packages without asking if it is ok (assuming you have not specified -y in the command). It will only want to remove a package if it is necessary to remove it in order to upgrade a package, so the danger in using just upgrade is that it will leave one or more packages not upgraded.
In practice I think that the likelihood of it wanting to remove a package that should not be removed is very small. In more than a dozen years of using Linux this has never happened to me. I think it is not likely to happen unless you have apps that have been self compiled, in which case the app may require a package which full-upgrade wants to remove.

Finally, on Ubuntu, if one uses the GUI upgrade system, or configures auto update, then in the background it uses full-upgrade without asking about removing packages that need to be removed. I don't know about the Raspbian GUI, but I suspect that it may do the same, assuming that Raspbian has such a tool.

It took a while to drum up the courage, but I am now running Bullseye:

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION="11 (bullseye)"

A user error caused me to upgrade to Buster (from Stretch) before doing it all again to get to Bullseye.
As near as I can tell, the only thing that broke was mosquitto because the the version I was running allowed external connections by default and the newest version doesn't. Two lines in the configuration file later, everything started working again. PiHole didn't miss a beat because I kept several of the PiHole-related config files during the upgrade(s).

Then I ran the script to install NR and after the first failure I specified --node12 it ran through to completion without error. I was scared to go higher than 12, someone can chime in and tell me whether I should upgrade to 14 or 16.

Now I am 100% up to date! The latest NR looks great.

Thanks for the advice.


The recommended version is 14, but 16 is also supported by the node red core. I run 16. There may be some contrib nodes that still do not support 16, but nothing that I use comes into that category.
I can see no reason not to use at least 14. It is easy to go back again after an upgrade should there be an issue.

Thanks for the guidance. I will look into upgrading to 14. If you have a pointer to a how-to guide, I'd be happy to see it.

I used this script on buster without any problems:
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node14


What machine are you using too?

I have just had a recent bad event when updating the O/S on a RasPi.

If it is a ZERO, do NOT update to BUSTER. You will not get it working.

Im using RevPi 3+ (industriav version of raspberry 3). This script was used to install the node-red on both linux stretch and buster without any errors.

If you only need to install NodeJS on debian 11 then you perhaps need to take this steps:

sudo apt update
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt -y install nodejs
node -v

Well I updated the O/S and it did work. (Up two levels)

It took a long time, and I was a bit worried. But it does work.

Sorry.. Yeah, you are only updating Node-Red. All should also be good there.

I upgraded everything and it was successful. I too was nervous and yes it took a long time (RPi3B). Now I need to update Node.js. Since there is a maintenance release for NR, I'll update everything (except the OS) again.
Fingers crossed.

Since you used the script, then the usual system updates should keep nodejs up to date

sudo apt update
sudo apt full-upgrade

Running those two commands upgraded node.js from v12.22.8 to v12.22.9, so it kept my Node 12 up to date but didn't move me to 14.
Multiple sources on the web all say to do it the way @nerevar suggested, so that's what I did and I am now running v14.18.3.

Now I need to look at upgrading to a RPi4.


Moving between major versions of node.js requires a change of source. The debian/ubuntu nodesource repo has the details.

distributions/README.md at master · nodesource/distributions (github.com)

That is the method that nerevar pointed you to.

I didn't realise that is what you wanted to do. To do that the easiest way is the run the node-red install script again with --node14 on the end, as suggested earlier.

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