Getting Started¶
Expose is a lightweight CLI tool that creates secure tunnels so your localhost is reachable from the internet — perfect for webhook testing, mobile debugging, or sharing work-in-progress.
Installation¶
Install the latest pre-compiled binary with a single command:
Custom installation directory or version pinning
You can customize the destination folder or specify a target version:
# Install a specific release version
VERSION=v0.4.2 curl -fsSL https://raw.githubusercontent.com/kernelshard/expose/main/install.sh | sh
# Install into custom directory (defaults to /usr/local/bin or ~/.local/bin)
BINDIR=~/.local/bin curl -fsSL https://raw.githubusercontent.com/kernelshard/expose/main/install.sh | sh
Requires Go 1.21+. This installs the latest release directly into your $GOPATH/bin:
Download the binary for your OS from the Releases page:
# macOS / Linux — make executable and move to PATH
chmod +x expose-linux-amd64
sudo mv expose-linux-amd64 /usr/local/bin/expose
.exe file to a directory in %PATH%.
Verify the installation:
Your First Tunnel¶
Step 1 — Start a local server¶
You need something running on localhost. Any of these work:
Step 2 — Initialize project config¶
In your project directory:
This creates a .expose.yml file:
Commit .expose.yml to git
Share your tunnel settings with your team — everyone gets the same port and project name automatically.
Step 3 — Start the tunnel¶
Output:
✓ Tunnel (LocalTunnel) started for localhost:3000
✓ Public URL: https://quick-mammals-sing.loca.lt
✓ Forwarding to: http://localhost:3000
✓ Provider: LocalTunnel
Press Ctrl+C to stop
That's it. Your local server is now publicly accessible.
Press Ctrl+C to stop the tunnel:
Common Use Cases¶
Testing Webhooks¶
Services like GitHub, Stripe, and Twilio need to reach your local handler via HTTP. Use Expose to give them a public URL:
# Start your webhook receiver
node webhook-server.js # e.g. listening on port 4000
# In another terminal
expose tunnel -p 4000
# Use the public URL in your service's webhook settings
# e.g. https://your-tunnel.loca.lt/webhook
Mobile Device Testing¶
Test responsive design on real devices without deploying:
Client Demo¶
Share work-in-progress without a staging environment:
Provider Options¶
LocalTunnel (default)¶
No dependencies, no signup — just works. Great for quick webhook tests.
Limitations: shared infrastructure, occasional connection drops on long sessions.
Cloudflare Tunnel¶
More reliable for demos and longer sessions. Requires cloudflared to be installed:
Then:
Configuration Reference¶
View config¶
Override port on the fly¶
The -p / --port flag overrides whatever is set in .expose.yml:
Per-project configs¶
Each project directory can have its own .expose.yml:
Switch between them by cd-ing into the right directory before running expose tunnel.
Troubleshooting¶
Error: config not found¶
Fix: Run expose init in your project directory.
Port already in use¶
Tunnel disconnects frequently¶
LocalTunnel can be unstable. Switch to Cloudflare:
cloudflared: command not found¶
See Cloudflare Tunnel installation steps above.
Quick Reference¶
expose init # Create .expose.yml in current directory
expose tunnel # Start tunnel (uses config)
expose tunnel -p 8080 # Override port
expose tunnel -P cloudflare # Use Cloudflare provider
expose tunnel -P cloudflare -p 3000 # Cloudflare on a specific port
expose config list # Show current config
expose config get port # Get a single config value
expose --help # Help for any command
expose tunnel --help
Need help? Open an issue on GitHub — we're happy to help.