A simple package to create and manage Cloudflare Tunnels for your Laravel projects. Cloudflare Tunnels give you instant public access to your local development environment, similar to Expose or ngrok, but powered by Cloudflare. Perfect for testing webhooks and sharing work-in-progress.
Pair it with Cloudflared for Vite to get seamless tunneled access to both your Laravel app and Vite's dev server, making it effortless to debug your frontend on real devices like your iPhone.
- Install cloudflared
- Run
cloudflared tunnel loginto authenticate the desired domain - Install Laravel Herd
Install the package using Composer:
composer require aerni/cloudflaredCreate a tunnel for your project with a single command. This will create a Cloudflare tunnel, configure DNS records, set up a Herd link, and save the configuration to .cloudflared.yaml in your project root.
php artisan cloudflared:installNote: Run this command again to modify the existing installation. Change the subdomain, create or repair DNS records, or delete and recreate the tunnel.
Start the tunnel to make your local site publicly accessible.
php artisan cloudflared:runRemove the tunnel, DNS records, and configuration when you no longer need it.
php artisan cloudflared:uninstallThis package is open-sourced software licensed under the MIT license.
Developed by Michael Aerni
For issues and questions, please use the GitHub Issues page.