Node-red dashboard as webpage

2,411 views
Skip to first unread message

John O Connor

unread,
Apr 12, 2017, 5:01:27 AM4/12/17
to Node-RED
Hi folks,

What is the easiest way of displaying a node-red dashboard as a webpage on the internet?

Thanks 
John

Julian Knight

unread,
Apr 12, 2017, 6:53:49 AM4/12/17
to Node-RED
You need to be very careful about what you use it for since security is still a work in progress.

Assuming you understand and can live with that, all you actually need to do is create a path using your router. Normally listed under the heading of "NAT" or something similar on the router. You create a link from the public facing IP address and port to the private IP address and port.

If you need the page to have a name rather than a number, you will need to either register with a Dynamic DNS service or you will need to register a domain name.

Mark Setrem

unread,
Apr 12, 2017, 6:55:41 AM4/12/17
to Node-RED

A good place to start would be searching this forum for "dashboard internet"

Librae L

unread,
Apr 12, 2017, 7:01:31 AM4/12/17
to Node-RED
John, you can try Go.IoT(https://goiot.cc). It's open and free for register and use by personal. You can get a unique domain url after deploy.

2017年4月12日 星期三 +0800 17:01 发件人 John O Connor <dc.j...@gmail.com>:
--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/57d33198-33e6-415a-8f17-9f7cb746943e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John O Connor

unread,
Apr 12, 2017, 11:00:20 AM4/12/17
to node...@googlegroups.com
Thanks for the help, the router only lets me forward to a port number, but the dashboard is running at http://127.0.0.1:1880/ui/#/0

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/M8iBeWx3Amg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Julian Knight

unread,
Apr 12, 2017, 11:10:59 AM4/12/17
to Node-RED
Can you let us know what router you are using, then I can look up the settings.

The 127.0.0.1 is referring to the internal address and only applies if you are using a browser (for instance) on the same device that NR is running on - e.g. in the case of a Pi running NR and the Linux GUI or running NR on a development workstation.

If you were to access NR from a different computer on your local network, you would use a different IP address right? Something like 192.168.1.65. This is the address that you need to forward TO.

John O Connor

unread,
Apr 12, 2017, 11:23:41 AM4/12/17
to node...@googlegroups.com
Hi Julian, I can do the forwarding and the port setup etc. I have no-ip running on the gateway, so thats all grand. Internal IP is 192.168.1.9, so that can be accessed from anywhere on the network.

Its a Huawei HG658c. 

The problem is in the port forwarding, it will only let me put in a port number. and not the /ui/#/0

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/M8iBeWx3Amg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

mark hubrich

unread,
Apr 12, 2017, 11:43:29 AM4/12/17
to Node-RED
Just forward 1880 to 192.168.1.9 

NodeRed will handle the rest :)
Mark


On Wednesday, April 12, 2017 at 10:23:41 AM UTC-5, John O Connor wrote:
Hi Julian, I can do the forwarding and the port setup etc. I have no-ip running on the gateway, so thats all grand. Internal IP is 192.168.1.9, so that can be accessed from anywhere on the network.

Its a Huawei HG658c. 

The problem is in the port forwarding, it will only let me put in a port number. and not the /ui/#/0
On 12 April 2017 at 16:10, Julian Knight <j.kni...@gmail.com> wrote:
Can you let us know what router you are using, then I can look up the settings.

The 127.0.0.1 is referring to the internal address and only applies if you are using a browser (for instance) on the same device that NR is running on - e.g. in the case of a Pi running NR and the Linux GUI or running NR on a development workstation.

If you were to access NR from a different computer on your local network, you would use a different IP address right? Something like 192.168.1.65. This is the address that you need to forward TO.

On Wednesday, 12 April 2017 16:00:20 UTC+1, John O Connor wrote:
Thanks for the help, the router only lets me forward to a port number, but the dashboard is running at http://127.0.0.1:1880/ui/#/0

On 12 April 2017 at 11:53, Julian Knight <j.kni...@gmail.com> wrote:
You need to be very careful about what you use it for since security is still a work in progress.

Assuming you understand and can live with that, all you actually need to do is create a path using your router. Normally listed under the heading of "NAT" or something similar on the router. You create a link from the public facing IP address and port to the private IP address and port.

If you need the page to have a name rather than a number, you will need to either register with a Dynamic DNS service or you will need to register a domain name.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/M8iBeWx3Amg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

John O Connor

unread,
Apr 12, 2017, 11:47:38 AM4/12/17
to node...@googlegroups.com
When I do that, it goes straight to node-red, I was hoping to just display the dashboard.

To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Julian Knight

unread,
Apr 12, 2017, 12:01:17 PM4/12/17
to Node-RED
Ah, right, you don't need to worry about that as it is the path part of the URL and that will be the same externally as internally, it is only the IP address (and optionally the port) that changes.

