Skip to main content

How to share a site

Herd makes it easy to share your local sites with the world. This is great for testing your sites on different devices, receiving webhooks, or sharing them with clients and colleagues. Herd uses Expose to share your sites.

Sharing sites via Expose

Expose may not be available in all geographical regions due to regulatory reasons. If Expose isn’t available in your country, try ngrok.
To share your site using Expose, you need an Expose account. Open the settings, go to the “Sharing” tab and click “Connect with Expose”. Herd opens your browser where you can sign in to Expose or create a free account. Once you confirm the connection, Herd stores your Expose token for you.
Expose Settings
The Sharing tab shows your Expose plan and lets you select the default server for your shares. Expose Pro users can also select a default custom domain. Click “Manage Account” to see your Expose connection in the integrations settings, where you can also disconnect it. Disconnecting stops all active shares. If you prefer the CLI, you can also set your token manually:

Sharing from the Applications window

Select a site in the Applications window and click the share icon next to its URL. Herd starts sharing the site right away and shows the public URL, which you can copy or open. “Open Dashboard” opens the local Expose dashboard where you can inspect all requests to your share. Click “Stop Sharing” once you’re done. Shares from the Applications window use the default server and domain from the Sharing settings. The share icon turns green while a site is shared, and Herd Studio shows the same share for the site. Herd stops all shares when you quit Herd.

Sharing via the CLI

Once you connected your Expose account, you can share your sites by running herd share or expose share in the site directory that you want to share.
You can specify a subdomain or server region for best performance and by adding parameters for them to the share command.

Sharing with basic authentication

You may protect your share links with basic authentication by using the --basicAuth argument when sharing your site.

Sharing sites via ngrok

If you want to use ngrok, install it according to their instructions. After that, you can share Herd sites via the terminal: