PHPackages                             vikilaboy/laravel-distributed-maintenance-mode - 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. vikilaboy/laravel-distributed-maintenance-mode

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vikilaboy/laravel-distributed-maintenance-mode
==============================================

Offers Laravel applications the ability to store the maintenance mode information on Redis or S3. Forked from despark/laravel-distributed-maintenance-mode

011.4k↑63.3%PHP

Since Jun 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/vikilaboy/laravel-distributed-maintenance-mode)[ Packagist](https://packagist.org/packages/vikilaboy/laravel-distributed-maintenance-mode)[ RSS](/packages/vikilaboy-laravel-distributed-maintenance-mode/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/fe3ec25597ecfbfa2499ae862b0d4d6abfb0ff37f946f28ba3f0d74874913a5b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465737061726b2f6c61726176656c2d64697374726962757465642d6d61696e74656e616e63652d6d6f6465)](https://packagist.org/packages/despark/laravel-distributed-maintenance-mode)[![Latest Stable Version](https://camo.githubusercontent.com/fca95cf18e8bb731217033f7108422e111bd1c0aa237a009a86edb017a0fb6e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465737061726b2f6c61726176656c2d64697374726962757465642d6d61696e74656e616e63652d6d6f6465)](https://packagist.org/packages/despark/laravel-distributed-maintenance-mode)[![License](https://camo.githubusercontent.com/bd6f9d1e17e85d7cce1d4089184ba556ed7e47d8bead2aba19cee99c49b2f63c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6465737061726b2f6c61726176656c2d64697374726962757465642d6d61696e74656e616e63652d6d6f6465)](https://packagist.org/packages/despark/laravel-distributed-maintenance-mode)

About Laravel Maintenance Mode
------------------------------

[](#about-laravel-maintenance-mode)

Laravel's maintenance mode allows a developer to take a website offline(`php artisan down`) for maintenance or updates while still allowing selected users, such as administrators, to access the site. When maintenance mode is enabled, all non-authorized users will be shown a customizable maintenance page instead of the website's content. Once maintenance is complete, the developer can disable maintenance mode(`php artisan up`) and the website will return to normal operation. This feature can be useful for preventing users from accessing a website while updates or changes are being made, and also allows a developer to perform maintenance on a live website without disrupting the user experience.

What It Does
------------

[](#what-it-does)

The way maintenance mode works out of the box though is quite limited for most major application setups. The default configuration is to store a file on the disk which assumes that you have a single server serving your application or that you are willing to SSH into all of your servers to run the command. The other default option is to store the maintenance information on your default cache configuration. This again has a major limitation, because most applications clear their default cache once a server is deployed, which will wipe the maintenance mode.

Here comes Laravel Distributed Maintenance Mode, which gives you the ability to choose from two drivers Redis or S3. After that you have to select either the preferred Redis database or S3 bucket to store the maintenance info on.

By doing that, you just need to run the default `php artisan down` command on one of your servers. The maintenance mode will be picked up by all of them and also being persisted on any of the new ones that you deploy until you lift it up by `php artisan up`.

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

[](#installation)

1. Install with [composer](https://getcomposer.org/doc/00-intro.md)

```
composer require despark/laravel-distributed-maintenance-mode

```

2. Publish the configuration file

```
php artisan vendor:publish --tag="laravel-distributed-maintenance-mode.config"

```

Usage Instructions
------------------

[](#usage-instructions)

1. Open the `config/app.php` file and change the maintenance mode driver to `custom`

```
'maintenance' => [
    'driver' => 'custom',
],
```

2. Open the `config/laravel-distributed-maintenance-mode.php` file and change the maintenance mode driver to your preferred one(`redis` or `s3`).
3. If you have selected `redis` as your driver, set your preferred Redis database in which you want to store the information. It must already be set up in `config/database.php` under the `redis` configuration

```
'redis' => [
    'client' => env('REDIS_CLIENT', 'predis'),
    'options' => [
        'cluster' => env('REDIS_CLUSTER', 'predis'),
        'prefix' => env('REDIS_PREFIX', \Illuminate\Support\Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
    ],
    'default' => [
        'url' => env('REDIS_URL'),
        'host' => env('REDIS_HOST', '127.0.0.1'),
        'username' => env('REDIS_USERNAME'),
        'password' => env('REDIS_PASSWORD'),
        'port' => env('REDIS_PORT', '6379'),
        'database' => env('REDIS_DB', '0'),
    ],
    'cache' => [
        'url' => env('REDIS_URL'),
        'host' => env('REDIS_HOST', '127.0.0.1'),
        'username' => env('REDIS_USERNAME'),
        'password' => env('REDIS_PASSWORD'),
        'port' => env('REDIS_PORT', '6379'),
        'database' => env('REDIS_CACHE_DB', '1'),
    ],
    'maintenance_mode' => [
        'url' => env('REDIS_URL'),
        'host' => env('REDIS_HOST', '127.0.0.1'),
        'username' => env('REDIS_USERNAME'),
        'password' => env('REDIS_PASSWORD'),
        'port' => env('REDIS_PORT', '6379'),
        'database' => env('REDIS_MAINTENANCE_MODE_DB', '2'),
    ],
],
```

4. If you have selected `s3` as your driver, set your preferred S3 disk in which you want to store the information. It must already be set up in `config/filesystems.php` under the `disks` configuration

```
 'disks' => [
    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
        'throw' => false,
    ],
    'public' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
        'throw' => false,
    ],
    's3' => [
        'driver' => 's3',
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => env('AWS_DEFAULT_REGION'),
        'bucket' => env('AWS_BUCKET'),
        'url' => env('AWS_URL'),
        'endpoint' => env('AWS_ENDPOINT'),
        'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
        'throw' => false,
    ],
    'maintenance_mode_s3' => [
        'driver' => 's3',
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => env('AWS_DEFAULT_REGION'),
        'bucket' => env('AWS_BUCKET_MAINTENANCE_MODE'),
        'url' => env('AWS_URL_MAINTENANCE_MODE'),
        'endpoint' => env('AWS_ENDPOINT_MAINTENANCE_MODE'),
        'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
        'throw' => false,
    ],
],
```

5. You are now ready. You can use the default `up` and `down` artisan commands to turn off/on the maintenance mode of your application from only one server

License
-------

[](#license)

The Laravel Distributed Maintenance Mode is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2757887?v=4)[El Niño](/maintainers/vikilaboy)[@vikilaboy](https://github.com/vikilaboy)

---

Top Contributors

[![vikilaboy](https://avatars.githubusercontent.com/u/2757887?v=4)](https://github.com/vikilaboy "vikilaboy (6 commits)")

### Embed Badge

![Health badge](/badges/vikilaboy-laravel-distributed-maintenance-mode/health.svg)

```
[![Health](https://phpackages.com/badges/vikilaboy-laravel-distributed-maintenance-mode/health.svg)](https://phpackages.com/packages/vikilaboy-laravel-distributed-maintenance-mode)
```

PHPackages © 2026

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