# How to get installed version of NR?

**URL:** https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669
**Category:** General
**Created:** [19 February 2022 22:55 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669 "2022-02-19T22:55:04Z")
**Posts on this page:** 14
**Page:** 2

<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: [20 February 2022 00:35 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/21 "2022-02-20T00:35:16Z")

</div>

If you enter `node-red -?` you get the help back and the version number is in the first line:

```auto
pi@fastpi:~ $ node-red -?
Node-RED v2.1.4
Usage: node-red [-v] [-?] [--settings settings.js] [--userDir DIR]
                [--port PORT] [--title TITLE] [--safe] [flows.json]
       node-red admin <command> [args] [-?] [--userDir DIR] [--json]

Options:
  -p, --port PORT port to listen on
  -s, --settings FILE use specified settings file
      --title TITLE process window title
  -u, --userDir DIR use specified user directory
  -v, --verbose enable verbose output
      --safe enable safe mode
  -D, --define X=Y overwrite value in settings file
  -?, --help show this help
  admin <command> run an admin command

Documentation can be found at http://nodered.org

```

---

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [20 February 2022 00:52 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/22 "2022-02-20T00:52:31Z")

</div>

@zenofmud , LOL! How did I miss that one!

---

<div class="post-metadata">

### Author: ![Frida](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frida/32/68250_2.png) [@Frida](https://discourse.nodered.org/u/Frida)
#### Post date: [20 February 2022 14:14 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/23 "2022-02-20T14:14:46Z")

</div>

I use:

```auto
pi @ raspberrypi: ~ $ node-red --version
20 Feb 15:10:02 - [info]

Welcome to Node-RED
===================

20 Feb 15:10:02 - [info] Node-RED version: v2.2.2
20 Feb 15:10:02 - [info] Node.js version: v16.14.0
20 Feb 15:10:02 - [info] Linux 5.10.92-v7l + arm LE
20 Feb 15:10:03 - [info] Loading palette nodes
20 Feb 15:10:05 - [info] Dashboard version 3.1.6 started at / ui
20 Feb 15:10:05 - [info] Settings file: /home/pi/.node-red/settings.js
20 Feb 15:10:05 - [info] Context store: 'default' [module = memory]
20 Feb 15:10:05 - [info] User directory: /home/pi/.node-red
20 Feb 15:10:05 - [warn] Projects disabled: editorTheme.projects.enabled = false
20 Feb 15:10:05 - [info] Flows file: /home/pi/.node-red/flows.json
20 Feb 15:10:05 - [warn]

```

---

<div class="post-metadata">

### Author: ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)
#### Post date: [20 February 2022 14:37 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/24 "2022-02-20T14:37:20Z")

</div>

@Frida Although that may work, It also will attempt to start a Node-Red instance on the default port.

---

<div class="post-metadata">

### Author: ![Frida](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frida/32/68250_2.png) [@Frida](https://discourse.nodered.org/u/Frida)
#### Post date: [20 February 2022 15:20 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/25 "2022-02-20T15:20:19Z")

</div>

Yes I know. But when it runs in advance, nothing happens, otherwise you can stop it again.

---

<div class="post-metadata">

### Author: ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)
#### Post date: [20 February 2022 15:38 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/26 "2022-02-20T15:38:16Z")

</div>

The method I've been using pulls it from `.node-red/.config.nodes.json`

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

