# Upgrading node.js and node-red for AWS EC2 ubuntu

**URL:** <https://discourse.nodered.org/t/upgrading-node-js-and-node-red-for-aws-ec2-ubuntu/53327>\
**Category:** General\
**Created:** [7 November 2021 10:40 UTC](https://discourse.nodered.org/t/upgrading-node-js-and-node-red-for-aws-ec2-ubuntu/53327 "2021-11-07T10:40:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThibautRuy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thibautruy/32/28480_2.png) [@ThibautRuy](https://discourse.nodered.org/u/ThibautRuy)\
**Post date:** [7 November 2021 10:40 UTC](https://discourse.nodered.org/t/upgrading-node-js-and-node-red-for-aws-ec2-ubuntu/53327/1 "2021-11-07T10:40:32Z")

</div>

Is this the right command for Upgrading node.js and node-red for AWS EC2 ubuntu:

`bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)`

I can't find the explanation in the documentation

---

<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:** [8 November 2021 09:31 UTC](https://discourse.nodered.org/t/upgrading-node-js-and-node-red-for-aws-ec2-ubuntu/53327/2 "2021-11-08T09:31:16Z")

</div>

That may depend on how you installed it. How did you do that?  
Also what does  
`node -v`  
show, and which version of node-red are you currently on?

---

<div class="post-metadata">

**Author:** ![softy2k](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/softy2k/32/23707_2.png) [@softy2k](https://discourse.nodered.org/u/softy2k)\
**Post date:** [8 November 2021 14:30 UTC](https://discourse.nodered.org/t/upgrading-node-js-and-node-red-for-aws-ec2-ubuntu/53327/3 "2021-11-08T14:30:25Z")

</div>

First:  
`sudo apt update`  
`sudo apt -y upgrade`

To install NodeJS:  
`curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -`  
`sudo apt-get install -y nodejs`

To update NodeJS:  
`sudo n stable`

To install the latest release, use `sudo n latest`  
Alternatively, you can run `sudo n #.#.#` to get a specific Node version.

To install/update NodeRed:  
`sudo npm install -g --unsafe-perm node-red`

---

<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:** [7 January 2022 14:30 UTC](https://discourse.nodered.org/t/upgrading-node-js-and-node-red-for-aws-ec2-ubuntu/53327/4 "2022-01-07T14:30:30Z")

</div>

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