Laravel Nightwatch is the Laravel team’s hosted monitoring service for production Laravel apps. Install one Composer package, run an agent, and it tracks requests, queries, jobs, exceptions, logs, mail, cache, and scheduled tasks in one connected timeline. It starts free with 300k events per month.

Priya runs a booking app for yoga studios. On a Friday night, checkout starts timing out for some users but not others. Her logs show nothing useful.

Pulse shows that the /checkout route is slow, but not why. She spends three hours adding Log::info() calls and redeploying. The cause—a payment API that started taking eight seconds to respond—would have been one click away with request-level tracing.

That’s the gap Laravel Nightwatch fills. You already know Telescope and Pulse. This guide covers what Nightwatch adds, how to install it, how to control costs with sampling, and when you’re better off sticking with the free tools.

Key Takeaways

  • Laravel Nightwatch is a fully managed monitoring tool built by the Laravel team. It requires PHP 8.2+ and Laravel 10+, and there’s no self-hosted option.

  • Setup takes three steps: Run composer require laravel/nightwatch, add NIGHTWATCH_TOKEN, and keep php artisan nightwatch:agent running under Supervisor or Forge.

  • Pricing is event-based: The Free plan covers 300k events per month with 14 days of history. Pro costs $20/month for 7.5 million events.

  • Sample from day one. Nightwatch records 100% of requests by default. The documentation recommends a request sample rate of 0.1 or lower for new apps.

  • It complements Telescope and Pulse. Telescope is for local debugging, Pulse is a free, self-hosted dashboard, and Nightwatch is for production alerting, tracing, and history.

The developers in this article’s examples are illustrative composites based on common production monitoring scenarios.

What Is Laravel Nightwatch?

Laravel Nightwatch is a first-party application performance monitoring (APM) and error-tracking service for Laravel. The Laravel team announced its general availability in June 2025. Unlike generic APM tools, this Laravel monitoring service hooks directly into the framework’s internals, so it understands queues, the scheduler, Eloquent, and notifications without extra configuration.

According to the official Nightwatch page, it records nine event types:

  • Requests and outgoing HTTP requests

  • Queries (Eloquent, Query Builder, and raw SQL)

  • Jobs, commands, and scheduled tasks

  • Mail, notifications, and cache operations

Exceptions and logs are captured too, and every event is linked to its parent. Open a slow request and you can see each query, cache hit, job dispatch, and API call it triggered, with timings on a single timeline.

How Nightwatch Works

There are two parts:

  1. The laravel/nightwatch package runs inside your app. It observes events, then applies your sampling, filtering, and redaction rules before anything leaves your server.

  2. The Nightwatch agent is a long-running Artisan process. It buffers events locally (on port 2407 by default) and sends them in batches to Laravel’s hosted pipeline, so your requests don’t wait on a network call to Nightwatch.

Data is stored in US or EU data centers. Because redaction happens in the open-source package on your server, you control what personal data gets sent.

Laravel Nightwatch vs. Pulse vs. Telescope

Laravel has three first-party observability tools. Each answers a different question:

Feature

Telescope

Pulse

Nightwatch

Best for

Local debugging

Production trends

Production monitoring and alerts

Hosting

Your app’s database

Your app’s database

Fully managed by Laravel

Cost

Free, open source

Free, open source

Free tier, then from $20/month

Request tracing

Yes, every entry

No, aggregates only

Yes, full timelines

Alerts

No

No

Yes, plus Slack, Linear, and webhooks

History

Until you prune

Rolling window

14 to 90 days by plan

Use Laravel Telescope while you build. Use Laravel Pulse when you want a free, self-hosted dashboard of slow routes, queries, and busy users. Choose Nightwatch when you need to know which specific request failed, for which user, and why—and want an alert when it happens.

The Laravel team has said Telescope and Pulse will continue to be supported, so this isn’t a forced migration. Many teams run Telescope locally and Nightwatch in production.

Shipping a new Laravel app? StackMivo generates a production-ready Laravel codebase, including models, migrations, authentication, and tests, from a plain-English description. Add Nightwatch on day one to monitor real traffic from your first deployment.

How to Install Laravel Nightwatch

Before you start, check the requirements: PHP 8.2 or higher and Laravel 10.0 or higher. Some features require newer releases. For example, cache failure tracking needs Laravel 11.11+, so the latest Laravel 12 or 13 gives you access to more data.

Step 1: Install the Package

composer require laravel/nightwatch

Step 2: Add Your Environment Token

Sign up for Nightwatch, create an application, and copy the token from the Environments tab. Add it to your production .env file:

NIGHTWATCH_TOKEN=your-environment-token

Treat this token like any other secret. Store it in your hosting provider’s environment settings or secrets manager, never in Git.

Step 3: Run the Agent

php artisan nightwatch:agent

The agent must keep running, so use a process monitor. Here’s a Supervisor configuration for a typical VPS:

; /etc/supervisor/conf.d/nightwatch.conf
[program:nightwatch]
command=php /var/www/your-app/artisan nightwatch:agent
directory=/var/www/your-app
user=www-data
autostart=true
autorestart=true
stopwaitsecs=15
redirect_stderr=true
stdout_logfile=/var/www/your-app/storage/logs/nightwatch-agent.log

Check that the agent is healthy with php artisan nightwatch:status. It exits with a non-zero code on failure, so you can integrate it into health checks.

Hosting notes:

  • Laravel Forge: Open the site’s Overview tab, click Connect Nightwatch, paste your token, and click Monitor with Nightwatch.

  • Laravel Cloud: Follow the setup guide in the Nightwatch documentation.

  • Docker: Run the agent as its own process or container alongside your web and queue roles. Our Laravel Docker guide explains the one-image, multiple-roles pattern.

  • Laravel Vapor and other serverless setups: You’ll need a separate, always-on server for the agent.

Step 4: Send Logs to Nightwatch

Nightwatch only captures logs when it’s included in your logging stack. The recommended configuration keeps your existing file logs too:

LOG_CHANNEL=stack
LOG_STACK=single,nightwatch
NIGHTWATCH_LOG_LEVEL=warning

Logs are captured only for sampled requests and jobs. If you need every log line retained, don’t make Nightwatch your only log channel.

Step 5: Disable It Locally and in Tests

In your local .env file:

# Local .env
NIGHTWATCH_ENABLED=false

In phpunit.xml:

<!-- phpunit.xml -->
<env name="NIGHTWATCH_ENABLED" value="false"/>

Control Laravel Nightwatch Costs With Sampling

Every request, query, job, cache call, and log line counts as an event. A single page load that runs 15 queries and three cache lookups can generate 20 or more events. That adds up quickly.

Here’s the current Nightwatch pricing:

Plan

Price

Events included

Lookback

Extra events

Free

$0/month

300k

14 days

$0.50 per 100k

Pro

$20/month

7.5 million

30 days

$0.35 per 100k

Team

$60/month

30 million

60 days

$0.35 per 100k

Business

$300/month

180 million

90 days

$0.20 per 100k

All plans include unlimited applications, environments, and seats. Free projects pause after 30 days of app inactivity. You can also set a spending cap, after which Nightwatch stops ingesting new events.

Set a Global Sample Rate

By default, Nightwatch samples 100% of requests, commands, and scheduled tasks. The filtering documentation recommends starting new apps at 10% of requests or lower:

NIGHTWATCH_REQUEST_SAMPLE_RATE=0.1
NIGHTWATCH_COMMAND_SAMPLE_RATE=1.0
NIGHTWATCH_EXCEPTION_SAMPLE_RATE=1.0

Sampling works on entire traces. If a request is sampled in, every query, job, and exception inside it is captured. If it’s sampled out, none of them are.

Sample Per Route

Use the Sample middleware to keep critical routes at 100% and reduce sampling on noisy ones:

use Laravel\Nightwatch\Http\Middleware\Sample;

// Always trace checkout; it's where money is lost
Route::post('/checkout', CheckoutController::class)
    ->middleware(Sample::always());

// Health checks are pure noise
Route::get('/ping', PingController::class)
    ->middleware(Sample::never());

// Bot and 404 traffic: keep a small sample to spot abuse
Route::fallback(fn () => abort(404))
    ->middleware(Sample::rate(0.05));

Ignore Code You Don't Care About

Wrap noisy code in Nightwatch::ignore() to prevent anything inside it from being recorded:

use Laravel\Nightwatch\Facades\Nightwatch;

$users = Nightwatch::ignore(fn () => User::where('active', true)->get());

Tom runs a marketplace that serves about 2 million requests a month. On his first day with Nightwatch, using 100% sampling, he burned through the free tier in under six hours. He reduced request sampling to 10%, forced Sample::always() on checkout and payouts, and dropped bot traffic to 5%. His usage settled comfortably within the Pro plan, and he still caught every payment exception.

Protect User Data in Nightwatch

Nightwatch captures the authenticated user’s id, name, and email by default. For privacy-sensitive apps, you can trim that data in your AppServiceProvider:

