PHPackages                             laragear/expose - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. laragear/expose

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

laragear/expose
===============

Expose your local PHP project to the internet via popular tunnel services.

v1.0.1(2mo ago)62MITPHPPHP ^8.3CI passing

Since Mar 23Pushed 2mo agoCompare

[ Source](https://github.com/Laragear/Expose)[ Packagist](https://packagist.org/packages/laragear/expose)[ Fund](https://github.com/sponsors/DarkGhostHunter)[ Fund](https://paypal.me/darkghosthunter)[ RSS](/packages/laragear-expose/feed)WikiDiscussions 1.x Synced 2w ago

READMEChangelog (4)Dependencies (13)Versions (6)Used By (0)

Expose
======

[](#expose)

[![Latest Version on Packagist](https://camo.githubusercontent.com/aa8ce20080f542f74b270648a24196865d736f86761537f910913d1df227a3ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c617261676561722f6578706f73652e737667)](https://packagist.org/packages/laragear/expose)[![Latest stable test run](https://github.com/Laragear/Expose/actions/workflows/php.yml/badge.svg?branch=1.x)](https://github.com/Laragear/Expose/actions/workflows/php.yml)[![Codecov coverage](https://camo.githubusercontent.com/af82f356cf346a0ecccde62325afbb473133fd49aa1eecbec13b7c821eec3d3a/68747470733a2f2f636f6465636f762e696f2f67682f4c617261676561722f4578706f73652f67726170682f62616467652e7376673f746f6b656e3d6f735758534266577134)](https://codecov.io/gh/Laragear/Expose)[![Maintainability](https://camo.githubusercontent.com/5cd783916697d160cc2cd1b4a108120af5d8e7b945b2e7c1dd8845306fba793e/68747470733a2f2f716c74792e73682f67682f4c617261676561722f70726f6a656374732f4578706f73652f6d61696e7461696e6162696c6974792e737667)](https://qlty.sh/gh/Laragear/projects/Expose)[![Sonarcloud Status](https://camo.githubusercontent.com/20084d10cdf295d92317f77968afe8b4614d657f9b5adc3d93af8cd9d662b27e/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d4c617261676561725f4578706f7365266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=Laragear_Expose)

Expose your application to the Internet in one command

```
composer expose
```

Become a sponsor
----------------

[](#become-a-sponsor)

[![](.github/assets/support.png)](https://github.com/sponsors/DarkGhostHunter)

Your support allows me to keep this package free, up to date, and maintainable.

Requirements
------------

[](#requirements)

- Linux or macOS (Windows *may* work)
- PHP 8.3 or later
- Composer **2.6** or higher
- A PHP project with a `composer.json` at the root (recommended)

Installation
------------

[](#installation)

You can install the package via Composer.

```
composer require global laragear/expose
```

How does this work?
-------------------

[](#how-does-this-work)

This composer plugin manages popular tunneling services to expose your application on the Internet. This is great when you want to show your application development to somebody far away, through a simple link, especially when dealing with live-client videocalls or meetings.

Supported Tunnel Services
-------------------------

[](#supported-tunnel-services)

ServiceKeyDistributed asAuth required[ngrok](https://ngrok.com)`ngrok`Binary (cURL)Optional (free tier)[Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/)`cloudflare`Binary (cURL)Optional (quick tunnels)[InstaTunnel](https://instatunnel.my)`instatunnel`NPM packageOptional[Localtunnel](https://localtunnel.me)`localtunnel`NPM packageNo[Pinggy](https://pinggy.io)`pinggy`SSH (system binary)Optional[Zrok](https://zrok.io)`zrok`Binary (cURL)Yes (free account)Tip

You can [add your own tunnel services](#adding-additional-tunnels).

Usage
-----

[](#usage)

To expose your application to the Internet, simple use `composer expose`:

```
composer expose
```

On the first run, the command will:

1. **Detect** your PHP framework (Laravel, Symfony, WordPress, CakePHP, Yii, Lumen, or plain PHP).
2. **Ask** which tunnel service you prefer, then save the choice to `composer.json`.
3. **Check** that the tunnel binary is installed; download it or guide you through manual installation if not.
4. **Run** a local development server on `http://localhost:8080` (or the preferreded by your app).
5. **Start** the tunnel and print the public URL.

The are some options you can use when exposing your application:

OptionShortDescription`--host`Local host to bind to (default: `localhost`)`--port``-p`Local port to bind to (default: `8080`)`--tunnel``-t`Override the tunnel service for this run onlyFor example, you can use *ngrok* using an alternative host and port.

```
composer expose --port=9000
composer expose --tunnel=cloudflare
```

### Updating tunnels

[](#updating-tunnels)

To update the tunnel library, or only one given tunnel, use the `expose:update` command.

```
composer expose:update
composer expose:update --force          # Force re-download
composer expose:update --tunnel=ngrok   # Target a specific service
```

### Configuring tunnels

[](#configuring-tunnels)

The `expose:configure` command will walk you through service-specific prompts (auth tokens, subdomains, regions, etc.) to properly configure the tunnel you're using.

```
composer expose:configure
composer expose:configure --reset       # Clear saved tunnel preference
```

Tip

Sensitive values like auth tokens are never set in the `composer.json`.

### Checking tunnel status

[](#checking-tunnel-status)

To display whether the tunnel is running, the current public URL, and the connection count (where available), use the `expose:status` command.

```
composer expose:status
```

### Uninstall tunnel binaries

[](#uninstall-tunnel-binaries)

The `expose:uninstall` command will uninstall all tunnel binaries. It does not uninstall the plugin.

```
composer expose:uninstall
composer expose:uninstall --purge       # Also remove all Expose config from composer.json
```

Adding additional tunnels
-------------------------

[](#adding-additional-tunnels)

You may be not happy with the current selection of tunnels. In that case, you can add your own tunnel in your `extra.expose` key in your `composer.json`.

The `tunnel` should state the default tunnel, and the `tunnels` should describe your tunnels labels and class.

```
{
    "extra": {
        "expose": {
            "tunnel": "my-vpn",
            "tunnels": {
                "my-vpn": {
                    "label": "My Corporate VPN Tunnel",
                    "class": "App\\DevTools\\CorpVpnTunnel"
                }
            }
        }
    }
}
```

The `CorpVpnTunnel` class must implement [`Laragear\Expose\Contracts\Tunnel`](src/Contracts/Tunnel.php) (or extend `AbstractTunnel` which may be easier):

```
namespace App\DevTools;

use Laragear\Expose\Tunnels\AbstractTunnel;
use Symfony\Component\Process\Process;

class CorpVpnTunnel extends AbstractTunnel
{
    public function name(): string
    {
        return 'Corporate VPN';
    }

    public function binary(): string
    {
        return 'vpntunnel';
    }

    public function start(string $host, int $port): Process
    {
        $process = $this->buildProcess([
            $this->binaryCommand(), '--local', "{$host}:{$port}",
        ]);

        $process->start();

        return $process;
    }
}
```

### Adding a tunnel via package

[](#adding-a-tunnel-via-package)

If you're a package author, you can also make your package a *tunnel-provider* by offering your own adapter through the `extra.expose-tunnel` key.

```
{
    "name": "acme/my-tunnel",
    "extra": {
        "expose-tunnel": {
            "key":   "acme",
            "label": "Acme Tunnel (acme.example.com)",
            "class": "Acme\\Tunnel\\AcmeTunnel"
        }
    }
}
```

Security
--------

[](#security)

If you discover any security-related issues, issue a [Security Advisory](https://github.com/Laragear/Expose/security/advisories/new).

License
=======

[](#license)

This specific package version is licensed under the terms of the [MIT License](LICENSE.md), at the time of publishing.

[Laravel](https://laravel.com) is a Trademark of [Taylor Otwell](https://github.com/TaylorOtwell/). Copyright © 2011-2026 Laravel LLC.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance83

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

5

Last Release

87d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5141911?v=4)[Italo](/maintainers/DarkGhostHunter)[@DarkGhostHunter](https://github.com/DarkGhostHunter)

---

Top Contributors

[![DarkGhostHunter](https://avatars.githubusercontent.com/u/5141911?v=4)](https://github.com/DarkGhostHunter "DarkGhostHunter (22 commits)")

---

Tags

plugincomposersymfonylaravelwordpresssshcakephpyiisharetunnelngroklocalhost

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laragear-expose/health.svg)

```
[![Health](https://phpackages.com/badges/laragear-expose/health.svg)](https://phpackages.com/packages/laragear-expose)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M279](/packages/laravel-horizon)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[laravel/envoy

Elegant SSH tasks for PHP.

1.6k5.8M22](/packages/laravel-envoy)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
