19

I installed localtunnel globaly by runnnig this command npm install -g localtunnel.

After that when I run lt --port 8080, absolutely nothing happens. Does anyone know why?

Filburt
  • 17,626
  • 12
  • 64
  • 115
henri kinaski
  • 211
  • 1
  • 2
  • 6
  • Use a Cloudflare tunnel instead: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/trycloudflare/ – James Gentes Jul 19 '22 at 15:43

9 Answers9

20

It appears that the author isn't maintaining Local Tunnel much these days, but there was a helpful comment on the github issue dealing with this. At the time of writing this, you can generate a Local Tunnel with

lt -h "http://serverless.social" -p 8080
Walldro
  • 341
  • 2
  • 8
8

Try

lt -p 8080 -h http://localtunnel.me

And in the URL you get, replace the "https" with "http". Maybe don't open it with Google Chrome but with Safari instead, but Google Chrome might work, too.

For more information see: https://github.com/localtunnel/localtunnel/issues/332

2

I ran into the same issue on my raspberry pi. You need to validate your npm and localtunnel installation. Check if you get valid results for npm --version. If not, reinstalling npm will fix the problem. In case you installed localtunnel locally (instead of the -g option), you may have to use the command like: npx localtunnel --port <port>

1

It seems like localtunnel is currently down. Click here to go to the github issues page for more information and updates

  • 3
    Of course you could use ngrok.io instead of localtunnel, the only difference between the two is that ngrok.io doesn't support custom subdomains in their free plan. – Lukas Schwab Feb 17 '20 at 13:14
1

run this

lt -h "https://serverless.social" -p 8080

it should work

samabcde
  • 6,988
  • 2
  • 25
  • 41
0

I did a simple thing though insecure to host it:

lt --port 443 -h "http://localtunnel.me" -s myhost

and then in another tab:

python3 -m http.server 443

This worked for me. The consequence was that the device on which I was accessing my site showed complete root directory(I am sure there are configurations to be made to prevent this)

0

change the port from 8080 to 8000 the issue might be because of on port 8080 there is something already running .

samair ali
  • 772
  • 1
  • 5
  • 15
0

LocalTunnel is refusing to connect when using node 18. I've downgraded to 16 and it's working fine. I don't know the reason, but it seems to be IPv6 related.

If you're having trouble with it, try running with DEBUG:

export DEBUG="localtunnel:*" && lt --port 8080

For reference, this is the error I seen when using node 18 with the DEBUG flag:

localtunnel:client local error connect ECONNREFUSED ::1:3939 +0ms
Igor Silva
  • 141
  • 1
  • 9
0

After "npm install -g localtunnel" try this:

C:\> npx lt -p 8080 -s myserver --print-requests
your url is: https://myserver.loca.lt

Or without -s param to get a random URL.

David B.F.
  • 231
  • 3
  • 8