PHPackages                             innoge/laravel-rclone - 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. innoge/laravel-rclone

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

innoge/laravel-rclone
=====================

A sleek PHP wrapper around rclone with Laravel-style fluent API syntax

v1.1.0(2mo ago)174.1k↑36.4%MITPHPPHP ^8.2CI passing

Since Sep 24Pushed 2mo agoCompare

[ Source](https://github.com/InnoGE/laravel-rclone)[ Packagist](https://packagist.org/packages/innoge/laravel-rclone)[ Docs](https://github.com/innoge/laravel-rclone)[ GitHub Sponsors](https://github.com/InnoGE)[ RSS](/packages/innoge-laravel-rclone/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (22)Versions (5)Used By (0)

Laravel Rclone
==============

[](#laravel-rclone)

**A sleek Laravel package that wraps rclone with an elegant, fluent API syntax.**

[![PHP Version](https://camo.githubusercontent.com/c9f64f714c636ba27a3bba6dfd52f98426832db1262747efa54b212d16943651/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e322d626c7565)](https://packagist.org/packages/innoge/laravel-rclone)[![Laravel Version](https://camo.githubusercontent.com/fc187890776703f34e6ab6ae79ddd7938d901c76a738a34055fdd9ba20927936/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31302e7825374331312e7825374331332e782d6f72616e6765)](https://packagist.org/packages/innoge/laravel-rclone)[![Test Coverage](https://camo.githubusercontent.com/32855e94577df9d0a30995653b17d33a5fbfdf644518f96ea0374313397d19b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e)](https://packagist.org/packages/innoge/laravel-rclone)[![Total Downloads](https://camo.githubusercontent.com/2c24c4c73feba8d86dc8b9bb4492f2a79791f930612c867e2b4479d26a98bf4f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e6e6f67652f6c61726176656c2d72636c6f6e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innoge/laravel-rclone)

✨ Features
----------

[](#-features)

- 🎯 **Fluent API** - Laravel-style method chaining
- 🚀 **Driver Agnostic** - Local, S3, SFTP, FTP support
- ⚡ **Zero Configuration** - Uses Laravel filesystem config
- 🔧 **Highly Configurable** - Override any rclone option
- 📊 **Progress Tracking** - Real-time callbacks &amp; stats
- 🧪 **100% Test Coverage** - Battle-tested with Pest
- 🏗️ **Laravel Native** - Service Provider, Facade, Auto-Discovery

🚀 Quick Start
-------------

[](#-quick-start)

**Install via Composer:**

```
composer require innoge/laravel-rclone
```

**Basic usage:**

```
use InnoGE\LaravelRclone\Facades\Rclone;

// Simple sync
Rclone::source('s3', 'documents')
    ->target('backup', 'archive')
    ->sync();

// With progress & options
Rclone::source('s3', 'media/photos')
    ->target('local', 'storage/backups')
    ->withProgress()
    ->transfers(16)
    ->checkers(8)
    ->getOutputUsing(fn($type, $output) => Log::info("Rclone: {$output}"))
    ->sync();
```

📋 Requirements
--------------

[](#-requirements)

- **PHP 8.2+**
- **Laravel 10.x, 11.x, or 12.x**
- **rclone binary** - [Installation Guide](https://rclone.org/install/)

⚙️ Configuration
----------------

[](#️-configuration)

The package automatically uses your existing `config/filesystems.php` configuration:

```
// config/filesystems.php
'disks' => [
    's3' => [
        'driver' => 's3',
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
        'bucket' => env('AWS_BUCKET'),
    ],
    'sftp' => [
        'driver' => 'sftp',
        'host' => env('SFTP_HOST'),
        'username' => env('SFTP_USERNAME'),
        'password' => env('SFTP_PASSWORD'),
        'port' => env('SFTP_PORT', 22),
    ],
]
```

**Optional: Publish config for advanced settings:**

```
php artisan vendor:publish --provider="InnoGE\LaravelRclone\RcloneServiceProvider" --tag="rclone-config"
```

🎯 API Reference
---------------

[](#-api-reference)

### Core Operations

[](#core-operations)

```
// Sync (make target identical to source)
$result = Rclone::source('s3', 'data')->target('backup')->sync();

// Copy (don't delete from target)
$result = Rclone::source('s3', 'data')->target('backup')->copy();

// Move (delete from source after transfer)
$result = Rclone::source('s3', 'data')->target('backup')->move();
```

### Performance Tuning

[](#performance-tuning)

```
Rclone::source('s3', 'large-dataset')
    ->target('backup', 'archive')
    ->transfers(32)          // Parallel transfers
    ->checkers(16)           // File checkers
    ->retries(5)             // Retry attempts
    ->statInterval(10)       // Stats interval (seconds)
    ->option('bandwidth', '50M')  // Custom rclone option
    ->sync();
```

### Progress Monitoring

[](#progress-monitoring)

```
$result = Rclone::source('s3', 'files')
    ->target('local', 'backup')
    ->withProgress()
    ->getOutputUsing(function ($type, $output) {
        if ($type === 'out') {
            echo "Progress: {$output}";
        } else {
            Log::error("Rclone Error: {$output}");
        }
    })
    ->sync();

// Check results
if ($result->isSuccessful()) {
    $stats = $result->getStats();
    echo "Transferred: {$stats['transferred_files']} files\n";
    echo "Data: {$stats['transferred_bytes']} bytes\n";
} else {
    echo "Failed: {$result->getErrorOutput()}\n";
}
```

🔌 Supported Storage Providers
-----------------------------

[](#-supported-storage-providers)

ProviderDriverRequired Config**Local Filesystem**`local``root`**Amazon S3**`s3``key`, `secret`, `region`, `bucket`**SFTP**`sftp``host`, `username`, `password`/`key_file`**FTP**`ftp``host`, `username`, `password`### S3 Configuration

[](#s3-configuration)

```
's3' => [
    'driver' => 's3',
    'key' => 'AKIAIOSFODNN7EXAMPLE',
    'secret' => 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
    'region' => 'us-west-2',
    'bucket' => 'my-bucket',
    'endpoint' => 'https://s3.amazonaws.com', // Optional
    'use_path_style_endpoint' => false,        // Optional
]
```

### SFTP Authentication

[](#sftp-authentication)

```
'sftp' => [
    'driver' => 'sftp',
    'host' => 'server.example.com',
    'username' => 'user',
    // Password auth
    'password' => 'secret',
    // OR Key file auth
    'key_file' => '/path/to/private/key',
    // OR Inline key auth
    'private_key' => '-----BEGIN OPENSSH PRIVATE KEY-----...',
    'port' => 22,
]
```

🏗️ Laravel Integration
----------------------

[](#️-laravel-integration)

### Dependency Injection

[](#dependency-injection)

```
use InnoGE\LaravelRclone\Contracts\RcloneInterface;

class BackupService
{
    public function __construct(
        private RcloneInterface $rclone
    ) {}

    public function dailyBackup(): bool
    {
        $result = $this->rclone
            ->source('local', 'app/data')
            ->target('s3', 'backups/daily')
            ->withProgress()
            ->sync();

        return $result->isSuccessful();
    }
}
```

### Artisan Command Example

[](#artisan-command-example)

```
use InnoGE\LaravelRclone\Facades\Rclone;

class BackupCommand extends Command
{
    public function handle(): int
    {
        $this->info('Starting backup...');

        $result = Rclone::source('local', 'storage/app')
            ->target('s3', 'backups/' . now()->format('Y-m-d'))
            ->withProgress()
            ->getOutputUsing(fn($type, $output) => $this->line($output))
            ->sync();

        return $result->isSuccessful() ? 0 : 1;
    }
}
```

🛠️ Advanced Configuration
-------------------------

[](#️-advanced-configuration)

**Environment variables:**

```
RCLONE_BINARY_PATH=/usr/local/bin/rclone
RCLONE_TIMEOUT=7200
```

**Custom config file (`config/rclone.php`):**

```
return [
    'binary_path' => env('RCLONE_BINARY_PATH', 'rclone'),
    'timeout' => env('RCLONE_TIMEOUT', 3600),
    'base_options' => [
        '--delete-after',
        '--fast-list',
        '--checksum',
    ],
    'defaults' => [
        'transfers' => 4,
        'checkers' => 8,
        'retries' => 3,
        'progress' => false,
    ],
];
```

🧪 Testing
---------

[](#-testing)

```
# Run tests
composer test

# With coverage
composer test-coverage

# Static analysis
composer analyse

# Format code
composer format
```

🤝 Contributing
--------------

[](#-contributing)

Contributions welcome! Please submit issues and pull requests on [GitHub](https://github.com/innoge/laravel-rclone).

💝 Built With Love
-----------------

[](#-built-with-love)

This package was crafted with passion by amazing developers:

- [Daniel Seuffer](https://github.com/authanram) - Creator &amp; Maintainer
- [Tim Geisendoerfer](https://github.com/geisi) - Inspiring Leader, Core Contributor
- [All Contributors](../../contributors) - Community Heroes ❤️

📄 License
---------

[](#-license)

MIT License. See [LICENSE](LICENSE.md) for details.

---

⚡ **Powered by [rclone](https://rclone.org/)** - The Swiss Army knife of cloud storage

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance85

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.7% 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 ~78 days

Total

3

Last Release

80d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/01edc74b3b6f2ecfe6106f68787500e5c46c51acc7fbe7aa04bb378c9190c79b?d=identicon)[geisi](/maintainers/geisi)

---

Top Contributors

[![authanram](https://avatars.githubusercontent.com/u/1874088?v=4)](https://github.com/authanram "authanram (23 commits)")[![geisi](https://avatars.githubusercontent.com/u/10728579?v=4)](https://github.com/geisi "geisi (7 commits)")

---

Tags

ftpfilesystems3cloudsftpbackupstoragesyncrclonelaravel-style

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/innoge-laravel-rclone/health.svg)

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

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[gliterd/backblaze-b2

PHP SDK for working with backblaze B2 cloud storage.

84263.3k8](/packages/gliterd-backblaze-b2)[cwhite92/b2-sdk-php

A SDK for working with B2 cloud storage.

74146.6k2](/packages/cwhite92-b2-sdk-php)[obregonco/backblaze-b2

An SDK for working with B2 cloud storage.

2732.9k](/packages/obregonco-backblaze-b2)

PHPackages © 2026

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