BeyondCode Expose is an open-source alternative to ngrok for sharing your local development environment with the outside world. It's useful for webhooks, external testing, and client demos.
Enable Expose during the initial setup:
dev setupIf you've already set up your environment:
mkdir -p conf/expose
dev rebuildShare a specific hostname:
dev expose your-project.localhostExpose will:
- Create a tunnel to your local environment
- Provide a public URL
- Forward all traffic to your local hostname
Both Expose and ngrok provide similar functionality. Key differences:
Expose:
- Open-source
- Self-hosted option available
- Free tier with fewer restrictions
- Integrated into dev environment
ngrok:
- More established
- Better documentation
- More features in paid tiers
- See sharing-with-the-world-via-ngrok.md
Expose runs in host network mode, allowing it to access your local services directly.
Test webhooks from external services:
dev expose shop.localhostShare the provided URL with the webhook provider (e.g., payment gateway, Shopify, etc.)
Show work-in-progress to clients:
dev expose demo.localhostSend the public URL to your client for review.
Test your site on mobile devices without network configuration:
dev expose mysite.localhostAccess the public URL from your mobile device.
When exposing your local environment:
- Don't expose production credentials or real customer data
- Use temporary database dumps for demos
- Be aware that anyone with the URL can access your site
- Close the tunnel when done
Check if Expose is running:
dev ps | grep exposeView Expose logs:
dev logs exposeIf the tunnel fails:
- Verify your hostname is accessible locally
- Check that the SSL proxy is running:
dev ps | grep ssl - Ensure no firewall is blocking outbound connections
If you prefer ngrok, see sharing-with-the-world-via-ngrok.md for setup instructions.