If you want to hide the path as well, you will need a reverse proxy to do that. You can use most web servers (IIS, NGINX or Apache for example) as reverse proxies or you can use a dedicated proxy (like HAproxy).


On Wednesday, 12 April 2017 16:23:41 UTC+1, John O Connor wrote:
Hi Julian, I can do the forwarding and the port setup etc. I have no-ip running on the gateway, so thats all grand. Internal IP is 192.168.1.9, so that can be accessed from anywhere on the network.

Its a Huawei HG658c. 

The problem is in the port forwarding, it will only let me put in a port number. and not the /ui/#/0
On 12 April 2017 at 16:10, Julian Knight <j.kni...@gmail.com> wrote:
Can you let us know what router you are using, then I can look up the settings.

The 127.0.0.1 is referring to the internal address and only applies if you are using a browser (for instance) on the same device that NR is running on - e.g. in the case of a Pi running NR and the Linux GUI or running NR on a development workstation.

If you were to access NR from a different computer on your local network, you would use a different IP address right? Something like 192.168.1.65. This is the address that you need to forward TO.

On Wednesday, 12 April 2017 16:00:20 UTC+1, John O Connor wrote:
Thanks for the help, the router only lets me forward to a port number, but the dashboard is running at http://127.0.0.1:1880/ui/#/0

On 12 April 2017 at 11:53, Julian Knight <j.kni...@gmail.com> wrote:
You need to be very careful about what you use it for since security is still a work in progress.

Assuming you understand and can live with that, all you actually need to do is create a path using your router. Normally listed under the heading of "NAT" or something similar on the router. You create a link from the public facing IP address and port to the private IP address and port.

If you need the page to have a name rather than a number, you will need to either register with a Dynamic DNS service or you will need to register a domain name.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/M8iBeWx3Amg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

mark hubrich

unread,
Apr 12, 2017, 2:36:01 PM4/12/17
to node...@googlegroups.com
Would it work to feed the dashboard url into a websocket node? Then forward that port? 

Just a thought.

To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

John O Connor

unread,
Apr 12, 2017, 2:50:00 PM4/12/17
to Node-RED
Theres a good idea, what had you in mind?

John

Julian Knight

unread,
Apr 12, 2017, 3:16:26 PM4/12/17
to Node-RED
Not sure what you mean on theat Mark?

mark hubrich

unread,
Apr 12, 2017, 3:34:25 PM4/12/17
to Node-RED
Not sure how to explain so I'll give it my best shot.

Similar to how we show worldmap node in dashboard. Maybe tcp node would be better...

Librae

unread,
Apr 14, 2017, 8:47:15 AM4/14/17
to Node-RED
Julian, in fact, I think Node-RED can do a lot that Nginx/Apache can do ;)

Thanks,
Librae

On Thu, Apr 13, 2017 at 12:10 AM, Librae <libra...@gmail.com> wrote:
Aha, I think I've got what you need John.
Please add these three nodes:

http in (GET /) -> function template -> http response

in template node, you write a little piece of html javascript to redirect / to /ui, like:
<script>
    window.location.href = '/ui';
</script>

[{"id":"ae9454a0.21cd08","type":"http in","z":"2857bf3a.d5523","name":"","url":"/","method":"get","swaggerDoc":"","x":130,"y":340,"wires":[["5b4db6d0.897bb8"]]},{"id":"5b4db6d0.897bb8","type":"template","z":"2857bf3a.d5523","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<script>\n    window.location.href = '/ui';\n</script>","x":290,"y":340,"wires":[["6fdd238f.539abc"]]},{"id":"6fdd238f.539abc","type":"http response","z":"2857bf3a.d5523","name":"","x":430,"y":340,"wires":[]}]

You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Librae

unread,
Apr 14, 2017, 8:47:17 AM4/14/17
to Node-RED
Aha, I think I've got what you need John.
Please add these three nodes:

http in (GET /) -> function template -> http response

in template node, you write a little piece of html javascript to redirect / to /ui, like:
<script>
    window.location.href = '/ui';
</script>

[{"id":"ae9454a0.21cd08","type":"http in","z":"2857bf3a.d5523","name":"","url":"/","method":"get","swaggerDoc":"","x":130,"y":340,"wires":[["5b4db6d0.897bb8"]]},{"id":"5b4db6d0.897bb8","type":"template","z":"2857bf3a.d5523","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<script>\n    window.location.href = '/ui';\n</script>","x":290,"y":340,"wires":[["6fdd238f.539abc"]]},{"id":"6fdd238f.539abc","type":"http response","z":"2857bf3a.d5523","name":"","x":430,"y":340,"wires":[]}]
On Thu, Apr 13, 2017 at 12:01 AM, Julian Knight <j.kni...@gmail.com> wrote:
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
Reply all
Reply to author
Forward
0 new messages