Great News from ngrok with Static Domains
Publish Date: 2023/09/09
Update Date: 2023/09/09
Just wake up as a normal day, took up my phone, checked notifications & mails, there is a mail catch my eyes.
Static domains and cloud edges for all ngrok users !
What a great news for us. We don’t need to remember the random URL anymore. (but as my experience, the URL doesn't change that frequently).
Not only for test or dev use, also it can be used on production as well.
So let’s dive into the static domain for free users.
Step 1: Login to the ngrok dashboard
Step 2: Navigate to Cloud Edge > Domains

Step 3: Just click on the button: Create Domain
, then you’ll get a custom domain for yourself. As the value after --domain
flag, example.ngrok-free.app
for example.

Step 4: Start the ngrok agent !
- [Installation Guide]
Don’t forget create the Authtokens
from Tunnels [link], please keep it safe.
# Add AUTHTOKEN into config file
$ ngrok config add-authtoken <YOUR-AUTHTOKEN>

Via Command Line Interface:
$ ngrok http --domain=example.ngrok-free.app 80
Via Config:
# Linux / macOS
# Path: $HOME/.config/ngrok/ngrok.yml
version: 2
authtoken: <YOUR-AUTHTOKEN>
tunnels:
NAME-OF-TUNNEL: # Change the name to your own
proto: http
addr: 80
domain: example.ngrok-free.app
# Start ngrok with config
$ ngrok start NAME-OF-TUNNEL
# Specify the config file
$ ngrok start NAME-OF-TUNNEL --config <FILE-PATH>
# Start all tunnels defined in yml
$ ngrok start --all
For more information about ngrok agent, please refer:
https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config/
It’s quite convenience that we can observe the result via CLI output, it also shows in Tunnels > Agents with the dashboard.
Be aware of the limitation of the domain, it just goes with protocol http
& tls
at all, not suit for tcp
, so if there is other tcp tunnel defined in config yaml file, it won’t be connect via the static URL for free users.
Hope this article can help !
Ref:
1. https://ngrok.com/blog-post/free-static-domains-ngrok-users
2. https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config/
3. https://dashboard.ngrok.com/