Download the PHP package nathanphelps/watchtower without Composer
On this page you can find all versions of the php package nathanphelps/watchtower. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nathanphelps/watchtower
More information about nathanphelps/watchtower
Files in nathanphelps/watchtower
Package watchtower
Short Description Cross-platform Laravel queue monitoring and worker management
License MIT
Informations about the package watchtower
Watchtower
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
- 📊 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
- PHP 8.2+
- Laravel 11 or 12
- Redis (for worker control commands)
Installation
Publish the configuration and assets:
Configuration
The package configuration is published to config/watchtower.php:
Usage
Starting the Supervisor
Run the supervisor to automatically manage your queue workers:
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
Start a single worker manually:
Zero-Downtime Deployments
Gracefully restart all workers after deploying new code:
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
Stop the supervisor and all workers (similar to horizon:terminate):
Options:
--wait- Wait for all workers to finish before returning
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:
Pruning Old Jobs
Watchtower automatically prunes old job records. You can also run the prune command manually:
How It Works
Polling-Based Control
Unlike Horizon which uses PCNTL signals (Unix-only), Watchtower uses Redis for worker control:
- Dashboard sends command to Redis:
SET watchtower:worker:{id}:command "stop" - Worker checks Redis every 3 seconds
- Worker reads and executes the command
- 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
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
| Command | Description |
|---|---|
watchtower:supervisor |
Start the supervisor to manage workers |
watchtower:worker {queue} |
Start a single worker process |
watchtower:prune |
Prune old job records |
License
MIT License. See LICENSE.md for details.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
Security
If you discover a security vulnerability, please send an email instead of using the issue tracker. See SECURITY.md for details.
Credits
- Nathan Phelps
- Claude Code - AI pair programming assistant
- All Contributors
All versions of watchtower with dependencies
illuminate/support Version ^11.0|^12.0
illuminate/queue Version ^11.0|^12.0
illuminate/redis Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0
illuminate/contracts Version ^11.0|^12.0
symfony/process Version ^6.0|^7.0