ngrok
creates secure tunnels to localhost
TLDR
SYNOPSIS
ngrok [command] [options]
DESCRIPTION
ngrok creates secure tunnels from a public endpoint to a locally running service. It exposes local servers to the internet through a public URL without deploying or configuring firewalls.Common use cases include webhook development, demo presentations, testing mobile backends, and remote access to local services. The web inspection interface (default at localhost:4040) allows real-time traffic inspection and replay.
PARAMETERS
http PORT
Create HTTP tunnel to local port.tcp PORT
Create TCP tunnel.tls PORT
Create TLS tunnel (does not terminate TLS).start name
Start named tunnel(s) from configuration file.config SUBCOMMAND
Manage ngrok configuration (add-authtoken, check, edit).diagnose
Run connectivity diagnostics to ngrok service.service action
Manage ngrok as a system service (install, start, stop, restart, uninstall).--domain NAME
Custom domain for tunnel endpoint.--region REGION
Region for tunnel (us, eu, ap, au, sa, jp, in).--log path
Write logs to file or "stdout"/"stderr".--basic-auth USER:PASSWORD
Add HTTP basic authentication to the tunnel.api SUBCOMMAND
Access the ngrok API (e.g., list tunnels, manage reserved domains).--help
Display help information.
CAVEATS
Free tier has connection limits and randomized URLs that change on restart. An account and authtoken are required for most features. The --subdomain flag was replaced by --domain in newer versions.
HISTORY
ngrok was created by Alan Shreve to provide secure tunnels for local development.
SEE ALSO
localtunnel(1), ssh(1), cloudflared(1)
