[ TUTORIAL ]

Set up NightOwl with a free Supabase Postgres

Stand up self-hosted Laravel monitoring on a $0 database in about 15 minutes. Six steps, full screenshots, no credit card.

QUICK ANSWER

Can I run NightOwl on a free Supabase Postgres database?

Yes — Supabase's free 500 MB Postgres database fits NightOwl telemetry comfortably for low-volume Laravel apps. Use the session pooler connection string (port 5432, not the transaction pooler on 6543), set retention to 2 days, and the database stays under the free-tier limit for weeks. Total setup time is about 15 minutes: create the Supabase project, copy the connection string, paste it into NightOwl, install the agent, run it.

Updated · 2026-04-27

What you'll have at the end

A working NightOwl dashboard showing live telemetry from your Laravel app — requests, queries, jobs, exceptions, scheduled tasks — with all data stored in a free Supabase Postgres database under your control. Total monthly cost: from $5 for NightOwl Hobby, $0 for the database.

END STATE

What you're aiming for: live telemetry flowing from your Laravel app into Supabase, surfaced on the NightOwl dashboard.

Why Supabase free tier works for NightOwl

Three properties make Supabase a clean fit for NightOwl's BYOD Postgres model:

  • Real PostgreSQL 15+ — not a Postgres-flavored layer. NightOwl uses native COPY, JSONB, partial indexes; Supabase supports all of it.
  • 500 MB free database — enough for 4-7 days of telemetry at small-SaaS traffic with retention pruning.
  • IPv4 + IPv6 pooler — works from any Laravel host, including older Forge/Hetzner boxes that don't speak IPv6.

Two catches worth knowing up front:

  • Free tier compute is shared and slow. Supabase free projects run on a shared 2-core instance with throttled IOPS. Dashboard queries that take 100-200 ms on a dedicated database can take 1-3 seconds on the free tier — especially aggregations over the last 24 hours of requests. This is the database, not NightOwl. If pages feel slow once you have a few days of telemetry, that's the signal to upgrade Supabase, not to switch tools.
  • Auto-pause after 7 idle days. Because NightOwl writes continuously, the database is never idle — auto-pause does not trigger as long as the agent is draining. The risk is only there if you stop the agent for a week.

Step 1 — Create a free Supabase project

Head to supabase.com, sign in (GitHub or email), and click New project. Pick the region closest to your Laravel app's server — same-region puts the agent and database on the same backbone, which keeps drain latency under 10 ms.

Set a strong database password and save it somewhere — Supabase doesn't show it again. Click Create new project. Provisioning takes about 2 minutes.

STEP 01

Pick the region closest to your Laravel host. The 'free' compute size is sufficient for NightOwl telemetry on small-to-medium traffic.

Step 2 — Copy the session pooler connection string

Once the project is ready, click Project Settings → Database. Scroll to Connection string. You'll see three tabs: Direct connection, Transaction pooler, Session pooler.

Use the Session pooler. NightOwl's drain uses PostgreSQL COPY for batch ingestion — that doesn't work under transaction-mode pooling, which holds connections only for the length of one transaction. Session pooling reuses connections across the whole drain pass, which is what COPY needs.

STEP 02

The session pooler URI looks like postgresql://postgres.{project}:{password}@aws-0-{region}.pooler.supabase.com:5432/postgres. Copy it as-is.

Paste your password into the placeholder if Supabase shows [YOUR-PASSWORD]. Keep this URI handy for the next step.

Step 3 — Register the app in NightOwl

