'How to access node-red remotely

I have node-red service installed on a PC , Once Node-RED is running, I am pointing to a local browser at http://localhost:1880. Now I want to access it from another PC which is in different network. I have gone through and this link .this is the screen short I tried using IP address, but could not get the service, How can I get the node red instance name?

Node-red is running at my home where it is connected to a router. The IP of that PC is 192.168.100... Where as I want to view it from my browser which in a network of 192.168.11...



Solution 1:[1]

If it is for something personal. (you don't need 99% stability/security)

You can use the served serveo. (search google "serveo")
You don't have to install anything or configure anything.

You only have to type this command.
According to the info on the page. (I've tried it several times)

Command to type on the computer that run node-red:

ssh -R yourpcname.serveo.net:80:localhost:1880 serveo.net

Command to access to node-red outside the local network.

https://yourpcname.serveo.net

Explain: You are actually creating a reverse tunnel from the computer (-R) to the server serveo.net Then the server when you access its ip using the subdomain "yourpcname" redirects you to that reverse tunnel.
The reverse tunel allows you to jump cgnat router firewall .... without having to configure anything.

Obviously if the ssh connection of the computer goes down you lose access. (but autossh can be used to create a more stable connection).

A greeting. Note: I recommend protecting the administration area with a password. if you are going to use serveo permanently.

If you pc is windows you can use putty program or install cygwin to get ssh command

Solution 2:[2]

There are several issues here that you need to deal with.

  1. Windows Firewall
  2. Your router
  3. The dangers of exposing your PC to the outside world!

Windows Firewall

If you have a PC configured as a "desktop", it will deliberately not allow incoming requests as the assumption is that a desktop/laptop computer will mainly make outgoing requests.

So start with another computer on the same internal network to see if you can access Node-RED from it. If not, you will need to allow port 1880 inbound through the Windows Firewall.

Your Router

To allow access from outside your local network to the PC, you need to configure your router.

Again, by default, your router will not allow any inbound traffic as this is very dangerous (see the next point).

To make it work, you have to configure the firewall in the router to allow inbound access on port 1880 (or some other port) and to forward traffic inbound on that port to the PC's internal IP address and port.

The Dangers

Finally, you REALLY need to ask yourself whether this approach is sensible. Especially if you have limited knowledge of the security risks.

Take a look at this article that explains some of the issues and some possible approaches to mitigating them: How to safely expose Node RED to the Internet.

You can avoid all of the issues by using a "bot" with a secure messaging app such as Telegram. See the details here: Making Node-RED available over the Internet

Solution 3:[3]

Before publishing your ip port of Node red, make sure you set password for node red and node red user interface. Then from manage pallets, instal ngrok. The go to ngrok.com, create an account. After creating the account, there will be a tab left side. In that authuntication will be there. Click on that. There will be a key. Copy that. Now come back to the ngrok node in node red. Edit the authtoken and paste the key you copied from the website. Then give the port number in which your node red is running, usually 1880. Then select a region. Give HTTP protocol. Then in input type give input port . Leave the other options blank. Now create two input nodes. In one node give string "on" and on the other input node give string "off". Connect both to the ngrok node. Now create a debug node and connect to the other end of ngrok node. Deploy. Now inject on node. You will get the url on the debug node. Using that url you can access node red from any where. Note: for free users ngrok gives random url and the url will be available only for 8 hours. After that you have to generate a new authentication key. For paid version you can use constant domain for unlimited time.

Solution 4:[4]

You can try Remote-RED.

It is a Node-RED node that proxies your local Node-RED Dashboard through a SHH tunnel to a iOS or Android App. So you can access your Node-RED Dashboard from the internet. It includes push notifications as well.

Solution 5:[5]

I had similar issue. Could access using http://:1880, just that you need to disable your PC firewall. Not the best solution though. Hope my explanation helps.

Solution 6:[6]

I would like to make the suggestion of creating a vpn connection to the computer you are trying to connect to remotely. Then you are able to localhost:1880

Or if you ssh you are able to access, start and stop the server. But to reach the gui from a browser I think the only way is to proxy or vpn the connection so your browser knows where to go inside the public ips network for a local ip connection.

Otherwise just opening the port could leave you vulnerable in many ways, not having security behind it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Em50L
Solution 2 Julian Knight
Solution 3 Arjun Sv
Solution 4 Thorsten
Solution 5 Ilamaaran Ramakrishnan
Solution 6 SickProdigy