PHPackages                             leobsst/laravel-pcloud-filesystem - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. leobsst/laravel-pcloud-filesystem

ActiveLibrary[File &amp; Storage](/categories/file-storage)

leobsst/laravel-pcloud-filesystem
=================================

File system pCloud PHP SDK integration for Laravel-based application.

v1.0.7(1mo ago)0412↓100%MITPHPPHP ^8.2CI passing

Since Apr 23Pushed 1mo agoCompare

[ Source](https://github.com/leobsst/laravel-pcloud-filesystem)[ Packagist](https://packagist.org/packages/leobsst/laravel-pcloud-filesystem)[ Docs](https://github.com/leobsst/laravel-pcloud-filesystem)[ GitHub Sponsors](https://github.com/LEOBSST)[ RSS](/packages/leobsst-laravel-pcloud-filesystem/feed)WikiDiscussions 1.x Synced 1w ago

READMEChangelog (8)Dependencies (15)Versions (9)Used By (0)

Laravel pCloud Filesystem
=========================

[](#laravel-pcloud-filesystem)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3b22121448e99d8860946857345ba535fc783131fd74cd566adf2840e503f91b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c656f627373742f6c61726176656c2d70636c6f75642d66696c6573797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/leobsst/laravel-pcloud-filesystem)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d0e6561afd4dbbae788822d3aa56f44ab98daa8965867daf4193a18d5dd2254d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c656f627373742f6c61726176656c2d70636c6f75642d66696c6573797374656d2f72756e2d74657374732e796d6c3f6272616e63683d312e78266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/leobsst/laravel-pcloud-filesystem/actions?query=workflow%3Arun-tests+branch%3A1.x)[![Total Downloads](https://camo.githubusercontent.com/931672b2190700d9b28eee84dd95b72768534aa20daf9265a0dacea2a1a75341/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c656f627373742f6c61726176656c2d70636c6f75642d66696c6573797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/leobsst/laravel-pcloud-filesystem)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![Laravel](https://camo.githubusercontent.com/c1a53b2d177554866a8da2868aba324ba429addd2d3655960bf485e4bda83b18/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31312e3025323025374325323031322e3025323025374325323031332e302d4646324432303f6c6f676f3d6c61726176656c)](https://laravel.com)[![PHP](https://camo.githubusercontent.com/c4592483be21a67431df3607bb00d9aa91ffb5c78a669a30d52ae5acded2f96a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d3737374242343f6c6f676f3d706870)](https://www.php.net)

A [Laravel](https://laravel.com) filesystem driver for [pCloud](https://www.pcloud.com), built on top of the [pCloud PHP SDK](https://github.com/pCloud/pcloud-sdk-php) and [Flysystem v3](https://flysystem.thephpleague.com). Exposes a `pcloud` disk driver that integrates seamlessly with `Storage::disk('pcloud')`.

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

[](#requirements)

- PHP 8.2+
- Laravel 11, 12, or 13

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

[](#installation)

Install the package via Composer:

```
composer require leobsst/laravel-pcloud-filesystem
```

The service provider is auto-discovered — no manual registration needed.

Configuration
-------------

[](#configuration)

### Option A — Interactive setup (recommended)

[](#option-a--interactive-setup-recommended)

Run the install command. It will guide you through the OAuth2 flow and write the credentials directly to your `.env`:

```
php artisan pcloud-filesystem:install
```

Or run the configure command standalone (useful when adding a second pCloud disk with a prefix):

```
php artisan pcloud-filesystem:configure
```

The command will:

1. Ask for an optional **environment variable prefix** (e.g. `BACKUP` → `BACKUP_PCLOUD_ACCESS_TOKEN`). Leave empty for the default `PCLOUD_*` names.
2. Ask for your pCloud **client\_id** and **client\_secret** (obtained from the [pCloud developer console](https://docs.pcloud.com/methods/intro/getting_started.html)).
3. Open a browser authorization URL — after you approve, copy the `code` from the redirect URL.
4. Exchange the code for an access token and write `PCLOUD_ACCESS_TOKEN`, `PCLOUD_LOCATION_ID`, and `PCLOUD_ROOT` to your `.env`. If a variable already exists you will be asked whether to override it.

### Option B — Manual setup

[](#option-b--manual-setup)

**1. Obtain a pCloud access token**

Create an app in the [pCloud developer console](https://docs.pcloud.com/methods/intro/getting_started.html) and complete the OAuth2 flow to obtain an access token.

**2. Add environment variables**

```
PCLOUD_ACCESS_TOKEN=your-access-token-here
PCLOUD_LOCATION_ID=1     # 1 = US servers, 2 = EU servers
PCLOUD_ROOT=/            # Optional: root folder for all operations
```

**3. Register the disk**

Add the `pcloud` entry to the `disks` array in `config/filesystems.php`:

```
'disks' => [
    // ...existing disks...

    'pcloud' => [
        'driver'       => 'pcloud',
        'access_token' => env('PCLOUD_ACCESS_TOKEN'),
        'location_id'  => env('PCLOUD_LOCATION_ID', 1),
        'root'         => env('PCLOUD_ROOT', '/'),
    ],
],
```

### Multiple disks / prefix

[](#multiple-disks--prefix)

If you need more than one pCloud disk (e.g. a primary and a backup), run `pcloud-filesystem:configure` a second time and supply a prefix when prompted:

```
php artisan pcloud-filesystem:configure
# prefix: BACKUP
```

This produces `BACKUP_PCLOUD_ACCESS_TOKEN`, `BACKUP_PCLOUD_LOCATION_ID`, and `BACKUP_PCLOUD_ROOT`, which you then wire up as a second disk in `config/filesystems.php`:

```
'pcloud-backup' => [
    'driver'       => 'pcloud',
    'access_token' => env('BACKUP_PCLOUD_ACCESS_TOKEN'),
    'location_id'  => env('BACKUP_PCLOUD_LOCATION_ID', 1),
    'root'         => env('BACKUP_PCLOUD_ROOT', '/'),
],
```

The `root` option scopes all filesystem operations to that pCloud folder. For example, setting `root` to `/MyApp` means `Storage::disk('pcloud')->put('uploads/file.txt', ...)` will write to `/MyApp/uploads/file.txt` on pCloud. Missing intermediate directories are created automatically.

Usage
-----

[](#usage)

Once configured, use the disk exactly like any other Laravel filesystem disk:

```
use Illuminate\Support\Facades\Storage;

// Write a file
Storage::disk('pcloud')->put('hello.txt', 'Hello, pCloud!');

// Write from a stream
Storage::disk('pcloud')->writeStream('video.mp4', fopen('/path/to/video.mp4', 'rb'));

// Check existence
Storage::disk('pcloud')->exists('hello.txt');       // true
Storage::disk('pcloud')->directoryExists('photos'); // true

// Read a file
$contents = Storage::disk('pcloud')->get('hello.txt');

// Read as a stream
$stream = Storage::disk('pcloud')->readStream('video.mp4');

// List contents (non-recursive)
$files = Storage::disk('pcloud')->files('photos');

// List contents recursively
$all = Storage::disk('pcloud')->allFiles('photos');

// Move / rename
Storage::disk('pcloud')->move('hello.txt', 'archive/hello.txt');

// Copy
Storage::disk('pcloud')->copy('hello.txt', 'backup/hello.txt');

// Delete a file
Storage::disk('pcloud')->delete('hello.txt');

// Delete a directory and its contents
Storage::disk('pcloud')->deleteDirectory('archive');

// Create a directory
Storage::disk('pcloud')->makeDirectory('new-folder');

// File metadata
Storage::disk('pcloud')->size('video.mp4');
Storage::disk('pcloud')->lastModified('video.mp4');
Storage::disk('pcloud')->mimeType('video.mp4');
```

Unsupported features
--------------------

[](#unsupported-features)

**Visibility control** is not supported by pCloud. Calling `setVisibility()` always throws `UnableToSetVisibility`. The `visibility()` method always returns `public`.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security
--------

[](#security)

Please see [SECURITY](.github/SECURITY.md) for how to report security vulnerabilities.

Credits
-------

[](#credits)

- [LEOBSST](https://github.com/leobsst)
- [B.L.A.M. PRODUCTION](https://blam-prod.fr)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance91

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.9% 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 ~0 days

Total

9

Last Release

44d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46266177?v=4)[LEOBSST](/maintainers/leobsst)[@leobsst](https://github.com/leobsst)

---

Top Contributors

[![leobsst](https://avatars.githubusercontent.com/u/46266177?v=4)](https://github.com/leobsst "leobsst (37 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelLEOBSSTBLAM PRODUCTIONpCloudlaravel-pcloud-filesystem

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/leobsst-laravel-pcloud-filesystem/health.svg)

```
[![Health](https://phpackages.com/badges/leobsst-laravel-pcloud-filesystem/health.svg)](https://phpackages.com/packages/leobsst-laravel-pcloud-filesystem)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M41](/packages/spatie-laravel-pdf)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4923.6k5](/packages/ralphjsmit-laravel-glide)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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