LinuxCommandLibrary

ngrok

TLDR

Expose local port

$ ngrok http [8080]
copy
Expose with subdomain
$ ngrok http --subdomain=[myapp] [8080]
copy
TCP tunnel
$ ngrok tcp [22]
copy
Inspect traffic
$ ngrok http [8080] --inspect
copy
Start with config
$ ngrok start [tunnel-name]
copy
Show authtoken
$ ngrok config add-authtoken [token]
copy
TLS tunnel
$ ngrok tls [443]
copy

SYNOPSIS

ngrok [command] [options]

DESCRIPTION

ngrok creates secure tunnels to localhost. It exposes local servers to the internet.
The tool provides public URLs. Useful for webhooks, demos, and testing.
ngrok tunnels localhost to web.

PARAMETERS

COMMAND

ngrok command.
http PORT
HTTP tunnel to port.
tcp PORT
TCP tunnel.
tls PORT
TLS tunnel.
config SUBCOMMAND
Configuration commands.
--subdomain NAME
Custom subdomain.
--help
Display help information.

CAVEATS

Free tier has limitations. Account required for features. URLs change on restart.

HISTORY

ngrok was created by Alan Shreve to provide secure tunnels for local development.

SEE ALSO

Copied to clipboard