Turn your
localhostinto a public shareable URL in one command — zero config, zero signups, and a single <10MB binary.
The lightweight, open-source Go alternative to ngrok for webhook testing, mobile previews, and remote debugging.
Install via Homebrew:
brew install kernelshard/tap/exposeTunnel your local server (e.g. port 3000):
expose tunnel 3000When you run an app on http://localhost:3000, only your laptop can access it. Expose creates a temporary public HTTPS URL that connects directly to your local server:
- 🪝 Webhook Testing: Give Stripe, GitHub, or Twilio a live HTTPS URL to test webhook callbacks locally.
- 📱 Mobile & Device Testing: Open your local website on a physical smartphone or tablet over 4G/5G.
- 👥 Instant Previews: Send a live demo link to a friend or client without deploying to cloud servers.
- 🏠 Private Self-Hosting: Route traffic through your own private VPS instead of commercial SaaS relays.
| Feature | 🚀 Expose | ngrok | Cloudflare Tunnel | LocalTunnel (Node) |
|---|---|---|---|---|
| Zero Signup Required | ✅ Instant | ❌ Mandatory account | ❌ Mandatory account | ✅ Instant |
| Single Static Binary | ✅ (<10MB) | ✅ (~30MB) | ✅ (~50MB) | ❌ (requires Node.js) |
| Open Source | ✅ Apache 2.0 | ❌ Proprietary | ✅ Apache 2.0 | ✅ MIT |
| Self-Hostable Relay | ✅ expose server |
❌ SaaS only | ❌ Cloudflare network | |
| Language & Runtime | Pure Go (zero CGO) | Go / C | Go daemon | Node.js (V8 heap) |
| Free Custom Domains | 🚧 Planned (#62) | 💲 Paid plan | ✅ Cloudflare DNS | ❌ Not supported |
# Tunnel a local development server (defaults to port 3000)
expose tunnel 3000
# Tunnel via Cloudflare Quick Tunnels
expose tunnel -P cloudflare -p 8080
# Connect to your private self-hosted relay gateway
expose tunnel 3000 --server=tunnel.mysite.com:7890brew install kernelshard/tap/exposecurl -fsSL https://raw.githubusercontent.com/kernelshard/expose/main/install.sh | shPin a specific version or install to a custom path:
# Pin version
VERSION=v0.5.1 curl -fsSL https://raw.githubusercontent.com/kernelshard/expose/main/install.sh | sh
# Custom directory
BINDIR=~/.local/bin curl -fsSL https://raw.githubusercontent.com/kernelshard/expose/main/install.sh | shDownload the latest pre-compiled binary for your architecture (macOS, Linux, Windows) from the Releases Page.
go install github.com/kernelshard/expose/cmd/expose@latestgit clone https://github.com/kernelshard/expose.git
cd expose
go build -o expose ./cmd/expose
./expose --versionNeed complete privacy and zero third-party relay dependence? Run your own tunnel gateway on any $5 VPS with a single command:
# Start your private relay server
expose server --domain=tunnel.mysite.com --control-port=7890 --public-port=8080Connect your client to your VPS (supports custom subdomains):
expose tunnel 3000 --server=tunnel.mysite.com:7890 --subdomain=my-appSave defaults per project so you can just type expose tunnel:
# Create .expose.yml in current directory
$ expose init
✓ Config created: .expose.ymlproject: expose
port: 3000Manage and query configuration values:
expose config list
expose config get portexpose/
├── cmd/expose/ # CLI entry point (Cobra)
├── internal/
│ ├── cli/ # Cobra subcommands & flag parsing
│ ├── config/ # YAML config management
│ ├── provider/ # Tunnel providers (LocalTunnel, Cloudflare, Self-Hosted)
│ ├── server/ # Self-hosted relay control & public server
│ ├── tunnel/ # Core service orchestration & lifecycle
│ └── version/ # Build metadata & version injection
└── .expose.yml # Local project configuration
- Interface-Driven: Extensible
Providerinterface makes adding new tunnel backends straightforward. - Clean Separation: CLI → Service → Provider (strict unidirectionality, zero circular dependencies).
- Fully Testable: High test coverage (>80%) across packages with race detector validation (
go test -race).
# Run all unit tests with Go race detector
go test ./... -v -race -cover
# Package-specific coverage
go test ./internal/tunnel -cover
go test ./internal/server -cover
go test ./internal/provider -coverContributions are welcome! Please check out CONTRIBUTING.md for branch strategy, test requirements, and code style guidelines.
Distributed under the Apache License 2.0. See LICENSE for details.
Made with ❤️ by @kernelshard
