Updating NGROK wan URL

Post Reply
jbutterfill
Posts: 4
Joined: Fri Sep 11, 2020 8:56 am

Updating NGROK wan URL

Post by jbutterfill »

I have Blue Iris up and running sucessfully. As I have a 4G connection so the site standard DDNS and IPs do not work so I have used the IP tunnelling service NGROK. This works great too. I do have a couple of issues though.

Firstly the NGROK URL changes everytime I restart the machine so I have a written a script that gets the new WAN URL from NGROK and copies it to a text file and clipboard. At the moment I have to manually open the Blue Iris settings, select the Webserver tab and paste the NGROK URL into the Remote, external (WAN/Intern) access box. Is there a config file with Blue Iris where I can use a script to automatically update this field? - Its a pain having to do it manually all the time.

Secondly, this is related to the first. When I use the IOS app, it has a "Lookup key" option with the ability to update the WAN (NGROK) URL automatically, presumably taken from the WAN box mentioned above. The app always appends a :81 port onto the end of the URL, trying to explain to my wife to remove this every time she uses the app is not easy - and to be honest its not particularity user friendly.

If anyone knows how to fix these minor issues I've love to know. thanks.
User avatar
TimG
Posts: 2098
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Updating NGROK wan URL

Post by TimG »

Did the write up that Thixotropic did about NGROK help at all ?
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
jbutterfill
Posts: 4
Joined: Fri Sep 11, 2020 8:56 am

Re: Updating NGROK wan URL

Post by jbutterfill »

Read all that and got it all working. It’s just taking it to the next step and getting the ngrok url auto updating the blue iris software.

I’ve done all the hard steps in using curl to extract the ngrok url to clipboard/text file, so just need this final step..
tinker3433
Posts: 1
Joined: Sun Sep 27, 2020 10:14 pm

Re: Updating NGROK wan URL

Post by tinker3433 »

I am really interested to see if you can get this to work.
I had no luck with getting the VPN stuff to work, and there are computers I will need to have access from that I will not be able to set up and vpn stuff even if I did get it working. not to mention trying to get the wife to mess with another step if she needs to see BI from her phone.
I know NGROK is not the perfect solution but it is at least better than port forwarding.
Getting the Ngrok ip to autoupdate in BI would make it workable for the phone situation at least.
User avatar
Thixotropic
Posts: 743
Joined: Wed Sep 04, 2019 7:20 pm
Location: Low-Earth Orbit

Re: Updating NGROK wan URL

Post by Thixotropic »

I never manually updated anything in BI, the NGROK client should grab a new URL automatically when it starts. Then I would just go to the ngrok URL to login to BI.

I started writing an AutoIt script to grab the new ngrok URL out of the ngrok dashboard, but then a bunch of stuff happened and I never finished it. The script was going to post the URL to a public location or text it to me on startup so I always find it remotely without going to the dashboard in the ngrok site.
Blue Iris 5.x x64 | Windows 10 Pro x64 | 16GB RAM | i7-7700 3.6 GHz | 1TB HDD | 2TB RAID NAS | 9 Cameras | Almost Dual NIC | 2KVA UPS
jbutterfill
Posts: 4
Joined: Fri Sep 11, 2020 8:56 am

Re: Updating NGROK wan URL

Post by jbutterfill »

I have written this script in a cmd file - it runs ngrok and then extracts the url and copies it into a text file

-----------------
start c:\ngrok\ngrok.exe http 192.168.1.32:81
timeout 30
cd c:\ngrok
curl -s localhost:4040/api/tunnels | jq -r .tunnels[0].public_url > C:\ngrok\NgrokURL.txt
-----------------

this runs in my task scheduler and leaves the new url in the text file each time the computer starts

I just need to figure out a way of getting it into Blue Iris automatically, I was hoping there was a config file I could edit but not found one.. so 95% there!
User avatar
Thixotropic
Posts: 743
Joined: Wed Sep 04, 2019 7:20 pm
Location: Low-Earth Orbit

Re: Updating NGROK wan URL

Post by Thixotropic »

jbutterfill wrote: Wed Oct 14, 2020 8:53 amI just need to figure out a way of getting it into Blue Iris automatically, I was hoping there was a config file I could edit but not found one.. so 95% there!
I wonder if this setting is in the Windows registry; if so it would probably be fairly straightforward to write the new value to it.
Blue Iris 5.x x64 | Windows 10 Pro x64 | 16GB RAM | i7-7700 3.6 GHz | 1TB HDD | 2TB RAID NAS | 9 Cameras | Almost Dual NIC | 2KVA UPS
montman2k
Posts: 4
Joined: Tue Nov 24, 2020 6:27 pm

Re: Updating NGROK wan URL

Post by montman2k »

It is indeed in the registry with one caveat,

if the automatic key lookup is set in the app, it will not connect, if you do manual key lookup it works . What I found is if you go in and delete and re add a character in the wan section in the blue iris ui, then it works on auto...so it may be worth a support email to have them do whatever function that is called when I click ok and it updates to happen at service start.

I made a powershell that pulls and modifies the reg key. This has to be done before blue iris starts or if it is running, the console needs to be opened or service restarted so that it pulls it into blue iris and it propagates on a manual key lookup in the app.
Post Reply