# Automatic Update of Node-RED?

**URL:** https://discourse.nodered.org/t/automatic-update-of-node-red/94014
**Category:** General
**Created:** [19 December 2024 08:35 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014 "2024-12-19T08:35:51Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)
#### Post date: [19 December 2024 08:35 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/1 "2024-12-19T08:35:51Z")

</div>

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?

---

<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: [19 December 2024 09:21 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/2 "2024-12-19T09:21:45Z")

</div>

> [@FloRu](#):
>
> After restarting node-red the version was increased to 3.1.15

Are you sure? According to [Releases · node-red/node-red · GitHub](https://github.com/node-red/node-red/releases) there never was a 3.1.15. Can you post a screenshot showing it?

---

<div class="post-metadata">

### Author: ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)
#### Post date: [19 December 2024 09:36 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/3 "2024-12-19T09:36:15Z")

</div>

Hi Colin,

yes, I am! 😉  
Here you are:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/1/b1a735498587a2a69dae7432fda56a7a328890ec.png)

And it can also be seen in the journal:

```auto
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":

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/d/2d99ff99baf9c5f8a3fed469f2699445d5526681.png)

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [19 December 2024 09:54 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/4 "2024-12-19T09:54:27Z")

</div>

3.1.15 was published a couple days ago - [Release 3.1.15 · node-red/node-red · GitHub](https://github.com/node-red/node-red/releases/tag/3.1.15)

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.

---

<div class="post-metadata">

### Author: ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)
#### Post date: [19 December 2024 09:59 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/5 "2024-12-19T09:59:53Z")

</div>

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

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [19 December 2024 10:00 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/6 "2024-12-19T10:00:21Z")

</div>

How did you install Node-RED originally?

---

<div class="post-metadata">

### Author: ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)
#### Post date: [19 December 2024 10:02 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/7 "2024-12-19T10:02:59Z")

</div>

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

🤔

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

```auto
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

```

---

<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: [19 December 2024 21:30 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/8 "2024-12-19T21:30:57Z")

</div>

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](https://nodered.org/docs/getting-started/raspberrypi)

---

<div class="post-metadata">

### Author: ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)
#### Post date: [21 December 2024 15:57 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/9 "2024-12-21T15:57:33Z")

</div>

Hi Colin,

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

---

<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: [22 December 2024 09:45 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/10 "2024-12-22T09:45:46Z")

</div>

> [@FloRu](#):
>
> 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.

---

<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: [22 December 2024 21:48 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/11 "2024-12-22T21:48:12Z")

</div>

@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.

---

<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: [22 March 2025 21:48 UTC](https://discourse.nodered.org/t/automatic-update-of-node-red/94014/12 "2025-03-22T21:48:15Z")

</div>

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