> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usenightowl.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Running Alongside Nightwatch

> Run NightOwl alongside Nightwatch's hosted agent — compare dashboards before switching.

Already using Nightwatch and not ready to fully switch? You can run both agents side by side. The Nightwatch collector sends telemetry to both, so you can compare them in parallel before committing.

## 1. Enable parallel mode in `.env`

```env theme={null}
NIGHTOWL_PARALLEL_WITH_NIGHTWATCH=true
NIGHTOWL_AGENT_PORT=2410
NIGHTOWL_TOKEN=your-nightowl-token-from-dashboard
NIGHTOWL_APP_ID=your-app-id-from-dashboard
NIGHTWATCH_TOKEN=your-nightwatch-token
```

<Note>
  `NIGHTWATCH_TOKEN` is used by the Nightwatch collector to authenticate
  outbound telemetry. `NIGHTOWL_TOKEN` is the token from the NightOwl dashboard
  — the NightOwl agent uses it for payload authentication and health reporting.
  `NIGHTOWL_APP_ID` is the connected-app ID shown alongside the token; the
  agent embeds it in alert payloads so issue links resolve to this app.
</Note>

That's all the configuration needed. The NightOwl agent's service provider detects the flag and wraps Nightwatch's `$core->ingest` so records fan out to both agent ports.

## 2. Run both agents

```bash theme={null}
# Terminal 1 — Nightwatch agent (port 2407)
php artisan nightwatch:agent

# Terminal 2 — NightOwl agent (port 2410)
php artisan nightowl:agent
```

Both agents receive identical telemetry. If one goes down, the other keeps running.

## Switching fully to NightOwl

Set `NIGHTOWL_PARALLEL_WITH_NIGHTWATCH=false` (or remove it) and set `NIGHTOWL_AGENT_PORT=2407`. The Nightwatch collector now ships exclusively to the NightOwl agent. Stop the `nightwatch:agent` process. Done.
