Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (39 sloc) 1.83 KB

localtunnel – instant public tunnel to your local web server


To get the dependencies if you don't have them, type:

sudo apt-get install ruby ruby1.8-dev rubygems1.8 libopenssl-ruby

Now you can install localtunnel with RubyGems:

sudo gem install localtunnel

or to get the source:

git clone


localtunnel [options] <localport>
  -k, --key FILE    upload a public key for authentication

Localtunnel is a client to a free and open source reverse tunneling service made specifically for web traffic. It's intended to be used to temporarily expose local web servers to the greater Internet for debugging, unit tests, demos, etc.

This is how you make your local port 8080 public:

$ localtunnel 8080
Port 8080 is now publicly accessible from ...

Using localtunnel is comparable to using SSH reverse/remote port forwarding on a remote host that has GatewayPorts enabled, but without all the configuration or the need of a host. The localtunnel command works with a server component that is running on, which is provided as a free service.

If you have never run localtunnel before, you'll need to upload a public key to authenticate. You do this once:

$ localtunnel -k ~/.ssh/ 8080

After that, you shouldn't have to use -k again.

Localtunnel can be started before or after the local web server. It tunnels through to the url given in that status message “publicly accessible from…” for as long as the command is running. The tunnel is closed if the command exits.


andyl ( 
Charles Merriam ( 
Hunter Gillane ( 
Michael Sofaer ( 
Jeff Lindsay (