Skip to main content

Reference

Quick lookup tables for environment variables, permissions, check types, alert types, and ports.

Ports

PortServiceNotes
8080Snitcher serverSPA + REST API + SignalR hubs
8025MailpitDev/demo email sink web UI
8081KeycloakOptional OIDC provider (dev mode)
(internal)Postgres / TimescaleDBNo host port published

Environment variables

Secrets (from a git-ignored .env)

VariableHow to generateDescription
SNITCHER_DB_PASSWORDopenssl rand -base64 24Postgres role password
SNITCHER_JWT_KEYopenssl rand -base64 48HS256 JWT signing key (min 32 chars; must not be a known dev default)
SNITCHER_ADMIN_PASSWORD_HASHPBKDF2 — see deployments/prod/README.mdPBKDF2 hash of the local admin password
SNITCHER_SECRETS_KEYopenssl rand -base64 32AES-GCM-256 key encrypting stored target secrets. Changing it makes existing secrets undecryptable.
SCOUT__SCOUT_IDCreated in the UI (Scouts → Add Scout)Scout ID (GUID) the bundled Scout registers under
SCOUT__REGISTRATION_KEYMinted in the UI (Scouts → Add Scout)One-time Scout registration key (activates first key registration)
SCOUT__KEY_ENCRYPTION_KEYopenssl rand -base64 32AES-GCM-256 key encrypting the Scout's stored Ed25519 private key. Changing it makes the stored key undecryptable, forcing re-enrolment.

Copy deployments/prod/.env.example to deployments/prod/.env and fill in each value; the dev stack (deployments/dev/) needs none of these — it ships throwaway defaults.

Server configuration

