Field documentation · technical preview

Take the watch.

Everything needed to install, operate, administer, and eventually tune Nightwatch—without crawling behind the rack.

00 / Read this first

Documentation map

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.

Available now

User manual →

Rounds, campaigns, service health, research, decisions, exports, and Handled memory.

Available now

Administrator guide →

Deployment, identities, targets, secrets, models, notifications, retention, and safe writes.

Code-configured

Rule guide →

What deterministic hunts and statistical signals do today, plus the intended rule-authoring boundary.

Design target

Skills & reasoning →

Placeholders and contracts for future supported tuning—not controls that silently exist today.

Status labels are part of the contract. “Available now” means the current release implements it. “Code-configured” means changing it requires source changes. “Design target” describes a proposed capability and is not a promise of present behavior.
01 / Installation guide

From empty host to first round

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.

1. Prepare the host

  • Use a dedicated, non-root service account.
  • Allow outbound HTTPS to RevealX and the configured model provider.
  • Install qrencode for locally generated authenticator QR codes; manual TOTP secret entry remains available without it.
  • Keep the application, database, configuration, secret files, and evidence directory on persistent storage.
  • Expose the UI through TLS and authentication; the default direct bind is loopback-only.

2. Choose an authorized installation track

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
AI-assisted installation boundary. The public release does not expose an installer URL that an AI agent can execute. A secret, authenticated installation endpoint may be operated for a particular hosted deployment, but it is deployment-specific, disabled by default, excluded from release bundles, and must never be published in documentation or source. Until that endpoint exists and is separately reviewed, give an AI the packaged archive plus this installation guide.

Open http://127.0.0.1:8321 after startup. Put a maintained TLS reverse proxy in front of Nightwatch before allowing remote access.

3. Pass the preflight

--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.

4. Verify the first round

  1. Confirm the header shows the configured target and a successful checkpoint.
  2. Run Sweep now and Check now.
  3. Open Security and Performance, including their history views.
  4. Confirm model use and deterministic work in the technical telemetry.
  5. Trigger a test webhook if notifications are configured.
Upgrade rule: back up 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.
02 / User manual

Work the board, not every alert

COLLECTRounds read new detections, records, metrics, and health.
JUDGEDeterministic screening and bounded reasoning build findings.
CORRELATERelated evidence becomes campaigns or health episodes.
DECIDEAn analyst escalates, watches, dismisses, or tunes.

Overview

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

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.

DecisionUse it whenEffect
Escalate / confirmEvidence supports a real incident or needs response.Records the analyst outcome and preserves the handoff.
Keep watchingThe case is plausible but the discriminating evidence is not available yet.Retains the campaign as monitored work.
Dismiss / benignThe evidence supports an ordinary explanation.Moves attention away while retaining audit history.

Performance

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

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.

Research, evidence, and exports

  • Chat is scoped to the open campaign or episode and uses read-only tools.
  • Case notes are analyst-selected; conversation exports do not automatically become case evidence.
  • Markdown and JSON are portable handoffs. HTML is print-friendly. CSV flattens evidence.
  • Packet capture requires a bounded window, purpose, BPF, size limit, and typed human approval. Scheduled work and the model cannot approve it.
03 / Administrator guide

Own the boundaries

Administrators control connectivity, identity, cost, persistence, write permissions, and the definition of “inside.” Those choices change what every analyst sees.

The administration workspace

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.

Configuration workflow

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.

Enrollment, recovery, MFA, sessions, and bot verification

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.

Audience and shared capacity

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.

Administrative checklist

  • Targets: verify names, hosts, credentials, internal networks/domains, and reconciliation scopes.
  • Identity: require sign-in, use TLS, set secure cookies, assign least privilege, and remove dormant users.
  • Models: qualify tool calling, set primary/fallback budgets, and understand provider data policy.
  • Writes: leave tuning disabled until governance and rollback ownership are established.
  • Storage: monitor database, evidence, backup, and free-disk growth.
  • Notifications: sign webhooks and route links to the public Nightwatch URL.

Backup and recovery

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.

Change control

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.

04 / Configuration reference

What the system reads today

The example configuration is the canonical portable template. The table below groups controls by operational consequence; defaults are template defaults, not universal recommendations.

Two configuration surfaces. The administration editor currently supports targets, lamps, intervals, notifications, email, authentication security, and audience capacity. Model routes and budgets, retention windows, tuning, evidence storage, and the executable path remain file-configured. The editor preserves those file-only fields but does not expose them.
SectionControlsOperational meaning
llm.primary / fallbackprovider, base_url, secret reference, model, provider optionsSelects native Anthropic or OpenAI-compatible/OpenRouter routes. Use separate keys when budgets and failure domains must be independent.
llm.limitsdaily requests, request spacing, fallback daily/monthly/per-call USD, cooldown, failure fallbackCost and quota circuit breakers. They govern route eligibility, not detector collection.
llmreasoning_queue_limit, tool rounds, temperature, retained tool resultsBounds 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 destinationsDefines evidence sources and identity boundaries. Wrong “inside” scope causes wrong attribution.
lamps[]id, label, ExtraHop groups, metric packMaps business-facing service areas to measurable activity.
sweepstriage interval/window/caps, hunt interval/window/overlap/limit, watch baseline/forget/limitsControls collection cadence and volume. Caps create an explicit coverage boundary.
sweeps signalssignal window and per-record limits, Kerberos window and spray thresholdControls deterministic statistical detectors and their input ceilings.
sweeps campaignsquiet hours, correlation debounce, Daylight, online intelControls when changed findings are reconsidered, grouped, challenged, and enriched.
sweeps healthboard interval/windows, episode cooldown/tool roundsControls service-health sampling and episode reasoning.
sweeps retentionrun, trace, and handled retention daysBalances forensic history and storage. Confirm policy before reducing.
notificationswebhook URL, signing secret reference, public Nightwatch URL, timeoutSends signed state transitions and correct investigation links.
emailSMTP relay, credential references, sender/reply-to, public URL, signup domainsEnables durable queued delivery for verified signup, password recovery, and account notices.
authsession lifetime, secure cookie, login window/lockout, required-MFA roles, policy version, optional TurnstileControls local authentication security, legal-policy enforcement, and deployment-specific bot verification.
accessper-user/network limits, manual-action rate, concurrency, queue wait, quiet/demo/export policyBounds shared interactive capacity and viewer capabilities.
tuningenabled, minimum occurrences, expiration daysGates native RevealX tuning candidates. Apply and rollback remain typed human actions.
evidence_captureprivate directoryStores approved PCAPs; provision and retain it as sensitive evidence.
uibind, port, minutes-per-detectionControls exposure and workload projection. Loopback is the safe default.
identity recordsusers, roles, enabled state, TOTP, recovery codes, active sessionsDatabase-backed access state managed through People & access and each user’s security panel.
excli_pathabsolute or application-relative pathPins the ExtraHop tool surface Nightwatch is allowed to invoke.
Secret reference rules

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.

