# ============================================================================= # SIEM Docker Stack — Environment Configuration # ============================================================================= # Copy this file to .env in the docker/ directory (or repo root for # 03-deploy.sh) and customize ALL values below. # # cp .env.example .env # nano .env # # NEVER commit .env to version control — it contains credentials. # ============================================================================= # ── Container engine (optional) ─────────────────────────────────────────────── # Which engine the helper scripts run: docker (default) or podman. Nothing else # is accepted. Read from the environment (and from this file by 05-verify.sh and # 08b-init-opensearch-security.sh). See docs/container-engine.md. # CONTAINER_ENGINE=docker # ── Required secrets ────────────────────────────────────────────────────────── # REQUIRED. Every password below ships empty on purpose, and there is no usable # default: docker compose refuses to start while one is unset, and # scripts/check-env.sh rejects empty values and placeholders (your_*, <...>, # example*, placeholder*, xxx*, admin, password and the old well-known # defaults). Run `bash scripts/check-env.sh .env` before `docker compose up`. # See README, "Required secrets", for what each one protects. # ── Network exposure ────────────────────────────────────────────────────────── # Published ports bind to loopback unless you say otherwise. Docker-published # ports bypass UFW, so these addresses are the real control. # BIND_ADDR web UIs and APIs (OpenSearch, Dashboards, Grafana, # Prometheus, Wazuh API/indexer/dashboard) # INGEST_BIND_ADDR log intake from other hosts (syslog 514, Logstash 5140 # and 5044, Wazuh 1514/1515, InfluxDB 8086). On loopback, # firewalls, sensors and agents on other hosts cannot # reach the stack. # PORTAINER_BIND_ADDR Portainer (opt-in: docker compose --profile portainer up -d portainer) # Set one interface address (not 0.0.0.0 unless you mean it), e.g. 192.0.2.10 # BIND_ADDR=127.0.0.1 # INGEST_BIND_ADDR=127.0.0.1 # PORTAINER_BIND_ADDR=127.0.0.1 # scripts/02-bootstrap.sh opens NO ufw ports unless this is set (a CIDR, e.g. 192.0.2.0/24): # SIEM_ALLOWED_CIDR= # ── Network ─────────────────────────────────────────────────────────────────── # IP address of your SIEM server (used for Grafana root URL, etc.) SIEM_HOST=10.0.0.100 # Your username on the SIEM server (for SSH deployments) SIEM_USER=siem # Timezone for containers that honor TZ (e.g. crowdsec) TZ=UTC # ── Image Versions ──────────────────────────────────────────────────────────── # These default to "latest" to preserve existing behavior, but pinning specific # versions is strongly recommended — especially before enabling the unattended # weekly `docker compose pull` timer (see docs/maintenance.md), which would # otherwise auto-apply breaking major upgrades. # GRAFANA_VERSION=latest # PROMETHEUS_VERSION=latest # SYSLOG_NG_VERSION=latest # UNPOLLER_VERSION=latest # CROWDSEC_VERSION=latest # ── OpenSearch ──────────────────────────────────────────────────────────────── OPENSEARCH_VERSION=2.19.0 OPENSEARCH_PORT=9200 OPENSEARCH_DASHBOARDS_PORT=5601 # Security plugin credentials (Phase F1) — CHANGE ALL FOUR before deploying. # Applied by scripts/08b-init-opensearch-security.sh (bcrypt-hashed into # docker/opensearch/security/internal_users.yml). Avoid $ in passwords. # admin — full cluster admin (scripts, ISM, snapshots, dashboards login) # logstash — write-only ingest user for Logstash pipelines # readonly — Grafana datasources + elasticsearch-exporter # dashboards — kibanaserver service user for OpenSearch Dashboards OPENSEARCH_ADMIN_PASSWORD= OPENSEARCH_LOGSTASH_PASSWORD= OPENSEARCH_READONLY_PASSWORD= OPENSEARCH_DASHBOARDS_PASSWORD= # JVM heap per node — should be ≤50% of available RAM, split across nodes. # Example for 64GB total: hot=12g, warm=4g, wazuh-indexer=4g (20g JVM total) OPENSEARCH_HOT_HEAP=12g OPENSEARCH_WARM_HEAP=4g # ── Logstash ────────────────────────────────────────────────────────────────── LOGSTASH_HEAP=2g LOGSTASH_UDP_PORT=5140 LOGSTASH_BEATS_PORT=5044 # ── Grafana ─────────────────────────────────────────────────────────────────── GRAFANA_PORT=3000 GRAFANA_ADMIN_USER=admin GRAFANA_ADMIN_PASS= # ── InfluxDB ────────────────────────────────────────────────────────────────── INFLUXDB_PORT=8086 INFLUXDB_DB=pfsense # HTTP auth (Phase F1) — CHANGE before deploying. Existing deployments must # create this admin user BEFORE the auth flip (see docs/phase-f-testing.md). # Remote Telegraf/unifi-poller writers need these credentials too. INFLUXDB_ADMIN_USER=admin INFLUXDB_ADMIN_PASSWORD= # Least-privilege accounts created on each influxdb start. Grafana and # unifi-poller no longer receive the admin credentials above. # Grafana reads (pfsense, unpoller, telegraf); unifi-poller writes (unpoller) GRAFANA_INFLUX_PASSWORD= UNPOLLER_INFLUX_PASSWORD= # GRAFANA_INFLUX_USER=grafana_ro # UNPOLLER_INFLUX_USER=unpoller_wo # ── Prometheus ──────────────────────────────────────────────────────────────── PROMETHEUS_PORT=9090 PROMETHEUS_RETENTION=365d # Prometheus OTLP receiver (separate instance, see docs/prometheus-otlp.md). # Five accounts (three here, two on the SIEM Prometheus) so each can be rotated or revoked on its own. Set strong unique # values, then run: sudo -E scripts/render-prometheus-web-config.sh PROMETHEUS_OTLP_SENDER_PASSWORD= PROMETHEUS_OTLP_GRAFANA_PASSWORD= PROMETHEUS_OTLP_SCRAPE_PASSWORD= # Accounts on the SIEM Prometheus itself (basic auth is on there too) PROMETHEUS_GRAFANA_PASSWORD= PROMETHEUS_SELF_PASSWORD= # Loopback until you widen it to one interface address. The receiver must be # authenticated and firewalled to approved senders first. # PROMETHEUS_OTLP_BIND_ADDR=127.0.0.1 # PROMETHEUS_OTLP_PORT=9091 # PROMETHEUS_OTLP_RETENTION=30d # Disk bound for pushed data on the shared hot tier (time retention alone is not enough) # PROMETHEUS_OTLP_RETENTION_SIZE=5GB # PROMETHEUS_OTLP_MEM_LIMIT=2g # Passwords: at most 72 bytes, no dollar sign. # ── Alertmanager (Phase F3) ────────────────────────────────────────────────── # Bound to 127.0.0.1 on the SIEM host. Pin the image version before enabling # unattended pulls. # ALERTMANAGER_VERSION=v0.27.0 # ALERTMANAGER_PORT=9093 # ES_EXPORTER_VERSION=v1.7.0 # NODE_EXPORTER_VERSION=v1.12.1 # only with --profile node-exporter # n8n webhook that receives Alertmanager notifications. Alertmanager cannot # read env vars — after changing this, re-render the config: # bash scripts/render-alertmanager-config.sh /opt/siem && docker compose restart alertmanager # N8N_ALERTMANAGER_WEBHOOK_URL=http://n8n/webhook/alertmanager-siem # ── Wazuh ───────────────────────────────────────────────────────────────────── WAZUH_VERSION=4.9.2 WAZUH_MANAGER_PORT=1514 WAZUH_API_PORT=55000 WAZUH_INDEXER_PORT=9202 WAZUH_DASHBOARD_PORT=443 WAZUH_INDEXER_HEAP=4g # Set strong unique values before first start (required; no default). WAZUH_INDEXER_PASSWORD= WAZUH_API_USER=wazuh-wui WAZUH_API_PASSWORD= # kibanaserver account the Wazuh dashboard uses on the Wazuh indexer. After # setting it, run change-passwords.sh and enter the same value at the # kibanaserver prompt, or the dashboard cannot reach the indexer. WAZUH_DASHBOARD_PASSWORD= # Read-only account Grafana uses on the Wazuh indexer. Create it once the # indexer is up with: bash scripts/11-wazuh-grafana-readonly.sh # (re-run it after any recreate of the wazuh-indexer container), then # docker compose up -d grafana. WAZUH_GRAFANA_RO_PASSWORD= # WAZUH_GRAFANA_RO_USER=grafana_ro # ── Syslog ──────────────────────────────────────────────────────────────────── SYSLOG_UDP_PORT=514 SYSLOG_TCP_PORT=514 # ── UniFi Poller (Optional) ────────────────────────────────────────────────── # Remove or leave empty if you don't use UniFi networking equipment. UNIFI_URL=https://unifi.example.com UNIFI_USER=unpoller UNIFI_PASS= UNIFI_INFLUXDB=unpoller # ── pfSense Integration ────────────────────────────────────────────────────── # IP of your pfSense router (for documentation / syslog-ng filter reference) PFSENSE_HOST=10.0.0.1 # ── NVIDIA GPU Monitoring ──────────────────────────────────────────────────── # IPs of machines running GPU exporters. Used in docs/gpu-monitoring.md. # Linux machines run dcgm-exporter on port 9400. # Windows machines run nvidia_gpu_exporter on port 9835. # Set these to your GPU hosts (used by docs/gpu-monitoring.md; Prometheus targets # now live in docker/prometheus/targets/*.json) # GPU_WORKSTATION_IP= # GPU_WINDOWS_STREAMING_IP= # GPU_LLM_SERVER_IP= # GPU_TRANSCODE_SERVER_IP= # ── JumpCloud IdP (Optional) ────────────────────────────────────────────────── # Read-only API key with Directory Insights access. # Recommended: store in Doppler instead of here. # JUMPCLOUD_API_KEY=your-read-only-api-key # JUMPCLOUD_ORG_ID= # Multi-tenant orgs only # JUMPCLOUD_POLL_SECONDS=300 # JUMPCLOUD_SERVICES=all # directory,sso,radius,ldap,systems,software,mdm,alerts,all # JUMPCLOUD_OUTPUT_FILE=/var/log/jumpcloud_events.jsonl # JUMPCLOUD_STATE_FILE=/var/lib/jumpcloud_bridge/cursor.json # ── Doppler Secrets Manager (Recommended) ──────────────────────────────────── # If Doppler CLI is installed and configured, the JumpCloud bridge (and future # integrations) will pull secrets from Doppler first, falling back to env vars. # See: https://docs.doppler.com/docs/cli # DOPPLER_PROJECT=siem-stack # DOPPLER_CONFIG=production # ── Notifications (Optional) ───────────────────────────────────────────────── # Configure for health check and update notifications. # Supports Discord webhooks, Matrix, or any HTTP endpoint. # DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your-webhook-url # MATRIX_HOMESERVER=https://matrix.example.com # MATRIX_ROOM_ID=!your-room:matrix.example.com # MATRIX_ACCESS_TOKEN=your-access-token # Update alerting (docs/update-alerting.md). REQUIRED and non-empty: compose # refuses to start without it. Shared secret Grafana sends to the n8n router # webhook (header auth); generate it with `openssl rand -base64 32` and keep it # in Doppler (project homelab, config prd_network), never in this file. The # same value goes into the n8n Header Auth credential grafana-webhook-auth. # Pushover settings are constants in the n8n Code node, not environment values. # GRAFANA_WEBHOOK_SECRET= # Expiry watch router credential (docs/expiry-watch.md, "The router credential"). # Read by the n8n CONTAINER (its environment, not this stack's compose file); listed # here only so you know the name. The expiry watch posts to its own router endpoint # and the router compares the Authorization header with this value. Unset or empty # denies every call to that endpoint. Generate with `openssl rand -base64 32`, keep # it in your secret manager, never in this file. The watch sends the same value as # EXPIRY_WATCH_ROUTER_TOKEN. # EXPIRY_WATCH_ROUTER_SECRET= # Alert path heartbeat (docs/heartbeat.md). These two are read by the n8n # CONTAINER (its environment, not this stack's compose file), so they are listed # here only so you know the names. Off when unset. The ping URL is a secret: # keep it in your secret manager, never in this file. HEARTBEAT_KIND is # healthchecks (default) or uptimekuma. # HEARTBEAT_PING_URL= # HEARTBEAT_KIND=healthchecks # Second P1 channel by email (docs/channel-redundancy.md). Read by the GRAFANA # container, and only after you pass them to the grafana service in compose and # copy the example provisioning files. Off when empty. Values live in your secret # manager (Doppler dev config first); never put real values in this file. # GF_SMTP_ENABLED= # GF_SMTP_HOST= # GF_SMTP_USER= # GF_SMTP_PASSWORD= # GF_SMTP_FROM_ADDRESS= # GF_SMTP_STARTTLS_POLICY= # P1_EMAIL_TO= # Weekly digest (docs/weekly-digest.md). Names only; values live in your secret # manager. The read-only Grafana service account token and the SMTP login. # WEEKLY_DIGEST_GRAFANA_TOKEN= # WEEKLY_DIGEST_SMTP_USER= # WEEKLY_DIGEST_SMTP_PASSWORD= # Third P1 path to Matrix through a relay you run (docs/channel-redundancy.md, issue # #147). Read by the GRAFANA container only after you pass them to the grafana service # in compose and copy the example provisioning files. The Matrix access token is NOT # here: it belongs to the relay (MATRIX_ACCESS_TOKEN in the relay's environment). # Values live in your secret manager (Doppler dev config first); never here. # P1_MATRIX_RELAY_URL= # P1_MATRIX_RELAY_TOKEN=