A very simple PowerShell script that automates the process of starting n8n with ngrok tunneling.
- ngrok installed and authenticated
- Node.js and npx installed
- n8n installed globally or available via npx
-
Start ngrok in a terminal:
ngrok http 5678 -
Run the PowerShell script in another terminal:
.\start.ps1 -
When prompted for the ngrok API URL, press Enter to use the default (
http://localhost:4040/api/tunnels)
The script will:
- Verify that ngrok is running
- Fetch the public HTTPS URL from ngrok's local API
- Set the
WEBHOOK_URLenvironment variable automatically - Start n8n using
npx n8n
- Only runs in windows!
- The script expects ngrok to already be running before execution
- ngrok will continue running after the script terminates
- Press Ctrl+C to stop n8n when finished