VariableDefaultDescription
Auth__UsernameadminLocal admin username
Auth__PasswordHashPBKDF2 hash; required in Production (plaintext Auth__Password is Development-only)
Auth__JwtKeyJWT signing key
ConnectionStrings__SnitcherDatabase(internal)Postgres connection string
Snitcher__SecretsKeyAES-GCM-256 secrets key
Snitcher__PublicUrlhttp://localhost:8080Public URL shown in the Add-Scout dialog
Snitcher__Security__FrameAncestors(unset)CSP frame-ancestors allowlist for the whole origin (admin UI included). Unset = framing denied (DENY / 'none'). Accepts a space-separated origin list, 'self', or a wildcard. See Framing
Snitcher__Security__StatusPageFrameAncestors(unset)Same, but scoped to only the public status pages (/status/*); the admin control plane stays denied. Falls back to Snitcher__Security__FrameAncestors when unset
Snitcher__FirstScout__RegistrationKey(unset)Config-driven first Scout's reusable, non-expiring registration key (read-only Scout). Bridged from the Scout's SCOUT__RegistrationKey in the bundled compose
Snitcher__FirstScout__ScoutId(unset)Config-driven first Scout's Scout ID (GUID); must match the Scout's SCOUT__ScoutId
Snitcher__FirstScout__Namescout-1Config-driven first Scout name
Snitcher__FirstScout__LocationlocalConfig-driven first Scout location
Snitcher__Ui__LoginMessage(unset)Free-text message shown on the login page between the title and the credential inputs (plain text; line breaks preserved). Unset/blank = no message.
Smtp__Host / Smtp__Portmailpit / 1025SMTP relay for alert email
Smtp__UseStartTlsfalseSTARTTLS (port 587)
Smtp__FromAddress / Smtp__FromNamesnitcher@localhost / SnitcherSender identity
Seed__DemoDatafalseSeed demo targets/alerts on startup (idempotent)

Scout key rotation (Settings → Scout Key Rotation)

Global policy, not per-Scout — editable in the UI, or via GET/PUT /api/settings/scout-key-rotation.

SettingDefaultDescription
Rotation interval7 daysRotate a trusted, online Scout's key once it's older than this
Retry delay1 hourWait this long before re-attempting an unacknowledged rotation while the Scout stays online (a reconnect always retries immediately, independent of this)
Max key age30 daysA key older than this without a successful rotation flips the Scout to Untrusted; connects are refused until it's re-enrolled

OIDC / SSO

VariableExampleDescription
Oidc__EnabledtrueEnable SSO (accept OIDC tokens alongside the local admin)
Oidc__MetadataAddresshttp://keycloak:8080/realms/snitcher/.well-known/openid-configurationInternal discovery URL the server fetches JWKS/metadata from
Oidc__Issuerhttp://localhost:8081/realms/snitcherExternal issuer the browser obtains tokens from
Oidc__Authorityhttp://localhost:8081/realms/snitcherExternal authority the SPA redirects to
Oidc__ClientIdsnitcher-webPublic client id used by the SPA

Scout agent

VariableDescription
SCOUT__URLSnitcher server URL the Scout dials out to
SCOUT__ScoutIdScout ID (GUID) from the UI; identifies which Scout row this agent's key belongs to
SCOUT__RegistrationKeyOne-time (or, for config-managed Scouts, reusable) registration key — authenticates first public-key registration only
SCOUT__KeyEncryptionKeyAES-GCM-256 key (base64, 32 bytes) encrypting the stored Ed25519 private key. Required once the Scout has registered an identity
SCOUT__KeyEncryptionKey_FILEPath to a file (e.g. a Docker secret) holding the key encryption key; takes precedence over SCOUT__KeyEncryptionKey
SCOUT__Database__ProviderSqlite (default, zero-config) or Postgres
SCOUT__Database__ConnectionStringConnection string for the Scout's local identity store (default Data Source=/data/scout.db)
SCOUT__NAMEDisplay name
SCOUT__LOCATIONLocation label
SCOUT__ReconnectIntervalSecondsFixed reconnect interval (default 10)
SCOUT__ResultRetentionHoursRetention window (hours) for durably-queued check results before the eviction sweep deletes them, delivered or not (default 24; minimum effective value 1)

Permissions

Permissions are (Action, ResourceType[, Scope]), assigned to groups:

Resource typeActionsScoping
DashboardRead
TargetCreate · Read · Update · DeleteAll / by Label / by Resource ID
ScoutCreate · Read · Update · DeleteAll / by Label
AlertingCreate · Read · Update · DeleteAll / by Label
StatusPageCreate · Read · Update · DeleteAll
GroupCreate · Read · Update · DeleteAll
UserCreate · Read · Update · DeleteAll
AuditLogReadAll
SettingsRead · UpdateAll

Built-in groups: Administrators (every permission, immutable), Operators (view everything + manage targets/scouts/alerting, no user/group admin), Viewers (read-only). See Users & Groups.

Data retention

Check results live in a TimescaleDB hypertable with continuous aggregates chained at increasing resolution; each tier is independently configurable:

TierDefault retentionSource
Raw7 daysHypertable
1-minute30 daysContinuous aggregate
5-minute90 daysContinuous aggregate
15-minute180 daysContinuous aggregate
1-hour365 daysContinuous aggregate
1-day1825 days (5y) — or indefiniteContinuous aggregate

Coarser tiers must be kept at least as long as finer ones. The 1-day tier can be set to "keep forever"; Settings → Data Retention shows a live storage estimate (per-target and total) with a growth-per-year projection when it is. Audit-log retention is configured independently (default 2 years) — see Auditing.

Check types

TypeHighlights
HTTP/HTTPSExpected status codes/ranges, keyword & JSON-path assertions, custom method/headers/body, Basic/Bearer auth, redirect control, TLS cert capture + expiry alerts, degraded-latency threshold
TCPConnection check, optional TLS/STARTTLS, send string + expect/expect-not patterns
ICMPPing with packet count/size/TTL and packet-loss threshold (--cap-add=NET_RAW on the Scout)

Common options: check interval, timeout, retries, IP version, and inverted mode (swap Up/Down for firewalled ports).

Alert types

ScoutDown, ScoutUp, ResourceDown, ResourceRecovered, ResourceDegraded, ClockSkewWarning, CertExpiring, IncidentEvent, KeyRotationFailed, ScoutUntrusted.

Alert rules can be scoped to a specific resource and gated by a persistence threshold — N consecutive failures or a continuous duration. KeyRotationFailed and ScoutUntrusted are system-level (always unscoped) — see Scouts & Provisioning.