PHPackages                             pixovoid/laravel-cloudflared - 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. pixovoid/laravel-cloudflared

ActiveLibrary

pixovoid/laravel-cloudflared
============================

A Laravel package to create and manage Cloudflare Tunnels for local development (fork by PixoVoid)

v0.1.0(5mo ago)115MITPHPPHP ^8.4CI passing

Since Dec 8Pushed 5mo agoCompare

[ Source](https://github.com/PixoVoid/laravel-cloudflared)[ Packagist](https://packagist.org/packages/pixovoid/laravel-cloudflared)[ Docs](https://github.com/PixoVoid/laravel-cloudflared)[ RSS](/packages/pixovoid-laravel-cloudflared/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Laravel Cloudflared
===================

[](#laravel-cloudflared)

A Laravel package for creating and managing Cloudflare Tunnels to provide secure public access to local development environments. This solution offers an alternative to services like ngrok or Expose, leveraging Cloudflare's infrastructure for tunneling requests directly to your local Laravel application.

Key Features
------------

[](#key-features)

- Create and manage Cloudflare Tunnels directly from Laravel Artisan commands
- Automatic DNS record configuration for custom subdomains
- Integration with Laravel Herd for local development environments
- Secure tunneling with Cloudflare's global network
- Seamless integration with Vite development server via companion package

Disclaimer and Limitation of Liability
--------------------------------------

[](#disclaimer-and-limitation-of-liability)

This software is provided "as is", without warranty of any kind, express or implied. The maintainers and contributors shall not be liable for any damages or losses, including but not limited to direct, indirect, incidental, special, exemplary, or consequential damages, arising from the use of this package. Users are solely responsible for ensuring the security, reliability, and compliance of their development and production environments. Use at your own risk.

Prerequisites
-------------

[](#prerequisites)

Before using this package, ensure you have:

1. **Cloudflared CLI**: Install from [Cloudflare's downloads page](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads)
2. **Cloudflare Authentication**: Run `cloudflared tunnel login` to authenticate with your Cloudflare account and domain
3. **Laravel Herd**: Install [Laravel Herd](https://herd.laravel.com) for optimal local development experience

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

[](#installation)

Install the package via Composer:

```
composer require pixovoid/laravel-cloudflared
```

Usage
-----

[](#usage)

### Creating a Tunnel

[](#creating-a-tunnel)

Create a Cloudflare tunnel for your project with a single command. This command will:

- Create a new Cloudflare tunnel
- Configure DNS records for your specified subdomain
- Set up a Herd link for local access
- Save configuration to `.cloudflared.yaml` in your project root

```
php artisan cloudflared:install
```

**Note**: Running this command again will modify the existing installation. You can change the subdomain, repair DNS records, or recreate the tunnel as needed.

### Running the Tunnel

[](#running-the-tunnel)

Start the tunnel to make your local development environment publicly accessible:

```
php artisan cloudflared:run
```

### Removing a Tunnel

[](#removing-a-tunnel)

Clean up all resources when the tunnel is no longer needed:

```
php artisan cloudflared:uninstall
```

Development Setup
-----------------

[](#development-setup)

### Local Development with Path Repository

[](#local-development-with-path-repository)

For developing or modifying the package, you can use Composer's path repository:

1. Add the path repository to your Laravel application's `composer.json`:

```
{
    "repositories": [
        {
            "type": "path",
            "url": "../path/to/laravel-cloudflared",
            "options": {
                "symlink": true
            }
        }
    ]
}
```

2. Require the package from the local path:

```
composer require pixovoid/laravel-cloudflared:dev-main
```

### Testing

[](#testing)

The package includes PHPUnit tests and uses `orchestra/testbench` for Laravel integration testing.

Run the test suite after installing development dependencies:

```
composer install --dev
composer test
```

Platform Compatibility
----------------------

[](#platform-compatibility)

### Windows Support

[](#windows-support)

This fork implements best-effort Windows compatibility with the following considerations:

- Automatic detection and fallback for TTY unsupported environments
- Normalized home directory detection supporting `HOME`, `USERPROFILE`, and `HOMEDRIVE`/`HOMEPATH` environment variables
- Graceful fallback for process signal handling when `pcntl` extension is unavailable
- Process cleanup mechanisms for Windows environments

For Windows usage, ensure:

- `cloudflared` CLI is installed and available in your system PATH
- Laravel Herd is installed and configured
- Required environment variables are properly set

Attribution and Licensing
-------------------------

[](#attribution-and-licensing)

This repository is a fork of the original project `aerni/laravel-cloudflared` ().

### Original Project

[](#original-project)

- **Author**: Michael Aerni
- **License**: MIT
- **Repository**:

### Fork Maintainer

[](#fork-maintainer)

- **Maintainer**: PixoVoid (PixoVoid.dev, PixoVoid.net)
- **Package Name**: `pixovoid/laravel-cloudflared`
- **Key Changes**: Windows compatibility improvements, maintenance updates, and platform-specific fixes

### License Information

[](#license-information)

This software is licensed under the MIT License. See the `LICENSE` file for the full license text.

Copyright for the original work belongs to Michael Aerni. PixoVoid is listed as the fork maintainer.

For a detailed summary of changes made in this fork, please refer to the `NOTICE.md` file.

Support
-------

[](#support)

For issues, feature requests, or questions, please use the [GitHub Issues](https://github.com/PixoVoid/laravel-cloudflared/issues) page of this repository.

Related Packages
----------------

[](#related-packages)

For seamless integration with Vite development server, consider using [Cloudflared for Vite](https://github.com/aerni/vite-plugin-laravel-cloudflared), which provides tunneled access to both your Laravel application and Vite's hot module replacement server, facilitating frontend debugging on real devices.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance73

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

153d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/85c00d33dd7878185683149b408bf67e5c454f94a7eb3801e533db03743ab3fe?d=identicon)[PixoVoid](/maintainers/PixoVoid)

---

Top Contributors

[![PixoVoid](https://avatars.githubusercontent.com/u/189660081?v=4)](https://github.com/PixoVoid "PixoVoid (7 commits)")

---

Tags

cloudflaredlaravelphplaravelcloudflaretunnelherdcloudflared

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pixovoid-laravel-cloudflared/health.svg)

```
[![Health](https://phpackages.com/badges/pixovoid-laravel-cloudflared/health.svg)](https://phpackages.com/packages/pixovoid-laravel-cloudflared)
```

###  Alternatives

[monicahq/laravel-cloudflare

Add Cloudflare ip addresses to trusted proxies for Laravel.

3372.7M4](/packages/monicahq-laravel-cloudflare)[nexxai/laravel-cfcache

A handful of Cloudflare cache helpers for Laravel

1317.7k](/packages/nexxai-laravel-cfcache)[ntanduy/cloudflare-d1-database

Easy configuration and setup for D1 Database connections in Laravel.

215.4k](/packages/ntanduy-cloudflare-d1-database)

PHPackages © 2026

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