Upgrade Node-RED version offline

Hi, all!

I don´t know if anyone question this, but I need to know if it´s possible to upgrade the node-red version offline way. I have 4.0.5 version in my windows server running locally, but I have not access to network because the IS in my company. Could anyone help me?

Hi @eriiicaraquel,

And welcome to the Forums.
This comes up every so often, and generally its never successful.

Node RED depends on 3rd Party Packages.
These 3rd Party Packages depend on 3rd Party Packages, these 3rd Party Packages, depend on 3rd Party Packages..

See where I am going? :smiley:

Node JS application installs/updates, depend heavily on NPM, which pulls down packages from... well.. NPM.

You can do a dependency walk on the latest code base, but that will require a huge amount of time, and may not be successful.

generally speaking - you need the internet.

Now then, you could if willing, install the latest version of Node RED on a system that has access to the Internet, and it matches the same Platform / OS / CPU, and copy stuff over, but that will require some careful testing, and planning.

its not impossible, but your mileage is going to be lengthy and tedious.

If node red is running on something like a Pi then it may be fairly simple to set up an identical system which does have internet access, do the upgrade on that pi and transfer the card to the production system. Of course you would have to check that that was not breaking any corporate IT rules.

2 Likes

Not quite the same message as from Marcus. The basics are certainly there. As long as you have an internet connected device of the same platform, you can install Node-RED there and then simply copy everything over by USB drive.

Though certainly, as Marcus says, this can be a very slow process due to there being a LOT of small files. (thousands or 10's of thousands). My development instance is 1.8GB, >42k files and >5k folders.

The other thing to node is that it is MUCH easier to do this if you forego installing Node-RED globally (which is how the documentation tells you to do it). Install locally and set the userDir folder (that holds the settings.js, flows, etc) to be a sub-folder of the one where you've installed node-red. Again this is a perfectly standard way of doing things for a node.js application - indeed more normal than installing globally.

1 Like

I often face this kind of situation, so I decided to go with a containerized Node-RED setup. Whenever I need to update it, I prepare the container in an environment with internet access. Then I transfer the updated container image to the offline device and deploy it there.

So far, this has proven to be the easiest and most portable solution for my workflow.

3 Likes

Hello,
For my part, I use a VM that I install on a workstation with VMware. When I want to perform an update, I start from my last backup to update the version or update the library. This is because I use Node-Red in an industrial OT (Operational Technology) environment.

Hi, Marcus! Thank you very much for your answer. Really, I was searching a soluction for this, but I will ask for internet access. :wink:

How does that help if you do not have internet access?

Hi, dear! Thanks for your help!

Hi, dear! I don't know how this could help me, because I use node-red in IT environment, but I'm don't have administrator permissions on the server. So, it is diferent. Thanks!

How did you install node-red initially?

Hello,
I agree, it doesn't help, but it's a fact. In industry, with the segmentation of OT networks, there is no connection to the Internet. The issue of security remains relevant. Too many machines are not updated regularly because the processes running on them are simply essential to the business. We must therefore adapt. This solution is one option among others, but in this form, it remains acceptable.
Kind regards,

2 Likes

I don't understand what the proposed solution is, and how it works without internet access.

Hello,

Your are right, there is no other solution as Internet acces to maintain or update N-R.
As Automation and OT manager, It's always a fight with IT guys to get the required access.
Security first. As I mention in the last survey for the futur way of developpment for Node-Red "How to maintain and update N-R offline environnement" is not a subject well documented or maybe I'm wrong.
But this is the situation.

Kind regards

In itself, this amounts to asking the runtime to install the zip package and then restart NR. I don't think the runtime can verify the integrity of the zip itself.

@knolleary, can I work on this?

A new setting would be needed to enable this feature.

Clarification on Marcus's message: the NR core is separate from third party nodes. So it's possible to just update the core.

It really depends on how NR is/was installed in the first place. If it is running natively, then you need to download and migrate recursively all the nodejs packages from an updated instance. If it is running in a container (preferably stateless, so all of its data is just an external volume/bind mount), then you could simply download and import an updated container image on the target host. To be able to answer your question we need to know how NR is running in the first place.

But in general its useful to run any kind of software in a self-contained way if possible (containers, AppImage or flatpak for graphical linux apps, portable apps on Windows, etc.), because it makes managing them much easier and they also create less system bloat.