All chapters

Configuration

Huntress reads appsettings.json shipped with the release, then the files in the configuration folder (appsettings.Production.json), then environment variables. Later sources win. Put your changes in the configuration folder so updates never overwrite them.

Where to set things#

  • A file. appsettings.Production.json in the configuration folder, in the same JSON shape as the shipped file.
  • An environment variable. Replace each : with __: Registration:InvitationKey becomes Registration__InvitationKey. On Linux the service reads /etc/huntress/huntress.env.
  • HUNTRESS_DATA_DIR and HUNTRESS_CONFIG_DIR (environment only) place the data and configuration folders. Both default to the install folder in a flat install.
  • Relative paths in settings resolve against the install folder, never the working directory.
Secrets (the SMTP password, the invitation key, update tokens) belong in the configuration folder or the environment, never in the shipped appsettings.json.

Core#

Core settings
SettingDefaultPurpose
AppBaseUrlemptyThe public address, for example https://huntress.example.com. Required in production: reset links, Pulse links and passkey origins are built from it.
AllowedHosts*The host names the server answers to.
ConnectionStrings:DefaultConnectionData Source=huntress.dbThe database file.
BlobStorage:Pathblobs.dbThe picture store.
DataProtection:KeysPathkeysWhere the signing keys are kept; must survive restarts.
ForwardedHeaders:KnownProxies, KnownNetworksemptyProxies trusted to set X-Forwarded-For and -Proto. Loopback is always trusted.
Registration:InvitationKeyemptySelf-service sign-up key. Registration is closed while empty.
System:AdminTenantId1The organisation whose Owners and Admins administer the installation.
RawRequests:EnabledtrueStore every inbound payload with its source address.

Mail#

Mail settings
SettingDefaultPurpose
Notifications:Smtp:HostemptyThe outgoing mail server. Empty disables sending: rule e-mails and password resets are skipped.
Notifications:Smtp:Port465Its port.
Notifications:Smtp:EnableSsltrueUse TLS.
Notifications:Smtp:From, Username, PasswordemptySender and credentials.

Listeners#

Listener settings
SettingDefaultPurpose
HuntressMqtt:Enabled, Porttrue, 1883The MQTT broker.
HuntressSmtp:Enabled, Port, MaxMessageBytestrue, 25, 10485760The SMTP receiver.
HuntressTcp:Enabled, SiaPort, CidPorttrue, 2000, 2001SIA DC-09 and Contact ID.

Data and retention#

Retention settings
SettingDefaultPurpose
Retention:EventDays90Readings, events, person events, raw requests, rule firings.
Retention:ImageDays30Pictures and detections.
Retention:ResolvedIncidentDays365Resolved incidents.
Retention:ClipDays30Video clips.

Cameras, detection and clips#

Camera settings
SettingDefaultPurpose
Snapshots:ArchiveIntervalSeconds30How often a live camera's picture is stored (0 = every picture). Per camera override on its settings page.
LocalEdge:EnabledtrueSet false on a hosted server so it never opens RTSP streams itself.
Detection:EnabledtrueObject detection can be switched on per camera.
Detection:ModelPathbuilt inAnother ONNX model, with its .json sidecar.
Detection:ExecutionProviderAutoAuto, Cpu, Cuda or DirectML; GPU needs Detection:NativeLibraryPath.
Detection:MaxBusyPercent, MinIntervalSeconds, IntraOpThreads50, 2, 0CPU cap, shortest interval, threads (0 = automatic).
Clips:Enabled, Pathtrue, clipsVideo clips and their folder (relative to the data directory).
Clips:MaxClipSeconds120How far later detections may extend a clip (30 to 600).
Clips:MaxRingMegabytes, MaxUploadMegabytes64, 512Pre-roll buffer per local camera; the largest clip an edge may upload.
Clips:MaxTotalGigabytes, MinFreeDiskMegabytes20, 2048Delete the oldest clips above this size (0 = no cap); start no clip below this free space.

Automation#

Automation settings
SettingDefaultPurpose
Rules:TickSeconds30How often time-based rule conditions are evaluated.
Schedules:TickSeconds10How often schedule switches are looked for (1 to 300).
Schedules:CatchUpMinutes5How far back after a restart a missed switch is still handled (0 to 120; 0 = never).
Zigbee:EnabledtrueRun the Zigbee coordinators configured on the Devices page.
Webhooks:AllowedHosts, AllowPrivateAddressesempty, falseExceptions to the outbound policy for rule webhooks.
Outputs:AllowedHosts, AllowPrivateAddresses, Pollingempty, false, trueExceptions for HTTP outputs (a separate policy from webhooks), and whether status addresses are polled. Never allow private addresses on a server shared by organisations that do not trust each other.

API#

API settings
SettingDefaultPurpose
ApiKeys:MaxActivePerTenant20Active keys per organisation.
ApiKeys:RequestsPerMinute120Requests per key per minute.
ApiKeys:FailedAttemptsPerWindow, FailedAttemptWindowMinutes20, 5Failed authentications tolerated per client.
ApiKeys:RequireHttpstrueFalse only for a trusted plain-HTTP setup; behind a proxy it needs ForwardedHeaders to restore the scheme.

Updates#

Update settings
SettingDefaultPurpose
Updates:RoleServerServer or Edge.
Updates:ModeApprove (server), Auto (edge)Off, Approve or Auto.
Updates:Channelstablestable, beta or canary.
Updates:Window02:00-05:00When updates may be installed, HH:mm-HH:mm.
Updates:CheckIntervalMinutes, HealthTimeoutSeconds240, 120Check frequency and the health gate.
Updates:PinVersion, ManifestUrl, AuthToken, KeepReleases—, GitHub channel, —, 3Hold a version, a custom manifest location, a token for a private repository, releases kept.

Edge#

Edge settings
SettingPurpose
HuntressEdge:HuntressUrlThe address of your server.
HuntressEdge:Cameras, ZigbeeGateways, HttpRelaysWhat this edge serves, each with its token and edge secret; see Deployment.
HuntressEdge:Snapshots, ClipsPicture size and quality; clip ring limits.

Logging#

Logging is configured under Serilog. By default: information level, a console sink and a daily file in logs/ with a 14-day, 100 MB limit.

Connection lost
Attempting to reconnect…