Open source · MIT View on GitHub

Your apps break at 3 AM. You find out before your customers do.

NightGuardian is a free error and health monitor you run on your own server. It groups errors into issues, tells you only when something is new, comes back or spikes, and gives your users a friendly error page with a code your support team can search.

No sign-up. The demo panel is read-only and resets every night.

Issue detail: stack trace with your code highlighted and the lines around it

The problem

Hosted monitoring is great until you add up seats, quotas and data-residency questions.

  • You find out about errors from a customer, hours later.
  • Every occurrence pings you, so you learn to ignore the pings.
  • Your users see a blank 500 and write "it doesn't work", with nothing to search for.
  • Your error data lives in somebody else's cloud, at a price per seat and per event.

What you get

Quiet by default

Errors are grouped into issues with a smart fingerprint. You are notified when an issue is new, regresses or spikes — not on every occurrence.

A code your users can give you

The friendly error page shows a reference like NG-7F3K-92QD and a "what were you doing?" box. Search the code, open the exact error, read the comment.

Never slows your app down

Events are sent after the response, with short timeouts, a circuit breaker and an on-disk spool. If the collector is down, your app does not notice and nothing is lost.

Alerts that respect your sleep

Telegram and e-mail with per-channel levels, "always" and "never" rules, cooldowns, an hourly cap and a daily digest.

Private by default

Passwords, tokens, cookies and card numbers are scrubbed in the SDK and again in the collector. IP addresses and request bodies are off unless you opt in.

Yours, for free

MIT licence, your server, your database. No quotas, no seats, no credit card. Built with Laravel and Filament, so contributing is easy.

How it works

A small SDK in your app, a collector on your server, and a panel to look at it.

Your app+ SDK Disk spoolstorage/nightguardian Collector/api/v1/ingest Panel Telegram / e-mail after the response HTTPS queue
  1. Your app throws an error. The SDK captures it with its stack trace, request and user, and scrubs secrets.
  2. After the response, it sends the event over HTTPS. If the collector is unreachable, it keeps it on disk and retries later.
  3. The collector groups it into an issue and decides whether it deserves an alert.
  4. You see it in the panel and, if it matters, on Telegram or e-mail.

See it

Issue detail: stack trace with your code highlighted and the lines around it
Issue detail: stack trace with your code highlighted and the lines around it
Feedback from your users, attached to the issue they were looking at
Feedback from your users, attached to the issue they were looking at
The error page your users see, with a reference code and a feedback box
The error page your users see, with a reference code and a feedback box
Create a token: shown once, with the lines to paste in your app
Create a token: shown once, with the lines to paste in your app
Dashboard: a card per project with open issues, new today and a 7-day chart
Dashboard: a card per project with open issues, new today and a 7-day chart
Search by reference code from the global search box
Search by reference code from the global search box

Install in 3 steps

1

Run the collector

On any server with PHP 8.3 and MySQL, or with Docker. There is a copy-paste guide for Ubuntu + Apache.

git clone https://github.com/pablozagni/nightguardian.git
cd nightguardian
docker compose up -d --build
docker compose exec app php artisan \
  nightguardian:install --skip-migrate

Production guide →

2

Add the SDK to your Laravel app

One Composer package, no other dependencies.

composer require nightguardian/laravel
3

Paste two lines in .env

The panel shows them (once) when you create a token. Then run the test command and break something.

NIGHTGUARDIAN_URL=https://ng.example.com
NIGHTGUARDIAN_TOKEN=ng_...

php artisan nightguardian:test

Try it live

Try it live

Press buttons that make a real Laravel app fail on purpose — an unhandled exception, a slow query, a failing job — and watch the errors land in a real NightGuardian panel.

Demo panel credentials
https://demo.nightguardian.com.ar
E-mail
visitor@demo.example.com
Password
visitor-demo

Read-only account. The data is reset every night.

SDKs

The collector speaks a small, documented HTTP protocol. Laravel is the first SDK; anything that can send JSON can be the next.

PlatformPackageStatus
Laravel 9 – 13 nightguardian/laravel 2.x Available
Laravel 5.8 – 8 nightguardian/laravel 1.x Available
Plain PHP nightguardian/php Looking for a maintainer
Node.js nightguardian-node Looking for a maintainer
Python nightguardian-python Looking for a maintainer

Want to write an SDK?

We are looking for maintainers for PHP, Node.js and Python. Start with the protocol and the SDK authors guide: the collector has a dry-run mode that validates your payloads.