Where Is the ngrok Config File?
ngrok ngrok.yml location on Linux with authtoken, tunnels and region settings.
Last updated
ngrok v3 reads its config from ngrok.yml in the XDG config tree, holding the authtoken, default region and named tunnel definitions. Credentials on the command line override the file per invocation.
Version 2 used a different path, so stale guides mislead. Check which major version runs before editing, and keep the authtoken out of screenshots.
Where ngrok stores this, by platform
~/.config/ngrok/ngrok.yml
Main config with version, authtoken and tunnel stanzas. Version 2 used ~/.ngrok2/ngrok.yml instead, so migrate old files when upgrading. Restrict the file to your user since it holds credentials.
Frequently asked questions
Where is my ngrok authtoken stored?
In ngrok.yml at the path above after running ngrok config add-authtoken. Rotate it on the dashboard if it ever leaks.
How do I define a persistent ngrok tunnel?
Add a named tunnels entry in ngrok.yml, then start it with ngrok start <name>. The file is the durable version of long command lines.
Notice an outdated path? Let us know.