Sign in to the NightOwl dashboard (or start a free trial if you haven't yet). Click New application and name it (e.g. "production-api"). The form has five separate database connection fields — parse the Supabase session-pooler URI by hand into them:

  • db_host — the hostname (e.g. aws-0-eu-west-3.pooler.supabase.com)
  • db_port5432 (session pooler)
  • db_databasepostgres (Supabase's default DB name)
  • db_usernamepostgres.<project-ref>
  • db_password — the password you set in Step 1

Click Test connection. NightOwl runs SELECT 1 against the database; on success the form unlocks. Save, and NightOwl issues an agent token. Copy this token — you'll add it to your Laravel .env next.

STEP 03

If the connection test fails with a transaction-pooler error, you grabbed the wrong URI in Step 2 — go back and copy the session pooler tab.

Step 4 — Install the NightOwl agent in your Laravel app

In your Laravel project root:

bash
composer require nightowl/agent

Add the database connection details (same five values you entered in Step 3) plus the agent token to your Laravel .env:

bash
NIGHTOWL_DB_HOST=aws-0-eu-west-3.pooler.supabase.com
NIGHTOWL_DB_PORT=5432
NIGHTOWL_DB_DATABASE=postgres
NIGHTOWL_DB_USERNAME=postgres.
NIGHTOWL_DB_PASSWORD=
NIGHTOWL_TOKEN=
NIGHTOWL_APP_ID= 

Then run the installer:

bash
php artisan nightowl:install

nightowl:install publishes config/nightowl.php and runs the schema migrations against the nightowl connection — creating all nightowl_* tables in your Supabase database. The migrations run from your Laravel app, not from the NightOwl dashboard.

STEP 04

If migrations fail with a connection error, double-check the NIGHTOWL_DB_* env vars match what you typed into the dashboard form in Step 3.

Step 5 — Start the agent and verify telemetry

Run the agent process. In dev:

bash
php artisan nightowl:agent

In production, supervise it the same way you supervise queue workers — Supervisor, systemd, or your platform's worker config. Forge users can add it as a daemon; the docs page at docs.usenightowl.com has copy-paste configs.

Now hit any route in your Laravel app. Within a few seconds, you should see the request appear in the Requests tab of the NightOwl dashboard.

STEP 05

If you don't see anything within ~10 seconds: check the agent's health endpoint at localhost:2409/health, then the connection string syntax.

Step 6 — Tune retention for the 500 MB free tier

Out of the box, NightOwl retains 14 days of telemetry. On a 500 MB Supabase free tier, drop that to 2 days. Add this to your Laravel .env:

bash
NIGHTOWL_RETENTION_DAYS=2

Then schedule the prune command in routes/console.php so old rows get cleaned up automatically:

php
use Illuminate\Support\Facades\Schedule;

Schedule::command('nightowl:prune')->daily();

Or run it manually whenever you want to free space: php artisan nightowl:prune.

nightowl:prune deletes rows older than NIGHTOWL_RETENTION_DAYS across all 11 telemetry tables (requests, queries, exceptions, jobs, scheduled tasks, mail, notifications, cache events, outgoing requests, commands, logs). It's a single retention value — there's no per-table tuning at the moment.

STEP 06

Schedule daily for steady-state cleanup. If your traffic is bursty enough that 24-hour growth alone could blow the 500 MB cap, run it hourly instead.

When to upgrade to Supabase Pro

Four signals it's time to leave the free tier:

  • Dashboard pages take more than ~2 seconds to load — shared compute is the bottleneck, not NightOwl. Pro gives you a dedicated 2-core instance and unthrottled IOPS, which usually drops query times by 5-10×.
  • Database hits 80% of 500 MB even with 2-day retention — you're past low-volume territory; Pro at $25/mo gives you 8 GB and real backups.
  • You need 30+ day retention for incident post-mortems — at typical SaaS traffic, that's well past 500 MB.
  • You want point-in-time recovery — free tier has none. Pro adds 7-day PITR.

Total stack at that point: $15 NightOwl Team + $25 Supabase Pro = $40/month, all-in, with 8 GB of telemetry retention and no per-event metering. Compare that to Sentry or Datadog at equivalent volume.

THE QUICK PATH

Already have a Supabase URI? Skip to install.

Two commands plus the agent token. No Docker, no Postgres ops, no infrastructure to maintain.

bash
composer require nightowl/agent
php artisan nightowl:install

From $5/month flat for NightOwl. 14-day free trial. Database stays $0 on Supabase free tier.

Frequently asked questions

Does NightOwl actually run on a free Supabase Postgres?

Yes. NightOwl writes telemetry to any PostgreSQL 14+ database — Supabase, Neon, Railway, Fly Postgres, or self-hosted. Free Supabase gives you a 500 MB Postgres database, which fits a low-volume Laravel app comfortably (4-7 days of telemetry at typical SaaS traffic). Above that, you set retention pruning to one or two days, or upgrade to Supabase Pro for 8 GB.

Why does the NightOwl dashboard feel slow on Supabase free?

It's the database, not NightOwl. Supabase free projects run on a shared 2-core instance with throttled IOPS — aggregations over a few days of telemetry can take 1-3 seconds where a dedicated Postgres would take 100-200 ms. NightOwl's query planner and indexes are the same regardless of where you host. If the dashboard feels sluggish once you have real telemetry volume, that's the signal to upgrade Supabase to Pro ($25/mo, dedicated compute), not to switch monitoring tools. You can verify the bottleneck in Supabase's own SQL editor — the same queries will be just as slow there.

Will the free tier auto-pause break my monitoring?

Supabase pauses free projects after 7 days with zero database activity. Because NightOwl is constantly writing telemetry, the database is never idle — auto-pause does not trigger as long as the agent is draining. The risk is only there if you stop the agent for a week.

Should I use the direct connection or the connection pooler?

Use the session pooler (port 5432 on the pooler hostname) or the direct connection. Avoid the transaction pooler (port 6543) — NightOwl's drain uses Postgres COPY which doesn't work cleanly under transaction-mode pooling. The session pooler gives you IPv4 + connection reuse without that limitation.

How much telemetry can I store in 500 MB?

Roughly 4-7 days at low Laravel SaaS traffic (50-200 requests/min). Heavy traffic shortens that. NightOwl's retention setting prunes old rows automatically — set it to 2 days on the free tier. If you need 30+ day retention, Supabase Pro at $25/mo gives you 8 GB, which holds months of telemetry for most teams.

Is my data exposed to NightOwl?

No. NightOwl's BYOD model means telemetry never leaves your infrastructure. The agent installed in your Laravel app writes directly to your Supabase project. The hosted dashboard reads on demand using credentials you provide — they're encrypted at rest and only decrypted per request. No background jobs read your data, and no telemetry is mirrored to NightOwl servers.

Can I use the same Supabase project for my Laravel app data and NightOwl telemetry?

Technically yes — NightOwl's tables are prefixed `nightowl_` so they won't collide. But for a free tier with 500 MB, you'll burn through the limit faster sharing. We recommend a dedicated Supabase project for NightOwl telemetry (free projects are unlimited in count on Supabase).

What happens if my Supabase database goes offline?

The agent buffers telemetry locally in a SQLite WAL file and retries the drain every few seconds. You'll see a backlog warning in the agent health view but no data loss for outages under a few hours (depending on traffic and the agent's local disk).

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