Multiple targets and reconciliation scope

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.

Safe interval changes

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.

05 / Rule guide

Deterministic first, explainable always

Code-configured today

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.

Current rule contract

  • A stable ID and version.
  • A supported ExtraHop record type and query.
  • Required fields and a coverage condition.
  • Actor/entity extraction and an explicit count or threshold.
  • Evidence text that can be cited without inventing telemetry.
  • Tests using sanitized record contracts, including missing/truncated data.

When a new rule belongs

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.

Proposed supported rule packs

Design target

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.

06 / Skill guide

Teach a method, not a personality transplant

Placeholder · not implemented

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.

Proposed skill manifest

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]

Design requirements

  • Signed/versioned origin and a compatibility range.
  • Explicit input/output schemas and tool allowlist.
  • Hard token, tool-round, time, and record budgets.
  • Prompt-injection handling and untrusted-data boundaries.
  • Positive, negative, incomplete-evidence, and cost regression tests.
  • Dry-run, staged rollout, audit trail, and one-step rollback.
Not available yet: there is no supported skill upload, registry, hot reload, or third-party execution sandbox in the current release. Existing investigation methods are reviewed application code.
07 / Reasoning guide

Tune the gates before the prose

Placeholder · limited controls today

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.

What should become configurable

ControlSafe shapeRequired proof
Method routingChoose a qualified model profile per method and severity band.Tool-call, schema, latency, cost, and labeled-quality evaluation.
Evidence budgetRecord/tool/token ceilings with explicit incomplete coverage.No hidden truncation; stable behavior at each cap.
Decision policyConfidence thresholds for watch, escalate, or request more evidence.Precision/recall and reopening analysis on labeled cases.
Daylight policyEnablement and method-specific challenge strength.Ordinary-explanation capture without suppressing real incidents.
Context policyWhich prior judgments and tool results may be reused.Freshness, tenant isolation, and stale-context tests.
VoiceSmall reviewed presentation profiles, separate from evidence policy.No change to severity, uncertainty, citations, or safety gates.

What should not be a free-form knob

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.

Evaluation loop

  1. Freeze a sanitized labeled set, including misses and ordinary activity.
  2. Record the baseline model, method version, cost, latency, and outputs.
  3. Change one policy dimension.
  4. Run schema, safety, quality, and cost gates.
  5. Shadow the profile without affecting the board.
  6. Promote gradually with automatic rollback on contract failure.
08 / Security & operations

Keep the night shift on a short leash

Hardening baseline

  • Bind Nightwatch to loopback and terminate TLS at a maintained reverse proxy.
  • Require authentication; use secure cookies; rotate credentials and signing secrets.
  • Run as a dedicated non-root account with read-only application files.
  • Restrict secret and evidence files to that account; exclude both from source and support bundles.
  • Allow only required outbound destinations. Keep ExtraHop tools read-only for model use.
  • Leave native tuning writes disabled unless reviewed; keep typed approvals and rollback audit enabled.

Operational symptoms

SymptomCheck first
No first roundRun doctor; inspect service logs, target auth, scheduler state, and time.
Empty boardCheck telemetry freshness, target scope, record contracts, and coverage/cap messages.
Reasoning backlogCheck primary quota, request spacing, queue limit, fallback eligibility, and repeated unchanged evidence.
Wrong entity relationshipsAudit internal networks/domains and reconciliation scopes before changing prompts.
Webhook missingVerify URL, secret reference, timeout, receiver signature validation, and transition eligibility.
Configuration button deniedConfirm the account has the Admin role and an active authenticated session.
09 / Configuration design

The control-plane map

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.

LayerConfiguration directionStatus
EnvironmentTargets, identity boundaries, lamps, credentials, storage, notifications.Current
ResourcesCadence, windows, caps, retention, model routes, budgets.Current
AttentionSuppression scope, tuning eligibility/expiry, severity and notification policy.Partial
DetectionValidated versioned rule packs and safe threshold overrides.Planned
InvestigationSigned bounded skills with schemas, tool allowlists, and tests.Planned
Enrollment & identityInvitation lifecycle, verified SMTP signup, recovery, sessions, TOTP MFA, role policy, and durable mail queue; external identity providers later.Current
ReasoningEvaluated per-method profiles, evidence budgets, and rollout controls.Planned
AuthorityTool 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.