pub struct Config {Show 40 fields
pub database_url: String,
pub data_dir: PathBuf,
pub recordings_dir: PathBuf,
pub clips_dir: PathBuf,
pub snapshots_dir: PathBuf,
pub frames_dir: PathBuf,
pub ffmpeg_bin: String,
pub ffprobe_bin: String,
pub mediamtx_api_url: String,
pub mediamtx_hls_base: String,
pub mediamtx_rtsp_base: String,
pub mediamtx_webrtc_base: String,
pub db_max_connections: u32,
pub recorder_enabled: bool,
pub default_segment_seconds: i64,
pub default_retention_hours: i64,
pub indexer_interval_s: u64,
pub health_interval_s: u64,
pub retention_interval_s: u64,
pub api_host: String,
pub api_port: u16,
pub cors_origins: Vec<String>,
pub max_recordings_bytes: u64,
pub min_free_disk_bytes: u64,
pub alert_webhook_url: Option<String>,
pub notifier_interval_s: u64,
pub ai_enabled: bool,
pub ai_max_total_fps: f64,
pub default_ai_fps: f64,
pub default_ai_width: i64,
pub detection_retention_hours: i64,
pub auth_enabled: bool,
pub session_ttl_hours: i64,
pub auth_cookie_secure: bool,
pub bootstrap_admin_user: Option<String>,
pub bootstrap_admin_password: Option<String>,
pub audit_retention_days: i64,
pub overlay_enabled: bool,
pub overlay_kind: String,
pub overlay_iface: Option<String>,
}Expand description
Runtime configuration, loaded from environment (see .env.example).
Fields§
§database_url: String§data_dir: PathBuf§recordings_dir: PathBuf§clips_dir: PathBuf§snapshots_dir: PathBuf§frames_dir: PathBuf§ffmpeg_bin: String§ffprobe_bin: String§mediamtx_api_url: String§mediamtx_hls_base: String§mediamtx_rtsp_base: String§mediamtx_webrtc_base: String§db_max_connections: u32Max SQLite pool connections. Tunable per deployment: more absorbs bursts of concurrent requests (WAL serves reads concurrently; writes still serialize), at the cost of memory.
recorder_enabled: bool§default_segment_seconds: i64§default_retention_hours: i64§indexer_interval_s: u64§health_interval_s: u64§retention_interval_s: u64§api_host: String§api_port: u16§cors_origins: Vec<String>§max_recordings_bytes: u64Soft cap on total recording footprint; oldest unlocked segments are pruned above this.
min_free_disk_bytes: u64Hard floor on free disk space; when free space drops below this, oldest unlocked segments are pruned regardless of age/size policy (protects the host from a full disk).
alert_webhook_url: Option<String>Optional webhook URL that receives warning/critical events as JSON (alerting).
notifier_interval_s: u64How often the alert notifier polls for new events to deliver.
ai_enabled: boolMaster switch for AI frame sampling (Stage 2). Cameras still need an enabled AI task.
ai_max_total_fps: f64Global frame-sampling budget (frames/sec summed across all cameras); per-camera fps is reduced proportionally above this so adding AI cameras degrades fps instead of overloading.
default_ai_fps: f64§default_ai_width: i64§detection_retention_hours: i64How long detection rows are kept before the retention sweeper prunes them.
auth_enabled: boolMaster switch for authentication + RBAC. When false, the API is open (dev/single-tenant LAN appliance default) and a synthetic admin principal is used. When true, the auth/admin surface requires a valid bearer token (session or API key) and enforces roles.
session_ttl_hours: i64Lifetime of an issued login session token.
Add Secure to the session cookie (require HTTPS). Default false for HTTP LAN/overlay
appliances; set true when the deployment is served over TLS.
bootstrap_admin_user: Option<String>Optional first-run admin bootstrap (only used when no users exist yet).
bootstrap_admin_password: Option<String>§audit_retention_days: i64How long kernel audit-log + generic-event rows are kept before retention prunes them.
overlay_enabled: boolWhether this deployment is reached through a WireGuard overlay (Tailscale / NetBird / wireguard) running as an external daemon on the host. The kernel does not manage the overlay; it only reports whether the configured interface is present + up so the dashboard can surface remote-access health. When false, the deployment is LAN-only.
overlay_kind: StringLabel for the overlay in use: tailscale | netbird | wireguard | none.
overlay_iface: Option<String>The overlay’s network interface to probe (e.g. tailscale0, wt0, wg0).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more