Configuration Reference Guide
FlowGuard Lite uses a single configuration file (config.yaml) to adjust ports, networks, storage parameters, and outbound integrations.
Behavioral detections that depend on local clock time use the process timezone. In Docker, set the standard TZ environment variable (for example Europe/Madrid) to match the monitored network.
Modeline & Autocomplete
To get live schema validation and autocompletion in IDEs like VS Code or GoLand, prepend the following line to your config.yaml:
# yaml-language-server: $schema=https://raw.githubusercontent.com/miquelbar/flowguard-lite/main/docs/config.schema.json
Configuration Schema
Below is a complete config.yaml reference containing default parameters:
# The web server port for the dashboard UI and JSON API
port: "8080"
# UDP listening port for incoming NetFlow (v5/v9) and IPFIX telemetry
netflow_port: 2055
# UDP listening port for incoming sFlow telemetry
sflow_port: 6343
# Optional local interface for passive packet-to-flow capture. Empty disables it.
capture_interface: ""
# Kernel BPF filter applied before passive packets enter FlowGuard
capture_bpf_filter: "ip or ip6"
# Enable only when traffic visibility requires promiscuous interface capture
capture_promiscuous: false
# Optional UniFi CyberSecure Activity Logging/SIEM syslog collector.
# Disabled by default. Use host port mapping if UniFi must send to 514/udp.
unifi_syslog_enabled: false
unifi_syslog_port: 5514
unifi_syslog_allowed_ips: []
# Directory where database shards, evidence, and logs will be written
storage_dir: "/data"
# Storage backend engine: "sqlite" (default shards) or "duckdb" (experimental single file analytics)
storage_backend: "sqlite"
# List of local CIDR subnets representing internal devices.
# FlowGuard Lite relies on this list to profile local vs. external IP addresses.
local_subnets:
- "192.168.1.0/24"
- "10.0.0.0/8"
# Log level verbosity: "debug", "info", "warn", or "error"
log_level: "info"
# Execution environment profile: "production" or "development"
environment: "production"
# Slack/Discord Incoming Webhook URL used by notification rules with channel target "slack"
slack_webhook_url: "https://example.com/slack-webhook"
# Generic JSON webhook URL used by notification rules with channel target "webhook"
webhook_url: "https://automation.example.local/flowguard-alerts"
# Legacy generic webhook formatter. New Slack routing uses slack_webhook_url directly.
webhook_format: "generic"
# Optional custom headers for generic webhook requests
webhook_headers: {}
# Telegram Bot API channel used by notification rules with channel target "telegram"
telegram_enabled: false
telegram_token: ""
telegram_chat_id: ""
# Flag tracking first-run wizard completion status
first_run_completed: true
# Local admin password hash generated by first-run access setup.
# Never place a plaintext password here.
admin_password_hash: ""
# Random session secret generated by first-run access setup
session_secret: ""
# Data retention in days for historical databases (pruned daily)
retention_days: 7
# Global alert noise controls
disabled_anomaly_types: []
muted_anomaly_subnets: []
notify_allowed_subnets: []
notify_suppressed_types: []
# Behavioral detector sensitivity
new_destination_min_history_buckets: 12
beacon_min_observations: 12
beacon_min_interval_seconds: 90
traffic_spike_min_packets: 2500
traffic_spike_min_bytes: 1048576
# Global Volumetric DDoS heuristic triggers (experimental)
ddos_threshold_pps: 5000
ddos_threshold_bps: 10485760
ddos_threshold_fps: 1000
syn_flood_threshold_pps: 1000
udp_flood_threshold_pps: 3000
icmp_flood_threshold_pps: 500
# Optional Suricata eve.json telemetry file path
suricata_eve_path: ""
Configuration Parameter Details
port
- Type: String
- Default:
"8080" - Description: The port the HTTP server binds to. Provides both the SPA web dashboard and REST analytics endpoints.
netflow_port
- Type: Integer
- Default:
2055 - Description: UDP port where the NetFlow/IPFIX worker pool listens. Set to
0to disable the NetFlow collector.
sflow_port
- Type: Integer
- Default:
6343 - Description: UDP port where the sFlow worker pool listens. Set to
0to disable the sFlow collector.
unifi_syslog_enabled
- Type: Boolean
- Default:
false - Description: Enables the dedicated UniFi CyberSecure Activity Logging/SIEM syslog collector. This is a separate protocol from NetFlow/IPFIX and must not use the NetFlow port. The collector parses bounded syslog messages, stores reduced retained UniFi evidence, and can create anomalies for high-confidence security detections and critical events. Note that this integration is experimental and has limited real-world utility.
unifi_syslog_port
- Type: Integer
- Default:
5514 - Description: UDP app port reserved for UniFi SIEM/syslog ingest. Use an unprivileged app port by default; if UniFi requires destination port
514, map host514/udpto the app port in Docker or with host firewall/NAT rules. Set to0only whenunifi_syslog_enabledis false.
unifi_syslog_allowed_ips
- Type: Array of strings
- Default:
[] - Description: Optional allowlist of UniFi gateway sender IPs or CIDR ranges. Values are bounded and validated as IP addresses or CIDRs. Empty means any sender can reach the configured UDP port, so active deployments should prefer a gateway IP/CIDR allowlist and firewall rules.
capture_interface
- Type: String
- Default:
""(disabled) - Description: Local interface used for passive packet capture, such as
eth0oren0. When enabled, FlowGuard reduces TCP and UDP packets to bounded 5-tuple flow counters. It does not persist payload bytes or PCAP data. The process needs permission to open a packet capture device.
capture_bpf_filter
- Type: String
- Default:
"ip or ip6" - Description: Berkeley Packet Filter applied by libpcap in the kernel. Invalid filters prevent capture startup. Use a restrictive filter where possible to reduce CPU load.
capture_promiscuous
- Type: Boolean
- Default:
false - Description: Requests promiscuous mode from libpcap. Leave disabled unless the selected interface receives traffic addressed to other hosts and the deployment has explicitly granted the required raw-packet privileges.
These values are also available in Settings → Collectors Setup → Passive Network Capture. Saving capture changes persists them to the YAML configuration but does not re-open packet devices in the running process; restart the FlowGuard daemon after changing the interface, BPF filter, or promiscuous mode. The UI keeps capture disabled when the interface is empty and warns before enabling options that require raw-packet privileges.
storage_dir
- Type: String
- Default:
"/data" - Description: Base folder on the host system where databases are stored. If running SQLite, shards are created daily under this path (e.g.
/data/flowguard_2026-07-04.db).
storage_backend
- Type: String
- Allowed Values:
"sqlite","duckdb" - Default:
"sqlite" - Description: Database engine. Choose
sqlitefor standard low-CPU homelab usage, orduckdb(experimental) for heavy multi-day analytical queries.
local_subnets
- Type: Array of Strings
- Description: CIDR definitions for internal address space. Traffic flowing within or originating from these networks is profiled to discover device behaviors and baselines.
slack_webhook_url
- Type: String
- Description: Slack Incoming Webhook or Discord Slack-compatible webhook URL. Notification rules with channel target
slackdispatch formatted text payloads to this endpoint.
webhook_url
- Type: String
- Description: Generic outbound webhook destination URL. Notification rules with channel target
webhookdispatch raw anomaly JSON to this endpoint.
webhook_format
- Type: String
- Allowed Values:
"generic","slack","telegram" - Description: Legacy payload formatting value retained for compatibility. New routing uses
slack_webhook_urlfor Slack/Discord,webhook_urlfor generic JSON, and Telegram bot settings for Telegram.
webhook_headers
- Type: Object / map of strings
- Default:
{} - Description: Optional custom HTTP headers sent with outbound webhook requests. Use this for webhook authentication headers such as
AuthorizationorX-Webhook-Token. Header values may contain secrets and are not written to logs.
telegram_enabled
- Type: Boolean
- Default:
false - Description: Enables the Telegram Bot channel for notification rules that target
telegram. The bot token and chat ID must also be configured.
telegram_token
- Type: String
- Default:
"" - Description: Telegram Bot API token generated by BotFather. Treat it as a secret. If it is exposed, revoke it in BotFather and generate a replacement.
telegram_chat_id
- Type: String
- Default:
"" - Description: Telegram destination chat ID. Send
/startto the bot, then callhttps://api.telegram.org/bot<TOKEN>/getUpdatesand copymessage.chat.id. For groups/channels, add the bot first and use the group/channelchat.id, often a negative number.
first_run_completed
- Type: Boolean
- Description: Tracks whether setup has been completed. If set to
false, the UI shows the step-by-step onboarding wizard.
admin_password_hash
- Type: String
- Default:
"" - Description: PBKDF2-SHA256 hash for the local admin password. It is generated by the UI/API setup flow and must never contain a plaintext password.
session_secret
- Type: String
- Default:
"" - Description: Random secret generated for session management. Treat it as sensitive configuration.
retention_days
- Type: Integer
- Default:
7 - Allowed Range:
1to60 - Description: Number of days to retain database flow events, aggregates, and evidence records before pruning them. Values above 60 are rejected to preserve bounded storage on small hardware.
disabled_anomaly_types
- Type: Array of strings
- Default:
[] - Description: Alert types that should not be created by behavioral/DDoS detectors. Use this only for globally unwanted detections; prefer notification rules or policies when evidence should still be stored.
muted_anomaly_subnets
- Type: Array of CIDR strings
- Default:
[] - Description: Source subnets for which behavioral/DDoS anomaly creation is skipped. This is useful for approved noisy VLANs such as lab, guest, or IoT networks. Empty means all local subnets are eligible.
notify_allowed_subnets
- Type: Array of CIDR strings
- Default:
[] - Description: Optional global notification allowlist. When set, Slack, Telegram, and generic webhook dispatch only occurs for anomalies whose source IP is inside one of these CIDRs. Anomalies outside the list remain stored.
notify_suppressed_types
- Type: Array of strings
- Default:
[] - Description: Alert types that are persisted but never dispatched to Slack, Telegram, or generic webhooks. Use this to keep evidence while avoiding real-time noise.
new_destination_min_history_buckets
- Type: Integer
- Default:
12 - Allowed Range:
1to10080 - Description: Number of retained one-minute source buckets required before
NEW_DESTINATIONandNEW_PORTdetections become active for that source.
beacon_min_observations
- Type: Integer
- Default:
12 - Allowed Range:
3to60 - Description: Number of periodic observations required before
BEACONINGcan alert.
beacon_min_interval_seconds
- Type: Integer
- Default:
90 - Allowed Range:
1to86400 - Description: Minimum interval between beacon observations. Raising it suppresses common one-minute cloud keepalives.
traffic_spike_min_packets
- Type: Integer
- Default:
2500 - Description: Minimum packets per one-minute source bucket before packet-count
TRAFFIC_SPIKEstatistical checks can alert.
traffic_spike_min_bytes
- Type: Integer
- Default:
1048576 - Description: Minimum bytes per one-minute source bucket before byte-volume
TRAFFIC_SPIKEstatistical checks can alert.
ddos_threshold_pps
- Type: Integer
- Default:
5000 - Description: Volumetric packets-per-second threshold for triggering global DDoS alert signals.
ddos_threshold_bps
- Type: Integer
- Default:
10485760(10 MB/s) - Description: Volumetric bytes-per-second threshold for triggering global DDoS alert signals.
ddos_threshold_fps
- Type: Integer
- Default:
1000 - Description: Volumetric flow-records-per-second threshold for triggering global DDoS alert signals against a local victim.
syn_flood_threshold_pps
- Type: Integer
- Default:
1000 - Description: Packets-per-second threshold for TCP SYN Flood anomaly detection.
udp_flood_threshold_pps
- Type: Integer
- Default:
3000 - Description: Packets-per-second threshold for UDP Flood anomaly detection.
icmp_flood_threshold_pps
- Type: Integer
- Default:
500 - Description: Packets-per-second threshold for ICMP Flood anomaly detection.
suricata_eve_path
- Type: String
- Default:
"" - Description: Local file path to read Suricata
eve.jsonalerts from.
Environment Variable Overrides
Any parameter can be overridden using environment variables prefixed with FLOWGUARD_. This is highly useful in Docker setups:
FLOWGUARD_PORToverridesportFLOWGUARD_NETFLOW_PORToverridesnetflow_portFLOWGUARD_SFLOW_PORToverridessflow_portFLOWGUARD_CAPTURE_INTERFACEoverridescapture_interfaceFLOWGUARD_CAPTURE_BPF_FILTERoverridescapture_bpf_filterFLOWGUARD_CAPTURE_PROMISCUOUSoverridescapture_promiscuousFLOWGUARD_UNIFI_SYSLOG_ENABLEDoverridesunifi_syslog_enabledFLOWGUARD_UNIFI_SYSLOG_PORToverridesunifi_syslog_portFLOWGUARD_UNIFI_SYSLOG_ALLOWED_IPSoverridesunifi_syslog_allowed_ipsusing comma-separated IPs/CIDRsFLOWGUARD_STORAGE_DIRoverridesstorage_dirFLOWGUARD_STORAGE_BACKENDoverridesstorage_backendFLOWGUARD_LOG_LEVELoverrideslog_levelFLOWGUARD_SLACK_WEBHOOK_URLoverridesslack_webhook_urlFLOWGUARD_WEBHOOK_URLoverrideswebhook_urlFLOWGUARD_WEBHOOK_FORMAToverrideswebhook_formatFLOWGUARD_WEBHOOK_HEADERSoverrideswebhook_headersusing a JSON object, for example{"Authorization":"Bearer token"}FLOWGUARD_TELEGRAM_ENABLEDoverridestelegram_enabledFLOWGUARD_TELEGRAM_TOKENoverridestelegram_tokenFLOWGUARD_TELEGRAM_CHAT_IDoverridestelegram_chat_idFLOWGUARD_ADMIN_PASSWORD_HASHoverridesadmin_password_hashFLOWGUARD_SESSION_SECREToverridessession_secretFLOWGUARD_RETENTION_DAYSoverridesretention_daysFLOWGUARD_DDOS_THRESHOLD_PPSoverridesddos_threshold_ppsFLOWGUARD_DDOS_THRESHOLD_BPSoverridesddos_threshold_bpsFLOWGUARD_DDOS_THRESHOLD_FPSoverridesddos_threshold_fpsFLOWGUARD_DISABLED_ANOMALY_TYPESoverridesdisabled_anomaly_typesFLOWGUARD_MUTED_ANOMALY_SUBNETSoverridesmuted_anomaly_subnetsFLOWGUARD_NOTIFY_ALLOWED_SUBNETSoverridesnotify_allowed_subnetsFLOWGUARD_NOTIFY_SUPPRESSED_TYPESoverridesnotify_suppressed_typesFLOWGUARD_NEW_DESTINATION_MIN_HISTORY_BUCKETSoverridesnew_destination_min_history_bucketsFLOWGUARD_BEACON_MIN_OBSERVATIONSoverridesbeacon_min_observationsFLOWGUARD_BEACON_MIN_INTERVAL_SECONDSoverridesbeacon_min_interval_secondsFLOWGUARD_TRAFFIC_SPIKE_MIN_PACKETSoverridestraffic_spike_min_packetsFLOWGUARD_TRAFFIC_SPIKE_MIN_BYTESoverridestraffic_spike_min_bytesFLOWGUARD_SYN_FLOOD_THRESHOLD_PPSoverridessyn_flood_threshold_ppsFLOWGUARD_UDP_FLOOD_THRESHOLD_PPSoverridesudp_flood_threshold_ppsFLOWGUARD_ICMP_FLOOD_THRESHOLD_PPSoverridesicmp_flood_threshold_ppsFLOWGUARD_SURICATA_EVE_PATHoverridessuricata_eve_path