ngrok is the most popular tunnel service and many developers use it to expose their local applications to the internet. This works great – but it comes with limits and the ngrok user interface hasn't been updated for years. So if you are looking for an alternative to ngrok, you can use Expose, the open source alternative for PHP developers.
Before we dive into the differences, let's see where ngrok and Expose are similar.
tl;dr;
Expose and ngrok share a lot but Expose is open source and optimized for PHP developers. ngrok is 4 times as expensive as Expose on the same feature set. As long as you use it for development and don't need production-grade infrastructure for high workloads, Expose is the way to go.
ngrok vs. Expose
Both applications use a terminal application that you use to start a tunnel. They connect to a server network, create a public URL and return it so that you can use this URL to access your local site over the internet. Both have a local dashboard to inspect requests and to replay them, and both provide random generated URLs via HTTP and HTTPS to users who are on the free plan for the managed network.
Setup
You can install Expose via curl, composer or as a Docker container. ngrok comes with binaries for every major operating system that you can download on their website.
If you want to host your own Expose server, check out the docs.
Open source
As an alternative to ngrok, Expose is open source and written in PHP. This makes it possible to host Expose yourself on any web server that can serve PHP applications. You can extend Expose if you need more features and provide feedback in the public GitHub repository.
ngrok was open source in version one, but became proprietary software more than 5 years ago. The open source respositry is not updated or managed anymore and ngrok advises against using it.
Expose is actively developed and maintained as open source service – but still offers a managed service for those who don't want to host and maintain their own server.
Local request dashboard
Every shared tunnel of Expose or ngrok has a local dashboard to inspect incoming requests. While the ngrok dashboard is very generic and the design is somehow old-fashioned, Expose provides a beautiful dashboard that is optimized for PHP developers and features a light theme and a dark mode.
You can inspect and replay requests on both alternatives. Replaying requests is useful if you receive a 3rd party webhook and test your application with the same webhook multiple times to see if a change works. This speeds up the process and you don't have to go through the hassle to fire the webhook in the 3rd party system again and again while you develop your app.
Expose dashboard with light mode
Expose dashboard with dark mode
ngrok dashboard
Team management
By default, both alternatives come with a per user setup and this is good as long as you don't share reserved subdomains or use custom URLs. To share a domain configuration with someone else so that both developers can create tunnels with this domain, both need to be on the same team.
Whitelabel domains
ngrok and Expose support white label domains on their managed infractructure. To use this feature in ngrok, you need the premium plan that costs $99 yearly. Expose offers the same feature for $59 yearly on the Pro plan or for free, if you host your own Expose server.
Custom domains allow you to share your local sites via your own domain and this creates more trust if you share them with clients or set them up in a 3rd party system of your client. As additional benefit, you don't need to reserve a custom subdomain so that it is unique to your account and no one else can claim it.
The main difference between Expose and ngrok is that Expose generates SSL certificates for secure HTTPS connections automatically and ngrok has a manual process where you can upload a certificate that you got elsewhere. This means that there is a hidden cost for the ngrok SSL certificate and manual work involved. Expose uses Let's Encrypt to create certificates on the fly and stores them on the Expose network so that you don't have to set them up.
Reserved subdomains
When working with 3rd party platforms and webhooks, you have to tell the other platform where to send the webhook in case an event is fired. This involves setting a webhook endpoint where the other platform can send you the data.
If you use ngrok or Expose on their free plans, you get a random subdomain on every connect. This means that you have to update the 3rd party platform and connect the new webhook everytime you connect to your local app. You can get around this by using a reserved subdomain and use this on every connect. A reserved subdomain on the Expose network lets you set the webhook endpoint to your-app-name.us1.sharedwithexpose.com
and reuse this URL on every new connect. This is also helpful if multiple developers of your team work with the same webhook and reuse the tunnel without changing the configuration in the 3rd party system.
Global server network
Both services run global networks for their service. This makes sure that both alternatives have a good connection and provide low-latency requests in all regions on the world. Expose has additional servers in Australia and allows US users to pick their prefered location with servers on the west- and eastcoast – the alternative ngrok has no dedicated Australian infrastructure.