node red on udoo quad

on server install withoout xserver

UDOObuntu 2.1.2 Minimal (14.04 LTS)

Downloads

log using ssh

see how to secure udoo install : -> link

Install NODE.js and npm

optional to upgrade npm:

Install node RED

on udoo board is quite is long process be patient

run node-red for testing

alt+C to exit

install ufw

check if is installed

!!do not activate yet!!

open ssh port

 

If need external access add port forward at 1880

reference:
http://nodered.org/docs/getting-started/installation.html

https://www.digitalocean.com/community/tutorials/how-to-connect-your-internet-of-things-with-node-red-on-ubuntu-16-04

Secure node red access

uncomment:

generate hash pw with:

Reference :
http://nodered.org/docs/security.html

Secure dash UI access

uncomment:

generate hash pw with:

reference:

https://github.com/node-red/node-red-dashboard/blob/master/README.md

http://nodered.org/docs/security.html

SSL & Let’s encrypt on ddns acount

port forward on your router to your local ip computer where you run node-red: refer to your router user manual

install light web server if you don’t have one installed (need only to setup let’encrypt cert) NB: you can use also ngix proxy solution see below)

certboot install:

var/www/html/ with the proper dir of your installed server and yoursite.ddns.net with your site

result must be somethin like this:

the cert are stored at:

result:

or

copy cert1.pem privkey1.pem to your .node-red directory

on settings.js uncomment

and

add cron to renew your cert:
test if renew work

add in cron (see reference)

reference:

https://www.hardill.me.uk/wordpress/2015/05/11/securing-node-red/

http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener

https://certbot.eff.org/#ubuntuxenial-other

https://help.ubuntu.com/community/lighttpd

How to Schedule Tasks on Linux: An Introduction to Crontab Files

Proxy with NGInX

( if need to uninstall lighttpd this also stop service)

check if lighthttp is stoped

reboot

install NGInX

Reference:

https://www.digitalocean.com/community/tutorials/how-to-connect-your-internet-of-things-with-node-red-on-ubuntu-16-04

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04

initial udoo setup secure and basic install

exit and relog ssh with new user

remove udooer user

install ufw (firewall)

 

 

mosquitto install on ubuntu

 


 

reference:

Install Mosquitto MQTT Broker on Ubuntu 16.04 LTS (Xenial Xerus)

config: /etc/mosquitto/mosquitto.conf


add on mosquitto.conf file:
allow_anonymous false

add user:
generate the pw file with:

add more users

reference:
http://mosquitto.org/man/mosquitto-conf-5.html
https://mosquitto.org/man/mosquitto_passwd-1.html

 

activate SSL

reference:

MQTT Mosquitto broker with SSL/TLS transport security
http://rockingdlabs.dunmire.org/exercises-experiments/ssl-client-certs-to-secure-mqtt
https://mosquitto.org/man/mosquitto-tls-7.html

install node red on ubuntu or variant + setup secure

 

Install NODE.js and npm

optional to upgrade npm:

Install node RED

If need external access add port forward at 1880

reference:
http://nodered.org/docs/getting-started/installation.html

https://www.digitalocean.com/community/tutorials/how-to-connect-your-internet-of-things-with-node-red-on-ubuntu-16-04

Secure node red access

uncomment:

generate hash pw with:

Reference :
http://nodered.org/docs/security.html

Secure dash UI access

uncomment:

generate hash pw with:

reference:

https://github.com/node-red/node-red-dashboard/blob/master/README.md

http://nodered.org/docs/security.html

SSL & Let’s encrypt on ddns acount

port forward on your router to your local ip computer where you run node-red: refer to your router user manual

install light web server if you don’t have one installed (need only to setup let’encrypt cert) NB: you can use also ngix proxy solution see below)

certboot install:

var/www/html/ with the proper dir of your installed server and yoursite.ddns.net with your site

result must be somethin like this:

the cert are stored at:

result:

or

copy cert1.pem privkey1.pem to your .node-red directory

on settings.js uncomment

and

add cron to renew your cert:
test if renew work

add in cron (see reference)

reference:

https://www.hardill.me.uk/wordpress/2015/05/11/securing-node-red/

http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener

https://certbot.eff.org/#ubuntuxenial-other

https://help.ubuntu.com/community/lighttpd

How to Schedule Tasks on Linux: An Introduction to Crontab Files

 

Proxy with NGInX

( if need to uninstall lighttpd this also stop service)

check if lighthttp is stoped

reboot

install NGInX

 

Reference:

https://www.digitalocean.com/community/tutorials/how-to-connect-your-internet-of-things-with-node-red-on-ubuntu-16-04

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04