PHPackages                             nathanphelps/watchtower - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. nathanphelps/watchtower

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

nathanphelps/watchtower
=======================

Cross-platform Laravel queue monitoring and worker management

v1.1.3(4mo ago)0264MITPHPPHP ^8.2

Since Feb 5Pushed 4mo agoCompare

[ Source](https://github.com/nathanphelps/watchtower)[ Packagist](https://packagist.org/packages/nathanphelps/watchtower)[ GitHub Sponsors](https://github.com/nathanphelps)[ RSS](/packages/nathanphelps-watchtower/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (9)Versions (10)Used By (0)

Watchtower
==========

[](#watchtower)

[![Latest Version on Packagist](https://camo.githubusercontent.com/791167dbe606f54c74b7a2d631f3b34e5ab95467e55059e180eee21b57f0a541/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e617468616e7068656c70732f7761746368746f7765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nathanphelps/watchtower)[![PHP Version](https://camo.githubusercontent.com/4953209d5fc8f3bf7fd1da3cef8a19b8d9a375b2f22920c50d041260c3864269/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e617468616e7068656c70732f7761746368746f7765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nathanphelps/watchtower)[![License](https://camo.githubusercontent.com/c5d3415585a07446471f8593ced9d296766bf2d4904ee037227c53d1ab4551b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e617468616e7068656c70732f7761746368746f7765722e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

> Cross-platform Laravel queue monitoring and worker management dashboard

Watchtower provides queue monitoring and worker management capabilities similar to Laravel Horizon, but with full cross-platform support including Windows. Unlike Horizon, which relies on PCNTL signals (Unix-only), Watchtower uses a polling-based approach for worker control that works on Windows, Linux, and macOS.

Features
--------

[](#features)

- 📊 **Queue Monitoring Dashboard** - Real-time job tracking, status monitoring, and metrics
- ⚙️ **Worker Management** - Start, stop, pause, resume workers from the web UI
- 🖥️ **Cross-Platform** - Works on Windows, Linux, and macOS
- 📋 **Job Tracking** - Job status, payload, exceptions, retries, worker info
- 🎨 **Modern UI** - Alpine.js dark-themed dashboard (no build step required)
- 🗑️ **Automatic Cleanup** - Time-based pruning of old job records

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

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12
- Redis (for worker control commands)

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

[](#installation)

```
composer require nathanphelps/watchtower
```

Publish the configuration and assets:

```
php artisan vendor:publish --tag=watchtower-config
php artisan vendor:publish --tag=watchtower-migrations
php artisan migrate
```

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

[](#configuration)

The package configuration is published to `config/watchtower.php`:

```
return [
    // Dashboard URL path
    'path' => env('WATCHTOWER_PATH', 'watchtower'),

    // Route middleware
    'middleware' => ['web'],

    // Authorization gate
    'gate' => env('WATCHTOWER_GATE', 'viewWatchtower'),

    // Job retention (days)
    'retention' => [
        'completed' => 7,
        'failed' => 30,
    ],

    // Supervisor configuration
    'supervisors' => [
        'default' => [
            'connection' => 'redis',
            'queue' => '*',           // Auto-discover all queues!
            // Or specify explicit queues:
            // 'queue' => ['default', 'emails', 'notifications'],
            'min_processes' => 1,
            'max_processes' => 10,
            'tries' => 3,
            'timeout' => 60,
        ],
    ],
];
```

Usage
-----

[](#usage)

### Starting the Supervisor

[](#starting-the-supervisor)

Run the supervisor to automatically manage your queue workers:

```
php artisan watchtower:supervisor
```

The supervisor will:

- **Auto-discover all queues** in your application (Redis keys, job records)
- Maintain the minimum number of workers
- Restart failed workers automatically
- Monitor worker health via heartbeats

> **Tip:** Set `'queue' => '*'` in your config (default) to automatically detect and process all queues. Or specify explicit queues: `'queue' => ['default', 'emails', 'high']`

### Manual Worker Control

[](#manual-worker-control)

Start a single worker manually:

```
php artisan watchtower:worker default
```

### Zero-Downtime Deployments

[](#zero-downtime-deployments)

Gracefully restart all workers after deploying new code:

```
php artisan watchtower:restart
```

Options:

- `--queue=emails` - Only restart workers on a specific queue
- `--force` - Force immediate restart (don't wait for current job)

Workers will finish processing their current job, then restart with fresh code.

### Terminating All Processes

[](#terminating-all-processes)

Stop the supervisor and all workers (similar to `horizon:terminate`):

```
php artisan watchtower:terminate
```

Options:

- `--wait` - Wait for all workers to finish before returning

### Accessing the Dashboard

[](#accessing-the-dashboard)

Visit `/watchtower` in your browser. By default, the dashboard is only accessible in local environments. Configure the gate in your `AuthServiceProvider` for production:

```
Gate::define('viewWatchtower', function ($user) {
    return in_array($user->email, [
        'admin@example.com',
    ]);
});
```

### Pruning Old Jobs

[](#pruning-old-jobs)

Watchtower automatically prunes old job records. You can also run the prune command manually:

```
php artisan watchtower:prune
```

How It Works
------------

[](#how-it-works)

### Polling-Based Control

[](#polling-based-control)

Unlike Horizon which uses PCNTL signals (Unix-only), Watchtower uses Redis for worker control:

1. Dashboard sends command to Redis: `SET watchtower:worker:{id}:command "stop"`
2. Worker checks Redis every 3 seconds
3. Worker reads and executes the command
4. Worker confirms status in database

This approach provides:

- ✅ Cross-platform compatibility
- ✅ No PCNTL dependency
- ✅ Simple debugging
- ⚠️ 1-3 second response delay (acceptable for worker management)

### Dashboard Updates

[](#dashboard-updates)

The dashboard polls for updates every 3 seconds (configurable). This provides near-real-time visibility into:

- Job counts and status
- Worker health and activity
- Throughput metrics

Artisan Commands
----------------

[](#artisan-commands)

CommandDescription`watchtower:supervisor`Start the supervisor to manage workers`watchtower:worker {queue}`Start a single worker process`watchtower:prune`Prune old job recordsLicense
-------

[](#license)

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

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

[](#contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover a security vulnerability, please send an email instead of using the issue tracker. See [SECURITY.md](SECURITY.md) for details.

Credits
-------

[](#credits)

- [Nathan Phelps](https://github.com/nathanphelps)
- [Claude Code](https://claude.ai) - AI pair programming assistant
- [All Contributors](../../contributors)

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance75

Regular maintenance activity

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Every ~0 days

Total

9

Last Release

138d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26461946?v=4)[Nathan Phelps](/maintainers/nathanphelps)[@nathanphelps](https://github.com/nathanphelps)

---

Top Contributors

[![nathanphelps](https://avatars.githubusercontent.com/u/26461946?v=4)](https://github.com/nathanphelps "nathanphelps (20 commits)")

---

Tags

laravelmonitoringlaravel 12queuewindowscross-platformhorizonworkers

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/nathanphelps-watchtower/health.svg)

```
[![Health](https://phpackages.com/badges/nathanphelps-watchtower/health.svg)](https://phpackages.com/packages/nathanphelps-watchtower)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M279](/packages/laravel-horizon)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M152](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M122](/packages/laravel-pulse)[illuminate/queue

The Illuminate Queue package.

20432.2M1.5k](/packages/illuminate-queue)[laravel/ai

The official AI SDK for Laravel.

9782.1M161](/packages/laravel-ai)

PHPackages © 2026

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