# Node-red-windows-installer

**URL:** <https://discourse.nodered.org/t/node-red-windows-installer/77148>\
**Category:** Share Your Projects\
**Tags:** windows-installer\
**Created:** [1 April 2023 21:01 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148 "2023-04-01T21:01:56Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [6 April 2023 16:35 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/21 "2023-04-06T16:35:12Z")

</div>

> [@ralphwetzel](#):
>
> Your right path looks like the idea to support more than one installation of node-red on one Windows system.  
> How does this fit to the [instruction in the docu](https://nodered.org/docs/getting-started/windows#2-install-node-red) to install node-red with the global flag?

I may be more than slightly biased but I really like the fact that this could install multiple instances of Node-RED on a system. 😁 Given that all of my installs use local, not global installs.

In my opinion, local installs are always better and fit better with standard Node.js approaches as well. Their potential downside is that they might appear slightly more complex to a beginner. But here, that is completely nulled by having a good installer.

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [6 April 2023 16:38 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/22 "2023-04-06T16:38:28Z")

</div>

> [@ralphwetzel](#):
>
> @omrid Do you apply additional changes - that could be automated by the installer?

Our installation procedure (in case of Windows deployments) includes some additional manual steps:

- Setup of "Path" env variable in accordance with the installation mode & NPM prefix
- Updating the "Node-red.cmd" startup file to specify the Node-red user directory
- On production environments - creating & starting a Windows service which runs the Node-red server process

We have a few additional manual steps (installation of custom-developed nodes, connectivity & security settings etc.) but these are proprietary.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [6 April 2023 16:56 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/23 "2023-04-06T16:56:27Z")

</div>

> [@TotallyInformation](#):
>
> In my opinion, local installs are always better and fit better with standard Node.js approaches as well.

Any idea, why the Node-RED docu propose the opposite way of action?  
@knolleary I think we need some background info here...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [6 April 2023 19:16 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/24 "2023-04-06T19:16:11Z")

</div>

History? 😁

That's the way it started - from even before my time with Node-RED (is it really over 10 years now! OMG!!!). It was something I raised early on but the general opinion was that it was easier to install as a global for people with no experience. I disagree, but that's just my own opinion. You trade off having to create a location to install node-red vs not needing to do that but not knowing where the heck it did go if you ever need to know. To be fair, you don't often really need to know. But if you do, then a global install is more complex. Then there is the sudo vs non-sudo (or Windows equivalent) which often causes confusion and then problems if you get it wrong. When installing locally, this is rarely an issue that even occurs to people.

However, either way works - so not really worth worrying over.

---

<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:** [7 April 2023 06:27 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/25 "2023-04-07T06:27:37Z")

</div>

Yes history. Two original reasons. First if you installed nodejs locally then it didn’t auto create the correct start command in the path so you couldn’t just type node-red and have it run. And second when packaging up as a deb file for installing on Pi, they should install to /usr space (which is global) and not /home. Messing with /home is a no no.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [16 April 2023 20:07 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/26 "2023-04-16T20:07:08Z")

</div>

Status update:  
 Collect NR version data  
 Detect 'global' NR installation  
 Verify 'known' custom path installations (bookkeeping in Registry)  
 Add new installation configuration to installation setup  
 Add existing NR installation (currently unknown) to installation setup  
 Remove installation from setup  
 Give a name to an installation  
 Configure installation (port, autostart, ...)

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

Looks like a first version _could_ be 'ready' within the next one or two weeks ... to stress test the UI. It's becoming a quite complex beast...

---

<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:** [16 April 2023 21:09 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/27 "2023-04-16T21:09:42Z")

</div>

Is it really worth including versions 1 and 2 ? Do they still work latest node18 ?

---

<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:** [16 April 2023 21:27 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/28 "2023-04-16T21:27:23Z")

</div>

Indeed... 1.x is no longer maintained. We should not be encouraging new installs of it.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [16 April 2023 21:42 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/29 "2023-04-16T21:42:21Z")

</div>

😉 The installer pulls this data from npm.

This is what npm tells us:

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

This gives the impression that 1.x still **is** in maintenance - and in fact it **is** installed numerous times per week!

While I fully agree to remove it from the installer: Wouldn't it as well make sense to remove any tags from v1.x ... or change it's tag to sth like `v1-OBSOLETE` ?

---

<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:** [16 April 2023 22:08 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/30 "2023-04-16T22:08:30Z")

</div>

There are users who are 'stuck' on 1.x, despite it not being maintained. I doubt there are users who look at that list and, given a free choice, go for 1.x.

But the main point here is any new installer we provide should really only list the active release - 3.x.

If we get any requests for supporting older versions, we can revisit.

> It's becoming a quite complex beast...

The goal here needs to be simplicity for the user. The more options you provide, the harder it is to use. I appreciate your comment may be more about what is going on under the covers than what it shows the user... but less is definitely more.

---

<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:** [16 April 2023 22:10 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/31 "2023-04-16T22:10:18Z")

</div>

As a separate comment, we can get this into the node-red org on github this week and figure out what else is needed for an initial release. Would be great to 'launch' this with Node-RED 3.1 in the next couple of weeks.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [18 April 2023 21:35 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/32 "2023-04-18T21:35:02Z")

</div>

Status Update:

UI Test candidate is available

You may [download the installer from the Assets](https://github.com/ralphwetzel/node-red-windows-installer/releases/latest) of its repository.

There's one issue that will immediately jump up your screen: Windows is complaining that this software is not signed. This calls for a code signing certificate - if we really intend to put it into the Node-RED ecosystem.

May the discussion be started... 🎉

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [19 April 2023 08:13 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/33 "2023-04-19T08:13:30Z")

</div>

Very Nice! @ralphwetzel 👏

My only comment _maybe_ is to have the port be intelligently set, 188x;

- Start at +1 of any instance already found
- Have it increment for each instance they add to the installer

---

<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:** [19 April 2023 08:21 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/34 "2023-04-19T08:21:05Z")

</div>

But only if you don’t select upgrade …

---

<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:** [19 April 2023 09:53 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/35 "2023-04-19T09:53:36Z")

</div>

and avoid port 1883 🙂 (or at least warn it is "Usually reserved for MQTT")

---

<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:** [19 April 2023 10:19 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/36 "2023-04-19T10:19:24Z")

</div>

So yes on balance maybe don’t add this feature for version 1

---

<div class="post-metadata">

**Author:** ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)\
**Post date:** [21 April 2023 07:29 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/37 "2023-04-21T07:29:07Z")

</div>

I wish it was always on in windows. The automatic setting method in CMD is cumbersome.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [23 April 2023 21:26 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/38 "2023-04-23T21:26:30Z")

</div>

Status update:

**First Beta candidate available**

- Node.js installation
- ~~chocolatey installation~~ **\<== Not at all necessary!**
- Python installation
- VS BuildTools installation
- Node-RED installation
- Desktop Icon
- Autostart
- `npm rebuild`

> **[Release v1.0-beta.1 · ralphwetzel/node-red-windows-installer](https://github.com/ralphwetzel/node-red-windows-installer/releases/tag/v1.0-beta.1)**
>
> First Beta test candidate:
> 
> Node.js installation
> Python installation
> VS BuildTools installation
> Node-RED installation
> Desktop Icon
> Autostart
> npm rebuild

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [28 April 2023 12:43 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/39 "2023-04-28T12:43:42Z")

</div>

Status update:

[Second Beta candidate](https://github.com/ralphwetzel/node-red-windows-installer/releases/tag/v1.0-beta.2): Feature complete

- Node.js installation
- Python installation
- VS BuildTools installation
- Node-RED installation
- Desktop Icon
- Autostart
- `npm rebuild`

Some technical details - for information as well as for discussion.

- The installer needs to run - always - with admin privileges.
- Python & VS BuildTools are only touched (updated) on request & if necessary (!).
- The basic assumption is that there's only one (1) set of Node-RED installations managed on a system. This set may have one (1) global installation and a (pre-configured into the installer) number of non-global installations.
- `userDir` for the global installation is (default). `userDir` for the non-global installations is their installation directory.
- If requested, a desktop icon and an entry into the autostart group can be created. Both icons are created 'for all users'.
- Port allocation currently 'by user'. Depending on the further timeline, it should be possible to add 'on system proposal' functionality as well.
- Bookkeeping is done in the registry, thus the installer is able to verify the setup when re-running.
- The repo is configured with an action that builds a new installer upon release & is capable to code-sign it as well.

Next steps:

- Code cleansing
- Documentation of the installer
- Adaptation of the [Node-RED documentation](https://nodered.org/docs/getting-started/windows) - if we confirm the intension to move this under the umbrella of the Node-RED org.

> [@TotallyInformation](#):
>
> Also, will it have the option to create an auto-start? If so, what approaches are being considered and do we need to have a discussion about that?

@TotallyInformation Which (additional) 'approaches' concerning the autostart topic did you have in mind?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 April 2023 12:47 UTC](https://discourse.nodered.org/t/node-red-windows-installer/77148/40 "2023-04-28T12:47:30Z")

</div>

> [@ralphwetzel](#):
>
> Which (additional) 'approaches' concerning the autostart topic did you have in mind?

Well, on Linux, only systemd is considered which is reasonable since that covers probably 90% or more of installations.

Windows is a bit more complex because you have two basic methods. Either turning your app into a service or creating an entry in the Task Scheduler. Both have consequences and options.

At the least, users will need to know what startup approach has been used.

[Previous page](https://discourse.nodered.org/t/node-red-windows-installer/77148.md?page=1)

[Next page](https://discourse.nodered.org/t/node-red-windows-installer/77148.md?page=3)
