Automatic Update of Node-RED?

Yesterday while I was trying to uninstall a certain node inside the palette manager, I had to restart node-red.
After restarting node-red the version was increased to 3.1.15 (from 3.1.14). I wonder if I missed something about an automatic update feature of node-red? Is this possible?

Are you sure? According to Releases · node-red/node-red · GitHub there never was a 3.1.15. Can you post a screenshot showing it?

Hi Colin,

yes, I am! :wink:
Here you are:

And it can also be seen in the journal:

Dez 18 15:48:12 bookworm node-red[3752]: Willkommen bei Node-RED
Dez 18 15:48:12 bookworm node-red[3752]: ===================
Dez 18 15:48:12 bookworm node-red[3752]: 18 Dec 15:48:12 - [info] Node-RED Version: v3.1.15
Dez 18 15:48:12 bookworm node-red[3752]: 18 Dec 15:48:12 - [info] Node.js  Version: v21.6.2
Dez 18 15:48:12 bookworm node-red[3752]: 18 Dec 15:48:12 - [info] Linux 6.1.21-v8+ arm64 LE
Dez 18 15:48:13 bookworm node-red[3752]: 18 Dec 15:48:13 - [info] Paletten-Nodes werden geladen

The Node.js Version is 21 because of the underlying DietPi Linux...

And that's the info, shown by clicking on "v3.1.15":

3.1.15 was published a couple days ago - Release 3.1.15 · node-red/node-red · GitHub

The release announcement post got delayed due to some issues with the 4.0.6 release that happened at the same time. Hopefully the unannounced 4.0.7 has solved them, and once we've confirmed that, I'll make the usual announcment post.

Thanks Nick,
but can you imagine how the update could have happened?

How did you install Node-RED originally?

It was via dietpi-software.
The interesting part is that I have more machines running the identical config - but none of them update automatically...

[EDIT]
...seems to be a restart of Node-RED after an upgrade of the installed Node

node-red-contrib-dwd-local-weather

:thinking:

[EDIT2]
As far as I could find out the dietpi-software install does this (found here)

if To_Install 122 node-red # Node-RED
		then
			# APT deps
			G_AGI python3

			# Data dir
			G_EXEC mkdir -p /mnt/dietpi_userdata/node-red

			# User
			Create_User -G dialout,gpio,i2c,spi -d /mnt/dietpi_userdata/node-red nodered
			# - Allow sudo calls
			G_EXEC eval 'echo '\''nodered ALL=NOPASSWD: ALL'\'' > /etc/sudoers.d/nodered'

			# Permissions
			G_EXEC chown -R nodered:nodered /mnt/dietpi_userdata/node-red

			# Install as local instance for "nodered" user
			G_EXEC cd /mnt/dietpi_userdata/node-red
			# - Disable cache
			local cache=$(runuser -u nodered -- mktemp -d)
			# - Reinstall: Remove all locally installed modules, to work around update issues, but preserve installed plugins from package.json: https://github.com/MichaIng/DietPi/issues/7128
			[[ -f 'package.json' ]] && G_EXEC rm -Rf node_modules .npm/_cacache
			G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red@latest
			G_EXEC rm -R "$cache"
			G_EXEC cd "$G_WORKING_DIR"

			# Service
			cat << '_EOF_' > /etc/systemd/system/node-red.service
[Unit]
Description=Node-RED (DietPi)
Wants=network-online.target
After=network-online.target

[Service]
User=nodered
ExecStart=/mnt/dietpi_userdata/node-red/node_modules/.bin/node-red -u /mnt/dietpi_userdata/node-red

[Install]
WantedBy=multi-user.target
_EOF_
			# CLI alias
			echo 'alias node-red-admin='\''sudo -u nodered /mnt/dietpi_userdata/node-red/node_modules/.bin/node-red-admin'\' > /etc/bashrc.d/dietpi-node-red.sh
		fi

This is, I think, the recommended way of installing on a diet pi. At least it says that in the yellow box. Running on Raspberry Pi : Node-RED

Hi Colin,

yes, it should be.
But last time I tried, the script told me to use "dietpi-software" to install Node-RED...

I think @dceejay is the one to answer this. Perhaps the comment on the Getting Started page is out of date, or perhaps the script has been updated since you tried it.

@colin - I think it was updated in 2021 or so... so the script does (or should) work on Diet-Pi - but indeed I have not tested it for a good while. I think it is/was a one way transition - in that if you had installed via their software tool then "upgraded" it using the script then you should stick to the script from then on. The original fix was so that at least it still worked after running the script once - as we found Diet-Pi users were been told via the forum - "oh just upgrade using the script" and that used to break users, so hopefully that is not the case now.

Alternatively you could just stick with the Diet-Pi installer and NOT use the script - and indeed that may or may not auto-update... no idea... not looked in detail at it.

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