How to forward my local port to public using localtunnel

Port Forwarding using localtunnel

--

What is localtunnel?

localtunnel exposes your localhost to the world for easy testing and sharing! No need to mess with DNS or deploy just to have others test out your changes.

Great for working with browser testing tools like browserling or external api callback services like twilio which require a public url for callbacks.

Pre-requisites

  • npm should be installed

Steps

  1. Open a command prompt and execute these commands
  2. Install localtunnel
npm install -g localtunnel

3. Finally, forward your local port to public

lt --port <local_port> --subdomain <your_sub_domain>

Ex:

lt --port 8080 --subdomain maxsoft

4. Your public URL will be shown below

--

--

Osanda Deshan Nimalarathna
Test Automation Master

Founder of MaxSoft | RPA Solution Architect | Open-source Contributor | Automation Framework Developer | Technical Specialist