Laravel Valet with Ngrok and reserved domains

When testing webhooks, Ngrok is unbeatable. But it’s super annoying to set up a different domain every time. Also, Ngrok has a hard limit of 20 requests per minute.

Luckily ngrok offers a premium feature for just $5/month called reserved domains, and you get 60 requests/second. If you are running Laravel Dusk tests, this is more enough.

As a premium user, you can reserve specific subdomain within a selected region such as myproject.eu.ngrok.io. You can then tell ngrok to use this subdomain using the parameters -subdomain=yourproject -region=us.

To get started, set up your Auth token you get when registering for ngrok premium:

~/.composer/vendor/laravel/valet/bin/ngrok authtoken <YOUR_AUTHTOKEN>

Now you can use Laravel Valet like this:

valet share -subdomain=mydomain.com -region=eu

I have been on ngrok’s premium plan for a while now and you can recommend this.

PROFIT! :-)