What Forge covers — and doesn't
| Layer | Forge provides | You still need |
|---|---|---|
| Server metrics | CPU, RAM, disk charts | Application-layer telemetry |
| Queue workers | Horizon / queue:work daemons | Per-class failure rates, runtime trends |
| Scheduled tasks | Cron wire-up via artisan schedule:run | Invocation history, duration trends, exception capture |
| Deploy health | Deploy log + email on failure | Post-deploy latency regression detection |
| Logs | Access via UI (tail) | Aggregation, search, retention |
| Exceptions | Nothing | Grouped exceptions with alerts |
Install NightOwl on a Forge server
On your local machine
composer require nightowl/agent
php artisan nightowl:install
git pushDeploy via Forge as usual. Then add the agent as a daemon in Forge's dashboard:
- Site → Daemons → New Daemon
- Command:
php /home/forge/yourapp.com/artisan nightowl:agent - User:
forge - Directory:
/home/forge/yourapp.com
Forge's Supervisor restarts the agent on crashes and keeps it running through php artisan queue:restart deploys.
Separate DB server for telemetry
NightOwl writes telemetry to a PostgreSQL database you own. Two sensible setups on Forge:
- Same DB as the app — simplest. Works for small apps. Telemetry writes share capacity with your application queries.
- Dedicated DB server — a separate Forge-managed PostgreSQL instance for telemetry only. Keeps hot-path app DB isolated. $10-40/mo extra depending on size.
Use Forge's existing supervision for workers
Forge's queue worker daemons (Horizon or plain queue:work) run as Supervisor-managed processes. The Nightwatch package attaches to them automatically — no extra configuration needed. Every job attempt fires events the package captures and ships to the NightOwl agent.
Scheduled task monitoring
Forge creates a cron entry to run php artisan schedule:run every minute. The Nightwatch package records each scheduled task invocation automatically — NightOwl surfaces them in the scheduled-tasks dashboard with full invocation history (status, duration, exception capture, skipped runs from withoutOverlapping/onOneServer constraints).
Deploy scripts for Forge
Standard Forge deploy script — no NightOwl-specific changes needed. The agent runs as its own Forge daemon (Supervisor-managed); after a deploy, click Restart daemon in Forge's UI to pick up new agent config, or have your deploy script SSH-trigger the restart.
cd /home/forge/yourapp.com
git pull origin $FORGE_SITE_BRANCH
composer install --no-interaction --prefer-dist --optimize-autoloader
( flock -w 10 9 || exit 1
echo 'Restarting PHP-FPM'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock
if [ -f artisan ]; then
$FORGE_PHP artisan migrate --force
$FORGE_PHP artisan config:cache
$FORGE_PHP artisan route:cache
$FORGE_PHP artisan view:cache
$FORGE_PHP artisan queue:restart
fiTHE EASY WAY
NightOwl runs cleanly as a Forge daemon
Composer install, add the daemon in Forge's UI, point at your PostgreSQL. Forge's Supervisor handles supervision; NightOwl records everything the Nightwatch package emits. From $5/month flat, data in your database.
composer require nightowl/agent
php artisan nightowl:install