SOP 002: Connect Your ngrok Account ​
Fresh| Field | Value |
|---|---|
| SOP ID | SOP-002 |
| Version | 1.0 |
| Status | Active |
| Last Updated | 2026-02-13 |
Purpose ​
Authenticate the ngrok agent with your ngrok account by adding your authtoken.
Prerequisites ​
- ngrok installed (SOP 001)
- An ngrok account (sign up free)
Procedure ​
Step 1: Get Your Authtoken ​
- Log into dashboard.ngrok.com
- Navigate to Get Started > Your Authtoken
- Copy the authtoken string
Step 2: Add Authtoken to Agent ​
bash
ngrok config add-authtoken YOUR_TOKEN_HEREReplace YOUR_TOKEN_HERE with the token you copied.
Step 3: Verify Configuration ​
Check that the config file was created:
bash
ngrok config checkThis prints the config file location and validates its contents. Default Windows location:
%HOMEPATH%\AppData\Local\ngrok\ngrok.ymlEnvironment Variable Alternative ​
You can also set the authtoken via environment variable (overrides config file):
bash
set NGROK_AUTHTOKEN=YOUR_TOKEN_HEREFor persistent environment variable, use System Properties > Environment Variables.
Security Best Practices ​
Authtoken Security
- Use a separate authtoken for each agent you configure
- The full token is only displayed once when provisioned
- ngrok does not store a recoverable representation of the token
- If compromised, revoke and create a new token immediately
Adding an API Key (Optional) ​
For programmatic access to the ngrok API:
bash
ngrok config add-api-key YOUR_API_KEYCreate API keys at dashboard.ngrok.com/api.
Verification Checklist ​
- [ ] Authtoken added successfully
- [ ]
ngrok config checkshows valid config - [ ] Config file exists at expected location
Troubleshooting ​
| Issue | Solution |
|---|---|
| Invalid authtoken | Double-check the token from dashboard |
| Config file not found | Run ngrok config check to see expected location |
| Permission denied writing config | Run terminal as Administrator |