Start free trial
Start free trial Log in

14-day free trial. No credit card.

Set up NightOwl with Neon Postgres

Laravel monitoring on a serverless $0 Postgres in about 15 minutes.

  • Tutorial
  • About 15 minutes
  • 6 steps
  • Updated September 27, 2026

Can I run NightOwl on a free Neon Postgres database?

Yes, for trying it out. Neon's serverless Postgres is fully libpq-compatible, and the 0.5 GB free tier holds a few days of telemetry for a low-volume Laravel app with retention set to 2 days. Setup is about 15 minutes: create the Neon project, copy the direct connection string, paste it into NightOwl, install the agent, run it. Plan for one limit: the running agent keeps Neon's compute awake, so the free plan's 100 CU-hours run out after about two weeks and Neon suspends the compute until the next billing period. For always-on monitoring, use the Neon Launch plan or a different provider.

Updated

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 Neon serverless Postgres under your control. Total monthly cost: from $5 for NightOwl Hobby, $0 for the database while you stay inside the free plan's limits.

Why Neon free tier works for NightOwl

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

  • Real Postgres, fully libpq-compatible: NightOwl uses native COPY, JSONB, and partial indexes; Neon supports all of it without a translation layer.
  • 0.5 GB free storage per project: enough for a few days of telemetry at small-app traffic with retention pruning.
  • Branching: useful when you want to test a NightOwl schema migration without touching production data.
Three catches worth knowing up front

Step 1. Create a free Neon project

Head to neon.tech, sign in, and click New project. Pick a region close to your Laravel app's server, so the agent's drain doesn't cross regions on every batch.

Neon creates a default database called neondb with a randomly generated user and password. You can rename, but for NightOwl telemetry the defaults are fine.

Step 2. Copy the direct connection string

On the project dashboard, click Connect. The connection modal offers two kinds of connection: Pooled (the Connection pooling toggle on, hostname has a -pooler suffix) and Direct (toggle off, regular hostname).

Turn Connection pooling off and copy the direct connection string. The drain runs each batch in one transaction, so it would work through the pooler too, but nightowl:partition needs a direct session. The direct connection works for every NightOwl command.

The string ends with sslmode=require because Neon only accepts TLS connections. The NightOwl dashboard ignores that part of the URI and negotiates TLS on its own; for the agent you set NIGHTOWL_DB_SSLMODE=require in Step 4.

Step 3. Register the app in NightOwl

