Sharing local development / tunnel

If you need to share/expose your local environment outside of your local network you can create a tunnel to the outside work. This can be helpful if you need to test endpoints that has to be globally accessible, i.e. webhooks from an outside vendor such as Shopify.

Ngrok is a great tool for this task, and built into tools like Valet and Herd.

How to use

Start by opening a new tunnel with ngrok.

Ngrok

ngrok http playset.test:80 --host-header=playset.test

The --host-header is important to set to your base Stratasphere local URL so that traffic will be redirected correctly

Herd

herd share

Make sure you are in the Stratasphere directory before you run the command.

This will provide you with a one-time URL that exposes your local site to the outside world.

Now take this URL (without the schema, so in this case it would be f56eff565845.ngrok.app and add it to the domains table in the central database and set the tenant_id to the tenant you would like it the tunnel to redirect to.

Now if you go to that URL you should see your local environment and you can use this URL for as long as you have the tunnel open.

Custom domain

If you have a custom domain registered with Ngrok you can pass it with the --domain flag, i.e.

Or with Herd

Last updated

Was this helpful?