I am a complete newbee to Node Red and a novice programmer. I've installed it on my Windows 10 PC and slowly going through the Youtube tutorials....are there any better ones out there?
Anyway, I'm learning NodeRed because I have a particular project that I would like to build. I have a number of remote radio transmitter sites. If a site fails to receive audio I have a silence detector which detects this and can send me an email and/or HTTP post or run a program. This is where I want Node-Red to do some stopping and starting of applications.
At the same time, I want to build a central webserver to receive the HTTP posts and using Node-Red display a real time dynamic web page showing me the status of all my transmitter sites.
At the transmitter sites I use a Windows 10 PC and at my office I have a spare Windows PC for the web server. My question is: What is the easiest to install and most compatible Web server that I should install on my web server? Also, where can I get some good Node-Red code examples to enable me to build this project? Any advice would be most welcome. Thank you.
There are a number of good courses that lead you through learning Node-RED, a quick search should find them.
The main issue (in my view anyway) when setting up something like this is how you are securing the connections between the sites. In addition, how secure are the sites themselves? Also, how sensitive are the sites? These questions will build a picture of the risks involved.
Typically, you will need to encrypt the traffic between each site/server.
Two basic ways to do that. Use a VPN of some kind or use HTTPS between the services.
A VPN is possibly the easiest to manage - however, if the remote sites are unmanned or have minimal security, make absolutely certain that your central location is in a secure network separated from anything else you might have running. So that if anyone breaks into a remote server, they are limited in what they can get to. Remember that a VPN effectively extends your network. Lots of ways to set up VPN's including 3rd party services like NGROK which make it easy (but watch out that you secure it correctly - check out my flow on configuring secure NGROK connections).
HTTPS->HTTPS connections are also absolutely possible with Node-RED of course. Here, you will most likely need to configure Lets Encrypt in order to get appropriate certificates. An alternative would be to create a self-signed certificate and use Cloudflare to protect the endpoints. Cloudflare will provide you with a valid shared certificate and you can configure your devices to only allow communications with Cloudflare itself. Cloudflare therefore acts as a cloud proxy. You get a lot of extra protection that way. Either way, you will most likely want a registered domain for this with each site being its own sub-domain.
Node-RED is already a web server and can do HTTPS. However, for security and robustness, I'd recommend using either NGINX or Caddy as the actual web server with Node-RED restricted to only being able to communicate with them. Use the local device firewall to prevent Node-RED from talking to anything other than localhost. There are various tutorials around that show you how to configure web servers to work with Node-RED. The advantages of using a dedicated web server is that they will generally withstand attacks better and it can be easier to add a layer of protection by using the capabilities of the web server to require logins to endpoints.
Thank you for your reply TotallyInformation. Security on this project is not such a big deal for me, there is zero sensitive data involved. The systems at both ends have their own local Firewalls / AV installed and they are isolated from any internal networks. Even if they were compromised, the impact would be minimal.
HTTP posts would be sufficient as opposed to HTTPS as there is nothing sensitive sent within the payload, just the status value.
I have taken a look at NGINX and Caddy which address your security concerns, but would IIS or XAMP work as a web server for a Node-Red created web page? Are they Node-Red compatible or have I completely misunderstood what a Node-Red can offer me? Will Node Red allow me to create a Dynamic web page that I can run on any web server?
Yes, both can work. However, IIS and Apache are probably more complex. With IIS, there is an extension that I can never remember the name of that lets you integrate to Node.js apps which might be helpful. I think that it is free for non-commercial use.
Node-RED is a Node.js app and uses ExpressJS to provide web services. So Node-RED is a reasonably full-featured web server in its own right. Using NGINX/Caddy/IIS/Apache as a proxy gives you benefits of performance and security but otherwise are not strictly necessary. Node-RED will let you define static and dynamic web endpoints very easily.
One last point about security. We have seen over the last few years, people's Node-RED instances being hacked. That isn't just an issue for you because it allows the attacker to use Node-RED to perform attacks on other people across the Internet.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.