# Updating Node-Red on a PI

**URL:** <https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507>\
**Category:** General\
**Created:** [19 August 2019 22:41 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507 "2019-08-19T22:41:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Poodlepapa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/poodlepapa/32/8174_2.png) [@Poodlepapa](https://discourse.nodered.org/u/Poodlepapa)\
**Post date:** [19 August 2019 22:41 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507/1 "2019-08-19T22:41:38Z")

</div>

Is this the best way to update Node-Red on a raspberry pi? `update-nodejs-and-nodered`? And is there a way to get it to install nodes that I commonly use a batch rather than clicking on them individually in the Pallet Manager? Thank you all

---

<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 August 2019 22:48 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507/2 "2019-08-19T22:48:16Z")

</div>

> [@Poodlepapa](#):
>
> Is this the best way to update Node-Red on a raspberry pi?

Yes - as [described in our docs for the Pi](https://nodered.org/docs/getting-started/raspberrypi#installing-node-red)

> [@Poodlepapa](#):
>
> is there a way to get it to install nodes that I commonly use a batch

You can do that from the command-line.

```auto
cd ~/.node-red
npm install my-favourite-node-1 my-favourite-node-2 my-favourite-node-3

```

And then restart Node-RED.

---

<div class="post-metadata">

**Author:** ![Poodlepapa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/poodlepapa/32/8174_2.png) [@Poodlepapa](https://discourse.nodered.org/u/Poodlepapa)\
**Post date:** [20 August 2019 00:44 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507/3 "2019-08-20T00:44:46Z")

</div>

Thank you for the assistance!

---

<div class="post-metadata">

**Author:** ![lenny1972](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lenny1972/32/13210_2.png) [@lenny1972](https://discourse.nodered.org/u/lenny1972)\
**Post date:** [22 February 2020 17:14 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507/4 "2020-02-22T17:14:00Z")

</div>

Willing to update my Node-Red local installation (installed on my Rasp) from the current version 0.20.7 to the last one I just want to know it the official updating script will save all my installed palettes and all of my files (flows.json, flows\_cred.json, settings.json etc...). In a word after successfully run the update script all my previous flows will run as before or do I have to re-install palettes, set input credentials in the config nodes?

---

<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:** [22 February 2020 17:35 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507/5 "2020-02-22T17:35:04Z")

</div>

@lenny1972 the upgrade script will upgrade Node-RED and leave your user data (flows etc) alone

---

<div class="post-metadata">

**Author:** ![lenny1972](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lenny1972/32/13210_2.png) [@lenny1972](https://discourse.nodered.org/u/lenny1972)\
**Post date:** [22 February 2020 17:43 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507/6 "2020-02-22T17:43:24Z")

</div>

Thanks Nick, so I'll update with now other intervention by myside in order to have the flows get back working.  
Great!

---

<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:** [23 February 2020 09:48 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507/7 "2020-02-23T09:48:24Z")

</div>

If you did have a problem you can always restore your flow files from your backup.

---

<div class="post-metadata">

**Author:** ![lenny1972](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lenny1972/32/13210_2.png) [@lenny1972](https://discourse.nodered.org/u/lenny1972)\
**Post date:** [23 February 2020 12:39 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507/8 "2020-02-23T12:39:28Z")

</div>

Thanks Colin I've already made a backup of the flows.

---

<div class="post-metadata">

**Author:** ![audstanley](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/audstanley/32/54601_2.png) [@audstanley](https://discourse.nodered.org/u/audstanley)\
**Post date:** [19 January 2022 18:42 UTC](https://discourse.nodered.org/t/updating-node-red-on-a-pi/14507/9 "2022-01-19T18:42:39Z")

</div>

if you are on an x64 machine - or any raspberry pi [ARM6 or ARM7 or ARM64]. I've written this binary that will uninstall nodejs, and install the latest version. You can check out the source code here:

> **[GitHub - audstanley/NodeJs-Raspberry-Pi: Install NodeJs on your Raspberry Pi...](https://github.com/audstanley/NodeJs-Raspberry-Pi)**
>
> Install NodeJs on your Raspberry Pi 1, 2, 3, 4, zero, and zero w - GitHub - audstanley/NodeJs-Raspberry-Pi: Install NodeJs on your Raspberry Pi 1, 2, 3, 4, zero, and zero w

This doesn't solve upgrading the version of Node-Red, but if Node-Red requires an update NodeJs than this will get you there. 🙂
