User manual →
Rounds, campaigns, service health, research, decisions, exports, and Handled memory.
Everything needed to install, operate, administer, and eventually tune Nightwatch—without crawling behind the rack.
Nightwatch has two kinds of explanation. The dashboard’s After Hours and Behind the Rack rooms explain the product and its machinery. This site is the field manual: how to deploy it, use it safely, and decide what should become configurable.
Rounds, campaigns, service health, research, decisions, exports, and Handled memory.
Deployment, identities, targets, secrets, models, notifications, retention, and safe writes.
What deterministic hunts and statistical signals do today, plus the intended rule-authoring boundary.
Placeholders and contracts for future supported tuning—not controls that silently exist today.
Nightwatch is a Python 3.10+ process with no pip dependencies. It needs a matching excli binary, access to RevealX, and a tool-calling model endpoint.
qrencode for locally generated authenticator QR codes; manual TOTP secret entry remains available without it.Packaged release (recommended for operators): obtain the platform archive and checksum from the Nightwatch distributor, verify the checksum, unpack it, and use the bundled service template. The archive includes Nightwatch and a pinned excli binary; it never includes credentials or a working site configuration.
sha256sum -c SHA256SUMS
tar -xzf nightwatch-VERSION-PLATFORM.tar.gz
cd nightwatch-VERSION-PLATFORM
cp nightwatch.example.json nightwatch.json
# Add secret-file references and environment-specific settings.
python3 nightwatch.py --doctor --config nightwatch.json
python3 nightwatch.py --config nightwatch.json
Authenticated source: maintainers and authorized users may clone the private repository with an account or token that has access, then obtain the pinned excli binary. A normal unauthenticated GitHub clone will not work while the repository is private.
gh auth login
gh repo clone aarond-eh/nightwatch
cd nightwatch
cp nightwatch.example.json nightwatch.json
Open http://127.0.0.1:8321 after startup. Put a maintained TLS reverse proxy in front of Nightwatch before allowing remote access.
--doctor is read-only. It checks the executable and checksum, database, target authentication, record and metric coverage, lamp groups, telemetry freshness, model tool calling and pricing, bind/auth posture, secret-file modes, and disk capacity. Treat a failed required check as an installation failure.
nightwatch.json, nightwatch.db, and the evidence directory; deploy the new release as a unit; run --doctor; then restart. Never replace the database with an empty release artifact.Overview is the shift handoff. The patrol strip reports recent jobs; the service lamps summarize current service state; priority work links into Security and Performance. Use manual round buttons to validate or investigate—not as a substitute for the scheduler.
Security shows correlated campaigns, highest severity first. Open a campaign to read the analyst desk, Daylight challenge, evidence, entities, ATT&CK context, timeline, and unknowns. Use live research for bounded read-only questions. Record the outcome when the case is understood.
| Decision | Use it when | Effect |
|---|---|---|
| Escalate / confirm | Evidence supports a real incident or needs response. | Records the analyst outcome and preserves the handoff. |
| Keep watching | The case is plausible but the discriminating evidence is not available yet. | Retains the campaign as monitored work. |
| Dismiss / benign | The evidence supports an ordinary explanation. | Moves attention away while retaining audit history. |
Each lamp corresponds to configured ExtraHop activity groups and a metric pack. Amber and red episodes show service impact, offenders, evidence, and possible cross-domain security references. History answers whether a condition is new, recurring, or worsening.
Handled is durable attention control, not deletion. Repeated benign patterns are grouped with scope and history. A new host, account, or destination is judged again. Reopen a pattern when the business context changes; disable a suppression when it is too broad.
Administrators control connectivity, identity, cost, persistence, write permissions, and the definition of “inside.” Those choices change what every analyst sees.
The gear opens the authenticated control plane. People & access supports search, per-account changes, visible-row selection, and atomic bulk role or enablement updates. Disabling an account preserves authored decisions and audit history while revoking its active sessions. An administrator cannot remove their own access, and Nightwatch always retains at least one active administrator.
System configuration exposes seven validated categories: Environment & targets, Service lamps, Schedules & cadence, Notifications, Email & recovery, Authentication security, and Audience & capacity. Search locates a category; each editor saves the complete safe configuration while preserving fields outside its schema. It never resolves or returns secret values, writes a mode-600 backup, and replaces the configuration atomically. Restart Nightwatch after a saved configuration change.
Administrators can generate, replace, enable, and disable a hashed invitation code; the login page exposes account creation only while invitations are enabled. With SMTP configured, signup creates a pending account, sends a single-use 30-minute verification link, and activates a viewer only after verification. Password recovery uses an indistinguishable response for known and unknown addresses, a single-use 20-minute link, bounded request rates, and session revocation after reset.
Each user can review active sessions, revoke an individual sign-in, sign out everywhere, and enroll a standard TOTP authenticator. Nightwatch shows recovery codes once and stores only their hashes. Administrators can require MFA by role and configure session lifetime, secure-cookie behavior, login-attempt windows, lockout duration, and the accepted legal-policy version. The server-console password-reset command is the break-glass path: it re-enables the named local account, revokes its sessions, and clears MFA so the administrator can enroll again. External identity providers remain a future connector boundary.
Optional Cloudflare Turnstile can protect login, signup, and recovery. It is disabled by default and makes no Cloudflare request while disabled. When enabled, Nightwatch requires a public sitekey, secret-file or environment reference, approved hostnames, and selected forms; the backend verifies every token’s success, action, and hostname before authentication logic runs. Turnstile supplements rate limits, lockout, verified email, and MFA—it does not replace them.
Administrators can bound interactive requests per user and source network, manual actions per user, FIFO interactive concurrency, queue wait time, and deployment interactive cost per day and month. Quiet mode pauses analyst-triggered model work and forced rounds while deterministic scheduled measurement continues. Demo reset and viewer-export policy are disabled by default; when explicitly enabled, reset removes chats and saved notes while preserving cases, evidence, accounts, configuration, and audit history. These limits protect a shared lab and complement—not replace—upstream provider quotas and authorization roles.
Back up the configuration, SQLite database (using a SQLite-safe snapshot while running), evidence directory, and secret references. The database contains cursors, campaigns, feedback, outcomes, suppression memory, audit records, and session state. Test restore on an isolated bind before declaring recovery complete.
Record who changed a target scope, detector threshold, model route, retention window, or write capability; why; the expected effect; validation result; and rollback point. Run doctor after infrastructure or credential changes and after every release.
The example configuration is the canonical portable template. The table below groups controls by operational consequence; defaults are template defaults, not universal recommendations.
| Section | Controls | Operational meaning |
|---|---|---|
| llm.primary / fallback | provider, base_url, secret reference, model, provider options | Selects native Anthropic or OpenAI-compatible/OpenRouter routes. Use separate keys when budgets and failure domains must be independent. |
| llm.limits | daily requests, request spacing, fallback daily/monthly/per-call USD, cooldown, failure fallback | Cost and quota circuit breakers. They govern route eligibility, not detector collection. |
| llm | reasoning_queue_limit, tool rounds, temperature, retained tool results | Bounds concurrency, agent depth, sampling, and context size. Raise only after measuring quality and cost. |
| targets[] | name, host, auth, TLS, internal networks/domains, reconciliation scope, direct destinations | Defines evidence sources and identity boundaries. Wrong “inside” scope causes wrong attribution. |
| lamps[] | id, label, ExtraHop groups, metric pack | Maps business-facing service areas to measurable activity. |
| sweeps | triage interval/window/caps, hunt interval/window/overlap/limit, watch baseline/forget/limits | Controls collection cadence and volume. Caps create an explicit coverage boundary. |
| sweeps signals | signal window and per-record limits, Kerberos window and spray threshold | Controls deterministic statistical detectors and their input ceilings. |
| sweeps campaigns | quiet hours, correlation debounce, Daylight, online intel | Controls when changed findings are reconsidered, grouped, challenged, and enriched. |
| sweeps health | board interval/windows, episode cooldown/tool rounds | Controls service-health sampling and episode reasoning. |
| sweeps retention | run, trace, and handled retention days | Balances forensic history and storage. Confirm policy before reducing. |
| notifications | webhook URL, signing secret reference, public Nightwatch URL, timeout | Sends signed state transitions and correct investigation links. |
| SMTP relay, credential references, sender/reply-to, public URL, signup domains | Enables durable queued delivery for verified signup, password recovery, and account notices. | |
| auth | session lifetime, secure cookie, login window/lockout, required-MFA roles, policy version, optional Turnstile | Controls local authentication security, legal-policy enforcement, and deployment-specific bot verification. |
| access | per-user/network limits, manual-action rate, concurrency, queue wait, quiet/demo/export policy | Bounds shared interactive capacity and viewer capabilities. |
| tuning | enabled, minimum occurrences, expiration days | Gates native RevealX tuning candidates. Apply and rollback remain typed human actions. |
| evidence_capture | private directory | Stores approved PCAPs; provision and retain it as sensitive evidence. |
| ui | bind, port, minutes-per-detection | Controls exposure and workload projection. Loopback is the safe default. |
| identity records | users, roles, enabled state, TOTP, recovery codes, active sessions | Database-backed access state managed through People & access and each user’s security panel. |
| excli_path | absolute or application-relative path | Pins the ExtraHop tool surface Nightwatch is allowed to invoke. |
Prefer *_file or *_env fields. Secret files should be readable only by the service account. The browser editor accepts references but does not resolve or return secret values. Do not store literal credentials in source control, release bundles, support archives, or screenshots.
Each target sweeps independently. Give systems in the same real environment the same reconciliation_scope so cross-system references are possible; isolate unrelated customers or environments with different values. Configure internal CIDRs and domain suffixes explicitly.
Shorter intervals increase API work and can outpace downstream reasoning. Change cadence and queue/record caps together, observe a complete peak period, and check coverage indicators. The administration editor enforces bounded values, including a minimum scheduler poll of 10 seconds.
Nightwatch’s hunt rules and statistical signals run before model reasoning. Rules are currently shipped as reviewed source, not uploaded from the browser. Configuration exposes a small set of safe thresholds and resource ceilings.
Add a deterministic rule when the evidence condition is precise, repeatable, cheap enough for every round, and independently testable. Use reasoning only to interpret fired evidence in context. Do not encode a vague “suspiciousness” prompt as a rule.
A future rule-pack format should allow signed, versioned packs with metadata, record contracts, queries, thresholds, entity mappings, severity guidance, fixtures, and resource budgets. Packs should pass doctor validation and a dry run before activation. Arbitrary Python, shell, network calls, model prompts, and write tools should remain outside the pack format.
A Nightwatch skill should define a bounded investigation method: what evidence it accepts, which read-only tools it may use, what it must publish, and how success is tested. Skills should not be unscoped prompt fragments.
id: org.example.identity-triage
version: 1.0.0
accepts: [finding.kerberos, finding.ldap]
tools: [records.search, metrics.query] # read-only allowlist
publisher: publish_investigation
max_tool_rounds: 6
evidence_contract: complete-or-declare-gap
tests: [fixtures/spray.json, fixtures/ordinary-sso.json]
Current operators can select model routes, set budgets, bound tool rounds and queues, and enable Daylight in the configuration file. Those controls are not yet exposed by the browser editor. Method prompts and publisher schemas remain application code. Future reasoning profiles should make safe policy choices configurable without turning the UI into a prompt editor.
| Control | Safe shape | Required proof |
|---|---|---|
| Method routing | Choose a qualified model profile per method and severity band. | Tool-call, schema, latency, cost, and labeled-quality evaluation. |
| Evidence budget | Record/tool/token ceilings with explicit incomplete coverage. | No hidden truncation; stable behavior at each cap. |
| Decision policy | Confidence thresholds for watch, escalate, or request more evidence. | Precision/recall and reopening analysis on labeled cases. |
| Daylight policy | Enablement and method-specific challenge strength. | Ordinary-explanation capture without suppressing real incidents. |
| Context policy | Which prior judgments and tool results may be reused. | Freshness, tenant isolation, and stale-context tests. |
| Voice | Small reviewed presentation profiles, separate from evidence policy. | No change to severity, uncertainty, citations, or safety gates. |
Tool permissions, write authority, publisher schemas, evidence citation rules, secret access, tenant reconciliation, and human approval gates must remain enforced contracts. A custom prompt must never widen them.
| Symptom | Check first |
|---|---|
| No first round | Run doctor; inspect service logs, target auth, scheduler state, and time. |
| Empty board | Check telemetry freshness, target scope, record contracts, and coverage/cap messages. |
| Reasoning backlog | Check primary quota, request spacing, queue limit, fallback eligibility, and repeated unchanged evidence. |
| Wrong entity relationships | Audit internal networks/domains and reconciliation scopes before changing prompts. |
| Webhook missing | Verify URL, secret reference, timeout, receiver signature validation, and transition eligibility. |
| Configuration button denied | Confirm the account has the Admin role and an active authenticated session. |
The administration workspace exposes implemented controls and reserves clearly labeled locations for future safe controls, while keeping evidence contracts and authority fixed. This is the proposed order of work.
| Layer | Configuration direction | Status |
|---|---|---|
| Environment | Targets, identity boundaries, lamps, credentials, storage, notifications. | Current |
| Resources | Cadence, windows, caps, retention, model routes, budgets. | Current |
| Attention | Suppression scope, tuning eligibility/expiry, severity and notification policy. | Partial |
| Detection | Validated versioned rule packs and safe threshold overrides. | Planned |
| Investigation | Signed bounded skills with schemas, tool allowlists, and tests. | Planned |
| Enrollment & identity | Invitation lifecycle, verified SMTP signup, recovery, sessions, TOTP MFA, role policy, and durable mail queue; external identity providers later. | Current |
| Reasoning | Evaluated per-method profiles, evidence budgets, and rollout controls. | Planned |
| Authority | Tool permissions, tenant isolation, publisher contracts, typed approvals. | Fixed contract |
Documentation version v26.08.10. When product behavior and this site disagree, treat that as a defect: verify against the example configuration and release tests, then update both in the same change.