Sign in to the NightOwl dashboard (or start a free trial). On the Apps page, click Connect App. Paste the Neon direct URI into the Connection String field. It fills in the fields below it for you:

  • Host: the hostname (e.g. ep-xxx-xxx.region.aws.neon.tech, no -pooler suffix)
  • Port: 5432
  • Database: neondb (Neon's default DB name)
  • Username: the user from the URI (Neon generates a random one)
  • Password: the password embedded in the URI

Give the app a name under App Name (e.g. "production-api") and click Test Connection. Before the agent is installed it reports Connected — schema missing: NightOwl reached your database, and the tables don't exist yet. That's expected; nightowl:install creates them in Step 4. Click Save. A banner shows two lines, NIGHTOWL_TOKEN and NIGHTOWL_APP_ID. Copy both now: the token is shown only once.

Step 4. Install the NightOwl agent

In your Laravel project root:

Terminal
composer require nightowl/agent

Add the database connection details (same values you entered in Step 3) plus the two lines from the token banner to your Laravel .env:

.env
NIGHTOWL_DB_HOST=ep-xxx-xxx.region.aws.neon.tech
NIGHTOWL_DB_PORT=5432
NIGHTOWL_DB_DATABASE=neondb
NIGHTOWL_DB_USERNAME=[user from URI]
NIGHTOWL_DB_PASSWORD=[password from URI]
NIGHTOWL_DB_SSLMODE=require
NIGHTOWL_TOKEN=[agent token from Step 3]
NIGHTOWL_APP_ID=[app id from Step 3]

Then run the installer:

Terminal
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 Neon database.

Step 5. Start the agent and verify telemetry

Run the agent process. In dev:

Terminal
php artisan nightowl:agent

In production, supervise it the same way you supervise queue workers. The production deployment docs have copy-paste Supervisor and systemd configs.

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

Step 6. Tune retention for the 0.5 GB free tier

Data stays in your PostgreSQL until you schedule nightowl:prune, which keeps NIGHTOWL_RETENTION_DAYS of raw telemetry (14 days by default). On a 0.5 GB Neon free tier, drop that to 2 days. Add this to your Laravel .env:

.env
NIGHTOWL_RETENTION_DAYS=2

Then schedule the prune command in routes/console.php:

routes/console.phpphp
use Illuminate\Support\Facades\Schedule;

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

Or run manually: php artisan nightowl:prune. This deletes rows older than NIGHTOWL_RETENTION_DAYS across all 11 raw telemetry tables. It's a single retention value, with no per-table tuning. Rollups (the pre-aggregated tables behind the charts) keep their own window, 90 days by default through NIGHTOWL_ROLLUP_RETENTION_DAYS.

When to upgrade to Neon Launch

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

  • You want monitoring that runs all month: on Free, the agent uses up the 100 CU-hours in about two weeks. Launch is usage-based ($0.106 per CU-hour) with no allowance to exhaust.
  • Dashboard pages take more than a few seconds to load: small compute is the bottleneck, not NightOwl. Launch allows larger compute sizes than Free's 2 CU ceiling.
  • Storage hits 80% of 0.5 GB even with 2-day retention: Launch bills storage at $0.35 per GB-month instead of capping it.
  • You need 30+ day retention for incident post-mortems: at typical SaaS traffic, that's well past 0.5 GB.

Total stack at that point: $15 NightOwl Team plus Neon Launch usage. Compute awake all month at 0.25 CU works out to roughly $19, plus $0.35 per GB-month of storage, so about $34/month before storage. For what the same volume costs on per-event tools, see the Sentry comparison and the Datadog comparison.

Neon vs Supabase for NightOwl

Both work. Pick based on your usage shape:

  • Neon if you want usage-based billing and branching, and you're ready for the Launch plan once you depend on it. On Free, the always-awake agent uses up the month's compute in about two weeks.
  • Supabase if you want always-on free compute (free projects pause only after 7 days of inactivity, which a running agent prevents) and don't need branching. The free database is the same size (500 MB).

Create your NightOwl account to get the agent token

Connect App takes your Neon URI and shows the NIGHTOWL_TOKEN and NIGHTOWL_APP_ID your .env needs. Then run the three commands here to finish the install.

No credit card needed.

Terminal
composer require nightowl/agent
php artisan nightowl:install
php artisan nightowl:agent

Frequently asked questions

Anything else, write to support@usenightowl.com

Does NightOwl run on a free Neon Postgres?

Yes, with one limit to plan for. Neon is a serverless Postgres, fully Postgres-compatible from NightOwl's perspective. The free plan allows up to 100 projects, each with 0.5 GB of storage and 100 CU-hours of compute a month, autoscaling up to 2 CU. NightOwl writes telemetry over a standard libpq connection just like any other Postgres host. The limit: a running agent keeps the compute awake all month, which uses up the free CU-hours in about two weeks (see the next question). Setup takes about 15 minutes.

Will Neon's free compute hours last the whole month?

No. The agent's drain queries the database at least once a minute, even when your app is idle, so Neon's compute never scales to zero while the agent runs. At the smallest size (0.25 CU) a full month awake is about 180 CU-hours, against the 100 the free plan includes. Once they are used up, Neon suspends the compute until the next billing period. From then on the agent buffers telemetry locally until it reaches NIGHTOWL_MAX_PENDING_ROWS (100,000 rows by default) and rejects new telemetry after that, and the dashboard can't load data. For always-on monitoring, use the Neon Launch plan or a provider with always-on free compute such as Supabase or Aiven.

Why does the NightOwl dashboard feel slow on Neon free?

Free compute is small. It autoscales from 0.25 CU up to 2 CU, and aggregations over a few days of telemetry can take a few seconds on the smallest size. This is the database, not NightOwl. You can verify in Neon's SQL Editor, where the same queries are just as slow. Launch allows larger compute sizes.

Should I use the pooled or direct connection string?

Use the direct connection (the hostname without the -pooler suffix). The drain runs each batch in a single transaction, so it also works through Neon's pooler, but nightowl:partition needs a direct session. The direct connection covers every NightOwl command, so it's the simplest choice.

Will autosuspend break my monitoring?

Autosuspend itself won't happen while the agent is running, because the drain touches the database at least once a minute. What stops monitoring on the free plan is the monthly CU-hour allowance running out (see above). During short database outages the agent buffers telemetry locally in SQLite and retries the drain, up to NIGHTOWL_MAX_PENDING_ROWS rows.

How much telemetry fits in 0.5 GB?

A few days for a low-volume Laravel app, depending on traffic. Heavy traffic shortens that. NightOwl has one raw retention value, NIGHTOWL_RETENTION_DAYS, for all raw telemetry tables: set it to 2 days on the free plan and schedule nightowl:prune. Rollups (the pre-aggregated tables behind the charts) keep their own window, 90 days by default through NIGHTOWL_ROLLUP_RETENTION_DAYS. If you need 30+ day raw retention, Neon Launch bills storage at $0.35 per GB-month instead of capping it at 0.5 GB.

Does Neon's branching feature work with NightOwl?

Yes, but it's not part of normal monitoring flow. Branching is useful for testing schema changes: you could branch your NightOwl telemetry database, run a migration test, then drop the branch. For day-to-day ops it's irrelevant. Branches share the project's storage allocation, so don't leave dozens lying around on the free plan.

Is my data exposed to NightOwl?

NightOwl is BYOD, so telemetry is stored in your Neon project and is not mirrored to NightOwl servers. The agent installed in your Laravel app writes directly to your database. The hosted dashboard reads on demand using the credentials you provide; the password is encrypted at rest. A daily job also connects to read your auto-resolve setting and, if you turned auto-resolve on, resolves issues that have gone quiet.

Flat pricing, whatever your traffic does

Every plan starts with a 14-day free trial. No credit card needed.

Hobby
$5 a month

One app for a side project. Issues and alerts, with a 14-day dashboard window.

Start my 14-day trial
TeamRecommended
$15 a month

Up to 3 apps and 5 people per team. Full history, the MCP server, data clearing and agent health.

Start my 14-day trial
Agency
$69 a month

Unlimited client apps and people, one overview of every app, and apps you can hand over.

Start my 14-day trial

Related guides

Related

Connect your Neon database to NightOwl

Create an account and paste your Neon URI into Connect App, and your Laravel telemetry starts landing in your own database. No credit card needed.