# How to upgrade Node-Red?

**URL:** <https://discourse.nodered.org/t/how-to-upgrade-node-red/6374>\
**Category:** General\
**Created:** [4 January 2019 04:15 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374 "2019-01-04T04:15:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [4 January 2019 04:15 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/1 "2019-01-04T04:15:59Z")

</div>

How do I upgrade Node-Red, and what will the upgrade likely break?  
I have two installations of Node-Red, one on Raspian (NR Version 0.17.5) and one on [Hass.io](http://Hass.io) (NR Version 0.19.5) and I just realized that the Range node is different in the newer node.

I have two Node-Reds because I originally started IOT using Node-Red on Raspian, then many months later, I set up Home Assistant on another Pi running the Home Assistant image from [Hass.io](http://Hass.io). There are nodes on the Raspian system that I can't install on the [Hass.io](http://Hass.io) Pi, and vice-versa. So I have two.

So, I tried copying a flow with a Range node from the newer Pi to the older Pi, only to discover that the Range node was not working the same.

Or, I could just write a function to simulate the Range node.

Any ideas? Thanks,  
Steve

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 January 2019 08:14 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/2 "2019-01-04T08:14:54Z")

</div>

On the non [hass.io](http://hass.io) pi the best solution is to use the upgrade script listed on the raspberry pi page of the docs.

This will upgrade Node-RED and the underlying node.js and npm versions.

With [has.io](http://has.io) as Node-RED comes bundled I would suggest checking in their support site what the most effective way to upgrade is.

I can’t think of any nodes that would work in [has.io](http://has.io) Node-RED but not on stand-alone node-RED so could you list them please?

---

<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:** [4 January 2019 11:20 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/3 "2019-01-04T11:20:07Z")

</div>

What differences in the range node are you seeing ?

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [4 January 2019 17:56 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/4 "2019-01-04T17:56:57Z")

</div>

Thanks for the prompt responses.

_dceejay:_ The newer version has a property selection. The older version only works on msg.payload. In my appplication I need to map the 0-100% returned by Alexa Home node for brightness (msg.bri) to 0-256 for the Z-wave light I am controlling from Alexa.

Since it's easy to make a clone of my SD card in Raspian, I have little risk in upgrades there since I can always go back to the last working clone. (This is the older version of NR that needs upgrading). Cloning my SD card in [Hass.io](http://Hass.io) is not as easy, but can be done using dd on a separate Pi running Raspian, and hope that I ID the source and destination devices correctly.

_ukmoose:_ In the older version on the Raspian Pi, I installed the Home Assistant nodes, but they don't appear in the nodes pallette on the left side of the Node Red workspace.

On [Hass.io](http://Hass.io), I cannot install npm on [Hass.io](http://Hass.io) since there is no "apt-get" in the OS. I did an upgrade from the Home Assistant [Hass.io](http://Hass.io) page and didn't break anything. I am very slow to upgrade [Hass.io](http://Hass.io) since every upgrade is accompanied with a lot of posts on Home Assistant forum of "Upgrade to xx.yy broke [component or automation]". I.E., not stable. I only try an upgrade if absolutely necessary to gain a new function or component.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 January 2019 18:14 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/5 "2019-01-04T18:14:08Z")

</div>

as per the Home assistant nodes readme it requires nodejs v8+ not a specific version of node-RED

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [4 January 2019 19:31 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/6 "2019-01-04T19:31:56Z")

</div>

Thanks. How do I update Node.js on Raspian?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 January 2019 20:25 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/7 "2019-01-04T20:25:39Z")

</div>

For standard raspbian, the node-red upgrade script will upgrade node.js ( currently to v8)  
After you have done the upgrade you will need to rebuild any additional nodes you have installed.

All described on the Raspberry Pi page of the docs [https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi)

---

<div class="post-metadata">

**Author:** ![igrowing](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/igrowing/32/663_2.png) [@igrowing](https://discourse.nodered.org/u/igrowing)\
**Post date:** [27 July 2019 16:43 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/8 "2019-07-27T16:43:58Z")

</div>

Hi guys,

Node-Red 0.19 has added few interesting features, particularly in Dashboard: Led, Level, and more controls. One one hand it's temptation to upgrade 0.18.7 to 0.19.+. On other hand, [this search is just scary.](https://discourse.nodered.org/search?q=node-red%20upgrade).

Did anyone has positive experience with upgrading NR 0.18.7 or less to 0.19.5 or more?

Thank you.

---

<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:** [27 July 2019 17:03 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/9 "2019-07-27T17:03:16Z")

</div>

Of course, few people have problems when upgrading. Just make sure you use the right technique. What hardware and operating system are you using?

---

<div class="post-metadata">

**Author:** ![igrowing](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/igrowing/32/663_2.png) [@igrowing](https://discourse.nodered.org/u/igrowing)\
**Post date:** [27 July 2019 17:13 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/10 "2019-07-27T17:13:03Z")

</div>

PasPI 3 model B.  
Linux shm 4.14.37-v7+ #1111 SMP Thu Apr 26 13:56:59 BST 2018 armv7l GNU/Linux  
PRETTY\_NAME="Raspbian GNU/Linux 8 (jessie)"

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [27 July 2019 19:41 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/11 "2019-07-27T19:41:11Z")

</div>

copy your xxx.flow and xxx\_cred.flow to another machine  
Buy a new GOOD SD card, install stretch (or Buster)  
Put the new card in the Pi and update/upgrade -  
install NR using the script in the documentation.  
Add in any contrib nodes you use.  
restore your xxx.flow and xxx\_cred.flow  
test things out

This way you can fall back to your originl SD card if you need to.

---

<div class="post-metadata">

**Author:** ![igrowing](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/igrowing/32/663_2.png) [@igrowing](https://discourse.nodered.org/u/igrowing)\
**Post date:** [28 July 2019 07:37 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/13 "2019-07-28T07:37:29Z")

</div>

> [@Colin](#):
>
> use the right technique.

> [@zenofmud](#):
>
> copy your xxx.flow and xxx\_cred.flow to another machine  
> Buy a new GOOD SD card, install stretch (or Buster)  
> Put the new card in the Pi and update/upgrade -  
> install NR using the script in the documentation.  
> Add in any contrib nodes you use.  
> restore your xxx.flow and xxx\_cred.flow  
> test things out

Is this the right technique?

---

<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:** [28 July 2019 08:30 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/14 "2019-07-28T08:30:06Z")

</div>

How did you install Node-RED originally?

Did you use the install script our docs for the Pi points at? Have you read the docs for how to upgrade on the pi?

[https://nodered.org/docs/getting-started/raspberrypi#installing-node-red](https://nodered.org/docs/getting-started/raspberrypi#installing-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:** [28 July 2019 08:31 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/15 "2019-07-28T08:31:00Z")

</div>

> [@igrowing](#):
>
> Is this the right technique?

That is a perfectly valid technique. Personally, if everything else installed is fine and all you want to do is to update node-red on a Pi then I would first make an image backup of the card (so you can restore the whole card if necessary), make separate copies of anything else important on the card, and the flows and creds file as suggested, just in case the upgrade fails catastrophically and you discover that for some reason your image backup is not restorable, then just run the Pi upgrade script.  
In fact I have never had the update script fail catastrophically, but you should keep up to date backups of everything important anyway.

---

<div class="post-metadata">

**Author:** ![igrowing](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/igrowing/32/663_2.png) [@igrowing](https://discourse.nodered.org/u/igrowing)\
**Post date:** [30 July 2019 17:53 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/16 "2019-07-30T17:53:16Z")

</div>

@knolleary Yes, I used "getting started" guide.  
@Colin That makes sense. Thank you.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [20 August 2019 14:58 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/17 "2019-08-20T14:58:39Z")

</div>

Nick,

For the sake of clarity on that page that you have referenced for upgrading NR - would it not be better to have a section How To Upgrade - rather than just have it as a one liner under the heading How to Install ? i.e.

How to Upgrade

- Assuming you have used the script referenced above to perform your original install - we would suggest the following steps to perform an inplace upgrade

1. login to the Rpi as your standard user (typically pi)
2. Copy your xxx.flow and xxx\_cred.flow files from ~.node-red to somewhere safe

Blah blah

regards

Craig

---

<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:** [20 August 2019 15:02 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/18 "2019-08-20T15:02:47Z")

</div>

Maybe. I'll happily review a pull request with some proposed changes.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [20 August 2019 15:03 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/19 "2019-08-20T15:03:12Z")

</div>

OK i will try and work out how to do that

Hang on - just had a look - i am talking about updating the Doco - not changing scripts etc - is there a way for me to submit a "PR" for doing that - i thought that was just Github for the scripts itself etc

Craig

---

<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:** [20 August 2019 15:12 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/20 "2019-08-20T15:12:42Z")

</div>

> <https://github.com/node-red/node-red.github.io/blob/master/docs/getting-started/raspberrypi.md>

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [20 August 2019 15:29 UTC](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374/21 "2019-08-20T15:29:28Z")

</div>

Hmm - OK wiill submit it tomorrow - thanks

regards

Craig

[Next page](https://discourse.nodered.org/t/how-to-upgrade-node-red/6374.md?page=2)
