Basic site tunnels provided by Ngrok

Issue Summary

I was just looking at the features list found on and spotted “Basic site tunnels provided by Ngrok” in addition to (right above) “Live Links: URLs with higher connection limits, built for testing as a team”. Live links is no good for testing out integration with third party web hooks owing to the username and password so I’ve been using Ngrok (independently of Local) to create a tunnel. This feature suggests though that a ‘simple tunnel’ exists inside Local in addition to the ‘Live Link’ tunnel which I understand is also provided by Ngrok. Am I missing something or is this just listing the same feature twice?

I’m looking for the exact same info. Any luck or pointers? Searched it to death, no luck so far.

I could be mistaken, but I think Local used to use Ngrok to serve tunnels a while ago but then changed to their own system when Live Links were introduced (their version of ngrok didn’t work well, IMO).

I still prefer using Ngrok because I have a paid account and I run into issues with Live Links all the time for some reason. It’s not a one-click process but it’s pretty simple to use it with Local, you just need to include a snippet (or use a plugin) which converts all links to relative URLs before it will work.

Sounds like a Local Add-on for using Ngrok would be a great idea for someone to build…

Hey guys @Nugerama and @jdesj043 , can you guys share how you configured your ngrok with Local?

I’ve tried “ngrok http mydomain.local” but it doesn’t seem to work with the site alias.

Hi, @tonicboy. I just started Ngrok with ngrok http 8000, replacing the port number with whatever port your Local site is running on (which changes depending on how many you have running), usually 3000-ish on my setup. Check out Step 4 at Getting Started | ngrok Documentation.

Thanks for the reply @Nugerama ! This may sound like a dumb question but… I haven’t figured out how to tell what port a site is running on yet, lol. Where do you find that?

No worries, @tonicboy. The port is shown, for me at least, in the overview tab under ‘site host’ and also in the URL in my browser. I might have my rewriting set up differently to yours though. I’m running Local on a Mac.

1 Like

Ah, gotcha. You’re running your site in localhost routing mode. I’m using the default Site Domains mode. I tried using localhost mode once but it broke a bunch of links and I didn’t have the patience to fix it at the time. It sounds like you had to do some URL rewriting rules?

Hey @tonicboy, I use ngrok with .local domains without any issues. I believe all you need to do is ensure you’re using relative URLs. There’s a plugin that makes it easy:

1 Like

Thanks for that @jdesj043 , I’ll try that plugin. But what port do you use when launching ngrok? The .local domains don’t show any port in the URL so by default that would mean port 80, but if I use “ngrok http 80”, the resulting ngrok URL just leads me to a Local error page saying that the site doesn’t exist. I think the relative URL’s would only matter once you’ve reached the site, no?

Make sure you also are rewriting the host header like:
--host-header=rewrite http://sitename.local

This part of the ngrok documentation explains it well…

Hope that helps!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.