brew install cloudflare/cloudflare/cloudflaredcloudflared tunnel logincloudflared tunnel create <NAME>💡 Default tunnel name I've setup in the cf bash script below is local, so you could set it as local too.
Confirm that the tunnel has been successfully created by running:
cloudflared tunnel listMore details: Set up a tunnel locally.
Add DNS record for your tunnel.
cloudflared tunnel route dns <Tunnel Name> subdomain.yourdomain.comExample assuming local is your tunnel name:
cloudflared tunnel route dns local local.yourdomain.comDownload the given cf script and store it at a location where you can easily access and make it executable:
chmod +x cfIf you've used a different tunnel name other than the default local, then make sure to update the TUNNEL_NAME in cf script.
Go into any of your valet site's directory and fire:
cfIf everything goes well, then your local site should now be exposed to the internet via Cloudflare Tunnel and accessible at local.yourdomain.com.


Super! Thanks a lot.
I have modified it a little to work with Herd (https://herd.laravel.com/).
I have also added a wildcard CNAME record (
*) to use it like{project}.yourdomain.com