Hi, yes sorry, I realise ngrok isn't node red, but since it is recommended in the security banner, I thought info may help others stuck like I am.
So I followed the steps setting up ngrock on the pi, made ngrock account, auth token pasted on pi, set server location, start on port 1880 and works great with one issue, only gives the flow editor not the dashboard ui I was hoping to see, with no apparent way to append port info.
Is there something simple I keep missing in the docs? Or is there a method to change the dashboard ui from port 1880 so flow editor and dash ui are on separate ports?
Dashboard uses the same instance of ExpressJS that Node-RED does so it will always be the same port. uibuilder does the same.
I can't immediatly see why the Dashboard isn't appearing. While I don't use NGROK, a quick look at the docs don't suggest any issues. Have you looked at the logs to see what might be happening?
I installed ngrok in a fresh raspberry pi today. The installation was smooth and the tunnel works perfectly. I can confirm that the access to the dashboard is transparent. It is not necessary to make any special configuration or hack. I can´t figure out what could be the issue with your install since the session from your raspberry to ngrok is reported as online. Do you confirm that you can access the editor (via ngrok) but not the dashboard ? Perhaps a thing that is worth to check is authentication. I tested without configuring authentication.
Yes, mine only accessed the editor, I am reimaging the sd card and starting from scratch, perhaps I did some strange port blocking thing in the past, I tend to use the same image until things go completely south.
You can also use nginx or apache to do a reverse proxy from :1880/ui to a different port so that you only expose the dashboard and don't need the /ui path.
Something like this for nginx, so you would ngrok the port 3000 (didn't test this):
Thank you very much for this, my fresh install hasn't changed the out come, I wonder if using a raspberry pi 0 w has something to do with it. I have been trying to work out how to rev proxy with flask, much more straight forward with nginx, will try it now
Ok, I am guessing that I put your code in /etc/nginx/nginx.conf, getting errors like:
Failed to complete tunnel connection
The connection to https://2914dc7a.au.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:3000.
Make sure that a web service is running on localhost:3000 and that it is a valid address.
The error encountered was: dial tcp [::1]:3000: getsockopt: connection refused
I guess you installed nginx. Yes, that needs to be added in the nginx.conf. What happens when you go to localhost:3000? Do you have something in the nginx logs?
So does it need to be appended to nginx.conf or does it need to overwrite something? localhost:3000 doesn't work in browser I have been trying all different ways (ipaddr:1880/ui, pi.local:1880/ui) and pasting it in place of http://127.0.0.1:1880/ui. Where are the nginx logs? I can't locate them. I will be back in 8 hrs, need sleep.
pi@pi:/etc/nginx $ systemctl status nginx.service
â—Ź nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Active: failed (Result: exit-code) since Fri 2019-02-01 18:31:54 AEDT; 21s ag
Docs: man:nginx(8)
Process: 9192 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
Feb 01 18:31:54 pi systemd[1]: Starting A high performance web server and a reve
Feb 01 18:31:54 pi nginx[9192]: nginx: [emerg] "server_name" directive is not al
Feb 01 18:31:54 pi nginx[9192]: nginx: configuration file /etc/nginx/nginx.conf
Feb 01 18:31:54 pi systemd[1]: nginx.service: Control process exited, code=exite
Feb 01 18:31:54 pi systemd[1]: Failed to start A high performance web server and
Feb 01 18:31:54 pi systemd[1]: nginx.service: Unit entered failed state.
Feb 01 18:31:54 pi systemd[1]: nginx.service: Failed with result 'exit-code'.