use Illuminate\Contracts\Auth\Authenticatable;
use Laravel\Nightwatch\Facades\Nightwatch;

public function boot(): void
{
    // Only send an ID; multi-tenant apps should prefix the tenant
    Nightwatch::user(fn (Authenticatable $user) => [
        'id' => "{$user->tenant_id}-{$user->id}",
    ]);
}

You can also scrub request URLs and IP addresses before they leave your server:

use Laravel\Nightwatch\Facades\Nightwatch;
use Laravel\Nightwatch\Records\Request;

Nightwatch::redactRequests(function (Request $request) {
    // Hide signed URL tokens and anonymise IPs
    $request->url = preg_replace('/token=[^&]+/', 'token=***', $request->url);
    $request->ip = '0.0.0.0';
});

If you handle health or financial data, review what each event type captures before going live. Nightwatch notes that it’s actively pursuing SOC 2 certification, so confirm that it meets your compliance requirements first.

Using Nightwatch Alerts and AI Assistants

Nightwatch groups related exceptions into issues you can assign, comment on, and resolve. You can also set performance thresholds for each route or job—for example, “Alert me when POST /payments takes over 5,000 ms.”

The number of thresholds depends on your plan: one on Free, 10 per application on Pro, 20 on Team, and 30 on Business.

Alerts can flow into the tools your team already uses:

  • Slack for real-time issue updates

  • Linear to create and link issues

  • Webhooks for other integrations

There’s also an official Nightwatch MCP server. It lets AI assistants such as Claude Code, Cursor, or Codex list issues, read stack traces, and mark issues as resolved with a comment. If you use Laravel Boost, php artisan boost:install detects Nightwatch and offers to configure the MCP server for you. For Claude Code, setup takes one command:

claude mcp add --transport http nightwatch https://nightwatch.laravel.com/mcp

Aisha’s agency maintains 14 client apps. Every Monday, she asks her AI assistant, “What are the newest production exceptions across our apps? Rank them by users affected.” Triage that used to take a morning now takes 20 minutes. When a fix ships, she has the assistant mark the issue as resolved with a comment, leaving an audit trail in Nightwatch.

Monitoring tells you what broke. StackMivo helps you fix it faster. Generate tested Laravel features from a prompt, then ship with confidence. Start free with StackMivo →

Is Laravel Nightwatch Worth It?

For most production Laravel apps, yes—especially if you don’t already pay for Sentry, Datadog, or New Relic. The free tier is enough for side projects, and $20/month is inexpensive compared with losing an evening to debugging.

Choose Nightwatch if you:

  • Need alerts when something breaks, rather than just a dashboard to check

  • Want request-level traces linked to queries, jobs, and logs

  • Run queue workers and scheduled tasks you need to trust

  • Prefer a managed service over running more infrastructure

Stick with Pulse and Telescope if you:

  • Can’t send telemetry to a third party because of compliance requirements

  • Have very high traffic and a tight budget, and can live without tracing

  • Already have a mature APM setup that covers Laravel well

You can also run Nightwatch alongside another APM tool. Just remember that two monitoring agents add overhead.

Frequently Asked Questions

Is Laravel Nightwatch Free?

Yes. The free plan includes 300k events per month, 14 days of history, and unlimited apps and seats. Paid plans start at $20/month for 7.5 million events.

Can I Self-Host Laravel Nightwatch?

No. Nightwatch is fully managed by Laravel. If you need self-hosted monitoring, use Laravel Pulse, which stores data in your own database.

Does Nightwatch Replace Telescope?

Not really. Telescope is a local debugging tool that records entries for inspection. Nightwatch is built for production, with sampling, alerts, and longer-term history. Most teams can use both.

Does Nightwatch Slow Down My Laravel App?

The package hands events to a local agent, which batches and sends them in the background. Requests don’t wait on Nightwatch’s servers. Sampling can reduce the workload further.

Does Nightwatch Work With Laravel Vapor?

Yes, but the agent needs a long-running process, so you’ll need a separate virtual machine to run it.

Conclusion

Laravel Nightwatch gives Laravel developers a first-party answer to the question, “What’s happening in production right now?” It traces requests through queries, jobs, and API calls, groups exceptions into issues, and alerts your team through Slack or Linear before users start emailing support.

Start small. Install the package, run the agent under Supervisor or Forge, and set request sampling to 10%, using Sample::always() on routes that make money. Trim user data, add Nightwatch to your logging stack, and keep Telescope for local debugging and Pulse as a free alternative.

Do that, and the next Friday-night outage could be a five-minute fix instead of a three-hour hunt.

Build your next Laravel app with StackMivo, free to start →