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!).

  1. In LocalCan, create a Domain with proxy and set the target server as your site, e.g. http://myapp.test:80 or https://myapp.test:443.
  2. On the domains list, click the "…" menu and choose Edit domain.
  3. 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.
  4. 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:

  1. Close Herd completely (quit the app, not just minimize).
  2. Open your site's Nginx config file: /Users/<user>/Library/Application Support/Herd/config/valet/Nginx/<site-name>.test.
  3. Edit the line listen 127.0.0.1:443 ssl; by changing the port from 443 to, for example, 8443.
  4. Save the file and launch Herd.
  5. In LocalCan, create a domain pointing to https://<site-name>.test:8443.
  6. 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:

  1. In Herd, click Unsecure the selected site.
  2. Close Herd completely.
  3. In LocalCan, ensure the HTTPS proxy is enabled (if it's red, toggle it off and on).
  4. Launch Herd.
  5. 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.