```auto
[{"id":"b6faf7d8.b5efa8","type":"tab","label":"Update?","disabled":false,"info":""},{"id":"874a3d4e.9b666","type":"http request","z":"b6faf7d8.b5efa8","name":"http request to https://nodered.org","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://nodered.org","tls":"","persist":false,"proxy":"","authType":"","x":320,"y":80,"wires":[["90243cc1.87edc"]]},{"id":"90243cc1.87edc","type":"html","z":"b6faf7d8.b5efa8","name":"","property":"payload","outproperty":"payload","tag":".node-red-latest-version","ret":"text","as":"multi","x":650,"y":80,"wires":[["05cf562f0b953db6"]]},{"id":"212aff481b0685cb","type":"inject","z":"b6faf7d8.b5efa8","name":"","props":[{"p":"payload"}],"repeat":"259200","crontab":"","once":true,"onceDelay":"0.1","topic":"","payloadType":"str","x":110,"y":120,"wires":[["874a3d4e.9b666","b3ca5d44d94eb375"]]},{"id":"e0fa0b169f53173a","type":"json","z":"b6faf7d8.b5efa8","name":"","property":"payload","action":"obj","pretty":false,"x":590,"y":120,"wires":[["23865497589f6baa"]]},{"id":"9a682b8e06cbc47e","type":"function","z":"b6faf7d8.b5efa8","name":"old version","func":"msg.payload = \"2.0.1\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":160,"wires":[["77873223bd69beae"]]},{"id":"77873223bd69beae","type":"join","z":"b6faf7d8.b5efa8","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1010,"y":120,"wires":[["2710a272a2cc1b37"]]},{"id":"12208d376a521184","type":"debug","z":"b6faf7d8.b5efa8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1410,"y":100,"wires":[]},{"id":"2710a272a2cc1b37","type":"switch","z":"b6faf7d8.b5efa8","name":"","property":"payload.0","propertyType":"msg","rules":[{"t":"eq","v":"payload.1","vt":"msg"},{"t":"neq","v":"payload.1","vt":"msg"}],"checkall":"true","repair":false,"outputs":2,"x":1130,"y":120,"wires":[["9d5c0bd73938b521"],["a3dbd1ecd809488a"]]},{"id":"9d5c0bd73938b521","type":"function","z":"b6faf7d8.b5efa8","name":"No update","func":"msg.payload = \"The installed version is \" + msg.payload[0] + \", no update is necessary at this time.\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1270,"y":100,"wires":[["12208d376a521184"]]},{"id":"a3dbd1ecd809488a","type":"function","z":"b6faf7d8.b5efa8","name":"update","func":"msg.payload = \"The installed version is \" + msg.payload[0] + \", an update to version \" + msg.payload[1] + \" is available.\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1250,"y":140,"wires":[["5145c9412b49c0fc","83110640972f117c"]]},{"id":"5145c9412b49c0fc","type":"debug","z":"b6faf7d8.b5efa8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1410,"y":140,"wires":[]},{"id":"b3ca5d44d94eb375","type":"file in","z":"b6faf7d8.b5efa8","name":"","filename":"C:/Users/Bannd/.node-red/.config.nodes.json","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":350,"y":120,"wires":[["e0fa0b169f53173a"]]},{"id":"83110640972f117c","type":"link out","z":"b6faf7d8.b5efa8","name":"Update checked","links":["966d7ce16488d73f"],"x":1375,"y":180,"wires":[]},{"id":"9e3906315247bdf2","type":"inject","z":"b6faf7d8.b5efa8","name":"manual test","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":630,"y":160,"wires":[["9a682b8e06cbc47e"]]},{"id":"e90c1af7ea9b30d8","type":"comment","z":"b6faf7d8.b5efa8","name":"How often to check","info":"","x":130,"y":160,"wires":[]},{"id":"e9e2d19cccb1c1d0","type":"comment","z":"b6faf7d8.b5efa8","name":"Send to a notification flow","info":"","x":1310,"y":220,"wires":[]},{"id":"57e5bc1434255e11","type":"comment","z":"b6faf7d8.b5efa8","name":"replace location for your system","info":"","x":370,"y":160,"wires":[]},{"id":"05cf562f0b953db6","type":"function","z":"b6faf7d8.b5efa8","name":"chomp left","func":"msg.payload = msg.payload.substr(1, +Infinity)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":80,"wires":[["77873223bd69beae"]]},{"id":"b850824df4055e47","type":"comment","z":"b6faf7d8.b5efa8","name":"No need to send this one","info":"","x":1310,"y":60,"wires":[]},{"id":"23865497589f6baa","type":"function","z":"b6faf7d8.b5efa8","name":"filter version","func":"msg.payload = msg.payload[\"node-red\"].version;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":120,"wires":[["77873223bd69beae"]]}]

```

