Download the PHP package laratusk/cloudflare-tunnel without Composer

On this page you can find all versions of the php package laratusk/cloudflare-tunnel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cloudflare-tunnel

Cloudflare Tunnel for Laravel

CI Latest Version on Packagist

Start and manage Cloudflare Tunnels directly from Artisan. Expose your local Laravel application to the internet with a single command — using either a quick tunnel (random URL, zero config) or a named tunnel (static hostname, permanent URL).

Features

Requirements

Installation

1. Install cloudflared

macOS (Homebrew):

Linux (Debian/Ubuntu):

Other platforms: See the official download page.

Verify the installation:

2. Install the package

3. Publish the config (optional)

Quick Start

Quick Tunnel (zero config)

Run the command with no additional setup — you get a random public URL instantly:

Named Tunnel (static hostname)

A named tunnel gives you a permanent, predictable URL under your own domain. Follow these steps once to set it up:

Step 1: Authenticate with Cloudflare

This opens your browser. Select the domain you want to use and authorize cloudflared.

Step 2: Create a tunnel

Note the tunnel ID in the output — you'll see it in cloudflared tunnel list too.

Step 3: Route DNS to the tunnel

This creates a CNAME record pointing tunnel.example.com to your tunnel.

Step 4: Create the cloudflared config file

Create ~/.cloudflared/config.yml:

Replace <TUNNEL-ID> with your actual tunnel ID. The httpHostHeader should match your local development domain. The credentials file path is printed when you create the tunnel.

Step 5: Configure the package

Add to your .env:

Step 6: Run it

Configuration

Environment Variable Default Description
CLOUDFLARE_TUNNEL_MODE quick quick or named
CLOUDFLARE_TUNNEL_NAME Named tunnel name (required for named mode)
CLOUDFLARE_TUNNEL_HOSTNAME Static hostname (required for named mode)
CLOUDFLARE_TUNNEL_LOCAL_URL http://127.0.0.1 Local URL to forward traffic to
CLOUDFLARE_TUNNEL_HOST_HEADER Override the Host header for local requests
CLOUDFLARE_TUNNEL_TIMEOUT 30 Seconds to wait for tunnel connection

Events

The package dispatches two events you can hook into with standard Laravel listeners:

Event Payload When
TunnelConnected string $url, TunnelMode $mode After the tunnel is established
TunnelDisconnected string $url Before the process exits (Ctrl+C)

Example: Register a Telegram webhook

Create a listener:

Laravel auto-discovers listeners, so no manual registration is needed.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.


All versions of cloudflare-tunnel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
ext-pcntl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laratusk/cloudflare-tunnel contains the following files

Loading the files please wait ...