localhost, where only you can reach it.
Sharing localhost gives it a public URL that anyone you choose can open, without deploying your code, changing your network, or opening a port on your machine.
What happens when you share
Start the ngrok agent and point it at the port your app already listens on:localhost:8080.
Your code keeps running where it always did.
Edit a file, restart your server, and the next request at the same URL hits the new version.
Two things follow from the agent dialing out rather than listening:
- Your machine stays closed. Nothing accepts inbound connections on it, so there are no ports to forward and no firewall rules to change. The connection works from home networks, coffee shop Wi-Fi, and corporate networks that block inbound traffic.
- The traffic is encrypted. The connection between your machine and ngrok runs over TLS, and your public URL is served over HTTPS with a certificate ngrok provisions and renews for you.
What you can share
See the protocols documentation for the details of each.
Who can reach it
Your URL is public as soon as it exists. Anyone who has it can open it, so treat it like a link to a live service rather than a private address—and remember that whatever you share is running on your own machine. You control access without changing your app:- Add authentication so visitors sign in before they reach you.
- Review the security model to understand what you expose and how to limit it.
- Apply a Traffic Policy to require credentials, restrict IP addresses, rate limit requests, or rewrite traffic in flight.
Next steps
- Quickstart: share your first local service.
- Inspect traffic and replay requests: see every request that reaches your app and send it again.
- Agent CLI reference: the full set of commands and flags.