The file location would have to be changed depending on your system setup of course.

---

<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 February 2022 18:34 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/27 "2022-02-20T18:34:40Z")

</div>

> [@Frida](#):
>
> `pi @ raspberrypi: ~ $ node-red --version`

There is no such command line parameter as `--version`. You are needlessly starting a NR instance.

Use `-?` as mentioned earlier.

---

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [20 February 2022 21:39 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/28 "2022-02-20T21:39:03Z")

</div>

The --version was a suggestion, but -? trumps that idea to be sure.

---

<div class="post-metadata">

### Author: ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)
#### Post date: [20 February 2022 22:50 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/29 "2022-02-20T22:50:07Z")

</div>

node-red -? doesn't seem to work for me. Appears to be due to zsh.

```auto
> node-red -?
zsh: no matches found: -?
> node-red --help
Node-RED v2.2.2
Usage: node-red [-v] [-?] [--settings settings.js] [--userDir DIR]
                [--port PORT] [--title TITLE] [--safe] [flows.json]
       node-red admin <command> [args] [-?] [--userDir DIR] [--json]

Options:
  -p, --port PORT port to listen on
  -s, --settings FILE use specified settings file
      --title TITLE process window title
  -u, --userDir DIR use specified user directory
  -v, --verbose enable verbose output
      --safe enable safe mode
  -D, --define X=Y overwrite value in settings file
  -?, --help show this help
  admin <command> run an admin command

Documentation can be found at http://nodered.org

```

---

<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: [21 February 2022 14:35 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/30 "2022-02-21T14:35:41Z")

</div>

try this `node-red --help | grep Node-RED`

---

<div class="post-metadata">

### Author: ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)
#### Post date: [21 February 2022 17:10 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/31 "2022-02-21T17:10:37Z")

</div>

I'm aware, hence the second command in the screenshot, thank you though. `node-red -?` works fine when I switch to bash. Just thought I'd mention it, in case any future readers have this issue.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [21 February 2022 18:12 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/32 "2022-02-21T18:12:38Z")

</div>

## And for completeness

### Windows...

`node-red --help | findStr Node-RED`  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/3/03cf0a57aea7ca0fd561a02a12716db1c159c217.png)

### Linux...

`node-red --help | grep Node-RED`  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/7/37d21cc1fa8de395aea0b6921ccd1bb3cbc1618d.png)

### ANY OS (using `node`)

`node -p "require('path/to/node-red/package.json').version"`

#### e.g. ubuntu

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

#### e.g. windows

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/9/e9978b13567d8ae143865961077823468577acfa.png)

---

<div class="post-metadata">

### Author: ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)
#### Post date: [21 February 2022 22:43 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/33 "2022-02-21T22:43:54Z")

</div>

Tangent question... how to find the installation date? Thinking just stat the nod-red executable?

# stat /usr/bin/node-red  
File: /usr/bin/node-red -\> ../lib/node\_modules/node-red/red.js  
Size: 35 Blocks: 0 IO Block: 4096 symbolic link  
Device: b302h/45826d Inode: 17309 Links: 1  
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)  
Access: 2022-02-19 21:40:12.665240108 +0000  
Modify: 2022-02-19 21:40:12.665240108 +0000  
Change: 2022-02-19 21:40:12.665240108 +0000  
Birth: 2022-02-19 21:40:12.665240108 +0000

So the birth time stamp?

The installation script I use tracks the invocation stamp, so that is a reference but always nice to have a validation check, such as catch if someone else reinstalled an application at a later date from the official stamp.

---

<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 April 2022 22:44 UTC](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669/34 "2022-04-22T22:44:31Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/how-to-get-installed-version-of-nr/58669.md?page=1)
