Installing a Node-RED Package Without an Internet Connection


#1

If you ever need to install a Node-RED package on an system that’s on an isolated network without internet access, you can use npm to install it from an archive file through the command line.
You will need shell access to do the installation, and access to a system that does have an internet connection to download the package files before moving them over to the isolated system.

  1. Start by installing the package on the system with internet access to get the required package files.

sudo npm install <package>

  1. Create the package tarball archive with the name <package-version>.tgz. You will need to get a copy of that file off the device.

sudo npm pack <package>

  1. To install the package just put the tarball on the target system, in the unsecured file area on an EPIC, for example, then navigate to that folder using SSH and install the package directly from the tarball.

sudo npm install <package-version>.tgz

  1. Wait. It may take a lot longer than you expect but should complete eventually.

  2. After you have the package installed, restart the Node-RED runtime either by disabling then re-enabling it, or by rebooting your system.

Once you confirm the package is installed you can delete the tarball and you’re good to go.

Happy coding!