When I start an ngrok client with ./ngrok tcp 22
it runs in the foreground and I can see the randoming generated forwarding URL, such as tcp://0.tcp.ngrok.io:12345 -> localhost:22
.
If I run in it the background with ./ngrok tcp &
, I can't find any way to see the forwarding URL. How can I run ngrok in the background and still see the URL?
There are a couple of ways.
You can either:
1) Visit localhost:4040/status
in your browser to see a bunch of information, or
2) Use curl to hit the API: localhost:4040/api/tunnels