In this episode, we tackle a common problem: exposing your Laravel Homestead project to the internet. Whether you want to let someone preview your work or need to test webhooks (for stuff like payments or subscriptions), you'll see that you can't just open up local ports—it's not safe or practical.
Instead, we'll use ngrok to create a secure tunnel to your project. ngrok is great for local servers, but requires a little extra setup with Homestead since Homestead uses named projects and virtual hosts. I'll walk you through updating your Homestead.yaml
file to set up an extra mapping for your project (e.g., someproject.ngrok.io
), then we re-provision Homestead, and finally use ngrok with a subdomain that matches your project name.
By the end, you’ll have your Laravel Homestead site, available securely via a public URL, ready for webhook testing or sharing with others. Plus, it’s easy to turn off when you’re done—just close ngrok. Super handy!