Can someone help install node-red into a jail?

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
I recently found this awesome project: http://nodered.org/ and I thought I could give it a try inside a standard jail on freeNAS 9.10 U4

So I did
pkg update
pkg upgrade
pkg install node
pkg install npm

followed by npm install -g --unsafe-perm node-red
which then got stuck.

Just thought I'd ask here, maybe someone more knowledgeable than me is interested in this too and could give me some hints on how to get it installed.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
I'm running 2 node red jails (one for me to use for home automation stuff and one for my son to play with).

I literally used the npm install command and it worked fine. Been running those jails for over a year now.
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
hm, then it must be my jail somehow, this is a standard jail. I might create a new jail and try again.
Would you mind checking your npm and node.js versions please?
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
Just wanted to confirm that all went smooth with a brand-new jail. Must have been a problem with my old jail.

off to go automate something. anything. :smile:
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
@pirateghost would you mind sharing which version of node you are using? node red recommends to use 6.x but pkg install node will install 7.x

Are your installations running fine with 7.x or could you share how you installed node 6.x?
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
I'm running 2 node red jails (one for me to use for home automation stuff and one for my son to play with).

I literally used the npm install command and it worked fine. Been running those jails for over a year now.
just a last try to get your attention in the hope that you have subscribed to this thread - would you mind sharing how to get node 7.x installed or did you mix pkg and ports?
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
Looks like this will do (correcting my first post):

Code:
pkg install node6
pkg install npm3
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435

Luis Miguel

Cadet
Joined
Dec 25, 2016
Messages
3
Hello, in case it is helpful for someone, I have installed Node-RED successfully with the following commands:

Code:

**** FreeNAS 11: install Node-RED v0.17.5 with Node.js LTS 8.x into a standard jail ****

create a standard jail and assign an IP (node-red, 192.168.1.220)

**** into the jail ****

pkg update
pkg upgrade

pkg install nano														*** you can skip this command
pkg install python

pkg install www/node8
pkg install www/npm-node8

npm install -g --unsafe-perm node-red


**** install PM2 v2.8.0: God Daemon to boot node-red at startup ****

npm install -g pm2

root@node-red:/ # which node-red
/usr/local/bin/node-red

pm2 start /usr/local/bin/node-red -- -v								 *** tell pm2 to start node-red
pm2 save																*** tell pm2 to save current process list
pm2 startup rcd														 *** tell pm2 to run on boot - generate and configure a startup script (rc init system)


You can then access the Node-RED editor by pointing your browser at http://localhost:1880 -> http://192.168.1.220:1880

 
Last edited:

Derkades

Dabbler
Joined
Aug 6, 2018
Messages
16
Hello, in case it is helpful for someone, I have installed Node-RED successfully with the following commands:
[...]
Thanks! Still works in 2019 on FreeNAS 11.2 in an iocage jail.

The only thing I needed to do differently was run "mkdir -p /usr/local/etc/rc.d" before "pm2 startup rcd"
 
Top