Guides
Using LocalCan with Laravel Herd sites
Using Public URLs with Laravel Herd
You can use either Localcan.dev or Cloudflare Quick Tunnels in LocalCan to point to your Laravel Herd site and enjoy traffic inspection and Basic Auth (and no monthly costs!).
- In LocalCan, create a Domain with proxy and set the target server as your site, e.g.
http://myapp.test:80
orhttps://myapp.test:443
. - On the domains list, click the "…" menu and choose Edit domain.
- In the Advanced Settings section, choose the Public URL tab and set the Host header to Target Server Host. This will ensure Laravel Herd knows which site to serve.
- If using HTTPS, make sure the HTTPS proxy is enabled (green) in LocalCan's settings.
Using Local Domains with Laravel Herd
To make it work, it's necessary to avoid port conflicts between LocalCan and Herd. Choose one of these two options:
Option 1: Edit Herd Site to Use a Different HTTPS Port
This option keeps HTTPS in both LocalCan and Herd, but moves Herd to a different port:
- Close Herd completely (quit the app, not just minimize).
- Open your site's Nginx config file:
/Users/<user>/Library/Application Support/Herd/config/valet/Nginx/<site-name>.test
. - Edit the line
listen 127.0.0.1:443 ssl;
by changing the port from 443 to, for example, 8443. - Save the file and launch Herd.
- In LocalCan, create a domain pointing to
https://<site-name>.test:8443
. - Make sure HTTPS proxy is enabled in LocalCan's settings.
Option 2: Make your Herd site HTTP-only
This option uses HTTPS in LocalCan but HTTP in Herd:
- In Herd, click Unsecure the selected site.
- Close Herd completely.
- In LocalCan, ensure the HTTPS proxy is enabled (if it's red, toggle it off and on).
- Launch Herd.
- In LocalCan, create a domain pointing to
http://<site-name>.test:80
.
In either options make sure to set the Host header to Target Server Host in the Advanced Settings section, in the Local Domain tab. This will ensure Laravel Herd knows which site to serve.
Additional Steps
If you your app uses <site-name>.test
address somewhere in its source code, you may need to replace it with the <site-name>.local
domain or make ignore it, so that it uses paths relative to the root.
© 2025 LocalCan™. All rights reserved.