[ GUIDE ]

Monitoring a Laravel app on Forge

What Forge gives you, what it doesn't, and how to layer application-level APM on top without fighting the platform.

QUICK ANSWER

How do I monitor a Laravel app deployed on Forge?

Forge covers server-level basics — CPU, RAM, disk, SSL, queue daemon supervision — but not application telemetry. Layer an APM on top: install the Nightwatch package and an agent (NightOwl, Nightwatch Cloud, Sentry, Inspector). The agent runs as a Forge daemon like any other worker. Forge's Supervisor restarts it on crashes and keeps it alive through deploys.

Updated · 2026-04-13

What Forge covers — and doesn't

Layer Forge provides You still need
Server metricsCPU, RAM, disk chartsApplication-layer telemetry
Queue workersHorizon / queue:work daemonsPer-class failure rates, runtime trends
Scheduled tasksCron wire-up via artisan schedule:runInvocation history, duration trends, exception capture
Deploy healthDeploy log + email on failurePost-deploy latency regression detection
LogsAccess via UI (tail)Aggregation, search, retention
ExceptionsNothingGrouped exceptions with alerts

Install NightOwl on a Forge server

On your local machine

bash
composer require nightowl/agent
php artisan nightowl:install
git push

Deploy 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:

  1. Same DB as the app — simplest. Works for small apps. Telemetry writes share capacity with your application queries.
  2. 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.

bash
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
fi

THE 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.

bash
composer require nightowl/agent
php artisan nightowl:install

Frequently asked questions

What does Laravel Forge provide for monitoring?

Forge gives you server-level basics: CPU/RAM/disk charts, SSL certificate expiry, queue worker supervision via daemons, and access to server.log and laravel.log through its UI. It doesn't provide application-level APM — no request traces, no query monitoring, no exception grouping. You layer a separate APM on top for that.

How do I add application monitoring to a Forge-deployed Laravel app?

Install the Nightwatch package + an agent (NightOwl for BYOD, Nightwatch Cloud for official hosted, or Sentry/Inspector for other options) like you would on any Laravel app. Forge doesn't constrain your APM choice. For NightOwl specifically: composer require nightowl/agent, run the install command, point at your PostgreSQL, Forge's daemons supervise the agent process like any other worker.

Can I run NightOwl's agent as a Forge daemon?

Yes. Add the agent command (php artisan nightowl:agent) as a Forge daemon on each server. Forge uses Supervisor under the hood, so the agent process gets restarted on crashes and stays running through deploys. Memory limit: 256-512MB per agent process is sufficient for Laravel-typical traffic.

Does Forge's queue worker daemon work with NightOwl queue monitoring?

Yes. Forge's Horizon daemon (or standard queue:work daemon) runs like any worker — the Nightwatch package picks up JobProcessing / JobFailed events automatically. Every job attempt is recorded with class, duration, status, and exception regardless of which queue driver or daemon mechanism you use.

How do I monitor Forge's own health?

Forge surfaces server metrics in its dashboard and emails when deploys fail. For external uptime monitoring use a tool like UptimeRobot or Better Uptime pointing at your domain. Forge doesn't fail silently but it also doesn't alert you to slow requests or application errors — that's the APM layer's job.

What's the difference between Forge's server.log and Laravel's laravel.log?

server.log is the Forge-managed server event log (deploys, daemon restarts, SSL renewals). laravel.log is your application's log output. Check server.log for 'did the deploy succeed?'; check laravel.log (or your aggregator) for 'what went wrong in the app?'. Neither replaces a real APM.

Should I put my database on the same server as the app?

For small apps, fine. For anything production-grade, no — run PostgreSQL on its own server (or a managed service like AWS RDS / Laravel Cloud Database). Benefits: DB doesn't starve the app for memory; you can resize independently; you can put your NightOwl BYOD database on a separate server too, keeping telemetry storage isolated from the app's hot path.

PRICING

Flat pricing. No event caps. No per-seat fees.

14-day free trial, no credit card. Your PostgreSQL, your data.

HOBBY

$5 /month

1 app · 14 days lookback · all Laravel events

TEAM

$15 /month

Up to 3 connected apps · unlimited environments · all Laravel events

AGENCY

$69 /month

Unlimited apps · unlimited agent instances · same flat rate at any traffic

Related