Skip to content

Instantly share code, notes, and snippets.

@1eedaegon
Created July 12, 2023 08:00
Show Gist options
  • Save 1eedaegon/8f21db72202dea547b861ed4776d4711 to your computer and use it in GitHub Desktop.
Save 1eedaegon/8f21db72202dea547b861ed4776d4711 to your computer and use it in GitHub Desktop.
How to install ngrok on wsl2

Ngrok

Requirements

  • Windows 11
  • WSL 2

Installation

  1. Download ngrok
curl -fsSL -o ngrok.tar.gz https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
  1. Extract ngrok and Install binary
sudo tar -zxvf ./ngrok.tar.gz -C /usr/bin/ngrok

Run ngrok

  1. Check ngrok
❯ ngrok
NAME:
  ngrok - tunnel local ports to public URLs and inspect traffic

USAGE:
  ngrok [command] [flags]

DESCRIPTION:
  ngrok exposes local networked services behinds NATs and firewalls to the
  public internet over a secure tunnel. Share local websites, build/test
  webhook consumers and self-host personal services.
  Detailed help for each command is available with 'ngrok help <command>'.
  Open http://localhost:4040 for ngrok's web interface to inspect traffic.

Author:
  ngrok - <support@ngrok.com>

TERMS OF SERVICE: https://ngrok.com/tos

EXAMPLES:
  ngrok http 80                           # secure public URL for port 80 web server
  ngrok http --domain baz.ngrok.dev 8080  # port 8080 available at baz.ngrok.dev
  ngrok http foo.dev:80                   # tunnel to host:port instead of localhost
  ngrok http https://localhost            # expose a local https server
  ngrok tcp 22                            # tunnel arbitrary TCP traffic to port 22
  ngrok tls --domain=foo.com 443          # TLS traffic for foo.com to port 443
  ngrok start foo bar baz                 # start tunnels from the configuration file

COMMANDS:
  api                            use ngrok agent as an api client
  completion                     generates shell completion code for bash or zsh
  config                         update or migrate ngrok's configuration file
  credits                        prints author and licensing information
  diagnose                       diagnose connection issues
  help                           Help about any command
  http                           start an HTTP tunnel
  service                        run and control an ngrok service on a target operating system
  start                          start tunnels by name from the configuration file
  tcp                            start a TCP tunnel
  tls                            start a TLS tunnel
  tunnel                         start a tunnel for use with a tunnel-group backend
  update                         update ngrok to the latest version
  version                        print the version string

OPTIONS:
      --config strings   path to config files; they are merged if multiple
  -h, --help             help for ngrok
  -v, --version          version for ngrok
  1. Expose port
ngrok http 8000

ngrok                                                                                                                                       
(Ctrl+C to quit)                                                                                                                                                            
🤯 Try the ngrok Kubernetes Ingress Controller: https://ngrok.com/s/k8s-ingress

Session Status                online
Session Expires               1 hour, 59 minutes
Terms of Service              https://ngrok.com/tos
Version                       3.3.1
Region                        Japan (jp)
Latency                       -
Web Interface                 http://127.0.0.1:4040
Forwarding                    https://80a1-121-143-253-237.ngrok.io -> http://localhost:8000                                                                                                                                                                                                                            
Connections                   ttl     opn     rt1     rt5     p50     p90
                              0       0       0.00    0.00    0.00    0.00  
                              
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment