Repository navigation
SIEM Server Installation
Manual, step-by-step installation of OpenSearch, Logstash, and Grafana on Ubuntu 24.04 LTS.
This is the bare-metal, single-box path. The recommended server side for this project is siem-docker-stack (Docker, hot/warm tiers, ISM, Wazuh);
setup.shworks against it or any existing OpenSearch + Grafana with no server install at all. Useinstall.sh/ this page when you want everything on one Ubuntu host.
Most users should run
sudo ./install.shinstead. It performs every step on this page (same versions, same paths, same settings) with interactive prompts. This guide is the manual alternative — use it when you want to understand what the installer does, need to adapt a step to your environment, or are recovering a partially installed host. The layout documented here matchesinstall.sh: OpenSearch from the official tarball in/opt/opensearch, Logstash from the Elastic apt repo, Grafana from the Grafana apt repo.
- Ubuntu 24.04 LTS server (tested; 22.04 should work)
- Root or sudo access
- 16 GB RAM minimum, 32 GB recommended (see Hardware Requirements)
- 100 GB+ SSD (500 GB+ for 30-day retention on busy networks)
- Static IP address configured
Versions installed by install.sh and documented here: OpenSearch 2.19.4, Logstash 8.19.7, Grafana 12.3.0.
InfluxDB and Prometheus are not installed by install.sh and are not required for the
Suricata dashboards. They are optional, separate installs used only by the pfSense system /
pfBlockerNG dashboard (see Telegraf pfBlockerNG Setup).
# Update system
sudo apt update && sudo apt upgrade -y
# Install required packages
sudo apt install -y curl wget gnupg2 apt-transport-https software-properties-common \
jq python3 python3-pip net-tools
# Set system limits for OpenSearch
sudo tee -a /etc/security/limits.conf > /dev/null <<EOF
# OpenSearch/Logstash limits
* soft nofile 65536
* hard nofile 65536
* soft memlock unlimited
* hard memlock unlimited
EOF
# Kernel parameters for OpenSearch (install.sh keeps swap but sets swappiness=1)
sudo tee -a /etc/sysctl.conf > /dev/null <<EOF
# OpenSearch requirements
vm.max_map_count=262144
vm.swappiness=1
EOF
sudo sysctl -pOpenSearch bundles its own JDK; Logstash uses the system JDK.
# Install OpenJDK 21
sudo apt install -y openjdk-21-jdk
# Verify installation
java -version# Download and unpack the tarball
cd /tmp
wget https://artifacts.opensearch.org/releases/bundle/opensearch/2.19.4/opensearch-2.19.4-linux-x64.tar.gz
tar -xzf opensearch-2.19.4-linux-x64.tar.gz
sudo mv opensearch-2.19.4 /opt/opensearch
# Dedicated service user
sudo useradd -r -s /bin/bash -d /opt/opensearch opensearch || true
sudo chown -R opensearch:opensearch /opt/opensearch
# Configure OpenSearch (single node, loopback only, security plugin disabled)
sudo tee /opt/opensearch/config/opensearch.yml > /dev/null <<EOF
cluster.name: pfsense-monitoring
node.name: siem-node-1
path.data: /opt/opensearch/data
path.logs: /opt/opensearch/logs
network.host: 127.0.0.1
http.port: 9200
discovery.type: single-node
plugins.security.disabled: true
EOF
# Set heap size: 50% of RAM, capped at 16 GB by install.sh (never exceed 31 GB)
# Example for a 16 GB host:
sudo sed -i 's/-Xms1g/-Xms8g/; s/-Xmx1g/-Xmx8g/' /opt/opensearch/config/jvm.options
# systemd unit (this is what install.sh writes)
sudo tee /etc/systemd/system/opensearch.service > /dev/null <<EOF
[Unit]
Description=OpenSearch
Documentation=https://opensearch.org/
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=opensearch
Group=opensearch
Environment=OPENSEARCH_HOME=/opt/opensearch
Environment=OPENSEARCH_PATH_CONF=/opt/opensearch/config
WorkingDirectory=/opt/opensearch
ExecStart=/opt/opensearch/bin/opensearch
LimitNOFILE=65536
LimitNPROC=4096
LimitMEMLOCK=infinity
[Install]
WantedBy=multi-user.target
EOF
# Enable and start OpenSearch
sudo systemctl daemon-reload
sudo systemctl enable --now opensearch
# Wait for OpenSearch to start, then verify
sleep 30
curl -s http://localhost:9200Expected output:
{
"name" : "siem-node-1",
"cluster_name" : "pfsense-monitoring",
"version" : {
"number" : "2.19.4"
}
}Security warning.
plugins.security.disabled: truemeans no authentication, so keepnetwork.host: 127.0.0.1(whatinstall.shwrites). Do not bind0.0.0.0without a ufw source limit (see step 6).
.deb install instead? If you install OpenSearch from the
.debpackage rather than the tarball, the config lives in/etc/opensearch/opensearch.yml, data in/var/lib/opensearch, logs in/var/log/opensearch, and heap is set in/etc/opensearch/jvm.options.d/. Adjust the paths in this guide accordingly.
# Add Elastic repository
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/elastic-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
# Install Logstash
sudo apt update
sudo apt install -y logstash
# Install OpenSearch output plugin
sudo /usr/share/logstash/bin/logstash-plugin install logstash-output-opensearchDeploy the Suricata pipeline. Do not hand-write the pipeline: the file
config/logstash-suricata.conf in this repository is the single source of truth. It parses
each EVE JSON event to flat root-level fields (event_type, src_ip, dest_ip,
alert.signature, in_iface, geoip_src.location, ...), which is what the shipped
dashboards and the index template expect. Nothing is nested under suricata.eve.*.
# From your clone of the repository
sudo cp config/logstash-suricata.conf /etc/logstash/conf.d/suricata.conf
# Larger UDP receive buffer for bursty EVE traffic
echo "net.core.rmem_max=33554432" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
# Enable and start Logstash
sudo systemctl enable --now logstash
# Wait for Logstash to start, then check status
sleep 30
sudo systemctl status logstashThe pipeline listens on UDP 5140 and writes daily indices named suricata-YYYY.MM.dd.
Also install the index template so geoip_src.location is mapped as geo_point:
./scripts/install-opensearch-config.sh # or let setup.sh do it (step 2)# Add Grafana repository
wget -q -O - https://packages.grafana.com/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/grafana-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/grafana-keyring.gpg] https://packages.grafana.com/oss/deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
# Install Grafana
sudo apt update
sudo apt install -y grafana
# Install OpenSearch datasource plugin
sudo grafana-cli plugins install grafana-opensearch-datasource
# Enable and start Grafana
sudo systemctl enable --now grafana-server
sudo systemctl status grafana-serverinstall.sh allows SSH, UDP 5140 from LOGSTASH_ALLOWED_SOURCES (the pfSense address), and
Grafana 3000 from GRAFANA_ALLOWED_SOURCES, then enables ufw. It does not open 9200. If you
configure ufw by hand, do the same, with a source on every rule:
# SSH first, or you lock yourself out when ufw is enabled
sudo ufw allow OpenSSH
# Grafana web UI — only from your admin network
sudo ufw allow from <ADMIN_NETWORK_CIDR> to any port 3000 proto tcp comment "Grafana Web UI"
# Logstash input — only from pfSense
sudo ufw allow from <PFSENSE_IP> to any port 5140 proto udp comment "Logstash Suricata input"
# OpenSearch — normally NOT opened (loopback only). If you bound another address on purpose:
# sudo ufw allow from <WORKSTATION_IP> to any port 9200 proto tcp comment "OpenSearch HTTP"
# Enable firewall if not already enabled
sudo ufw --force enable
sudo ufw status# Check OpenSearch
curl -s http://localhost:9200 | jq
# Check Logstash is listening on UDP 5140
sudo netstat -ulnp | grep 5140
# Check Grafana
curl -s http://localhost:3000/api/health
# View service logs
sudo journalctl -u opensearch -f # OpenSearch (also /opt/opensearch/logs/)
sudo journalctl -u logstash -f # Logstash
sudo journalctl -u grafana-server -f # Grafana# Send a test Suricata event
echo '{"timestamp":"2026-09-19T12:00:00.000000-0500","flow_id":123456,"event_type":"test","src_ip":"192.168.1.100","dest_ip":"203.0.113.10","proto":"UDP"}' | nc -u -w1 localhost 5140
# Wait 5 seconds for processing
sleep 5
# Check if event was indexed
curl -s "http://localhost:9200/suricata-*/_search?q=event_type:test&size=1" | jq '.hits.hits[0]._source'The returned document should have event_type, src_ip, dest_ip and proto at the
root level (flat), with @timestamp taken from the event's own timestamp.
- Open browser to
http://<SIEM_IP>:3000 - Default credentials:
admin/admin - Change password when prompted
- Proceed to Dashboard Installation Guide
After installation, verify resource usage:
# Check memory usage
free -h
# Check disk usage (OpenSearch data lives here)
df -h /opt/opensearch/data
# Check service resource consumption
sudo systemctl status opensearch
sudo systemctl status logstash
sudo systemctl status grafana-serverExpected resource usage on a 16 GB host:
- OpenSearch: ~9-10 GB RAM (8 GB heap + overhead)
- Logstash: ~1-1.5 GB RAM
- Grafana: ~200-500 MB RAM
# Check logs
sudo journalctl -u opensearch -n 100
sudo tail -n 100 /opt/opensearch/logs/pfsense-monitoring.log
# Common issues:
# - Insufficient memory: reduce -Xms/-Xmx in /opt/opensearch/config/jvm.options
# - vm.max_map_count too low: sudo sysctl -w vm.max_map_count=262144
# - Wrong ownership after manual edits: sudo chown -R opensearch:opensearch /opt/opensearch# Check if UDP port is open
sudo netstat -ulnp | grep 5140
# Check Logstash logs
sudo tail -f /var/log/logstash/logstash-plain.log
# Test UDP reception
sudo tcpdump -i any -n port 5140# Reinstall plugin
sudo grafana-cli plugins install grafana-opensearch-datasource
# Restart Grafana
sudo systemctl restart grafana-server
# Check plugin directory
ls -la /var/lib/grafana/plugins/Continue to:
- pfSense Forwarder Installation - Set up log forwarding
- Dashboard Installation - Import Grafana dashboards
Tarball layout (what install.sh creates):
- OpenSearch config:
/opt/opensearch/config/opensearch.yml - OpenSearch heap:
/opt/opensearch/config/jvm.options - OpenSearch data / logs:
/opt/opensearch/data,/opt/opensearch/logs - OpenSearch systemd unit:
/etc/systemd/system/opensearch.service - Logstash pipeline:
/etc/logstash/conf.d/suricata.conf(copied fromconfig/logstash-suricata.conf) - Grafana config:
/etc/grafana/grafana.ini
A .deb install of OpenSearch uses /etc/opensearch and /var/lib/opensearch instead.
Source: docs/install/INSTALL_SIEM_STACK.md. This wiki is generated from the repository on every push to main; edit the source file and open a pull request rather than editing the wiki page.
This wiki is generated from the Markdown files in pfsense-siem-stack on every push to main. Edits made here are overwritten; edit the source file named at the bottom of each page and open a pull request. Placeholders used throughout: admin@<PFSENSE_IP> is your pfSense SSH login, <SIEM_IP> your SIEM server, interface names like igc0 are examples. Licensed MPL 2.0.
Getting started
Suricata
pfBlockerNG
Telegraf
pfSense platform
- Upgrading pfSense ⭐
- Filterlog Stops After Rotation
- Traffic Shaping Guide
- Shaping Optimization Notes
- October 2026 Tuning Results
- CrowdSec (exploratory)
SIEM: deploy
- Quick Start
- New User Checklist
- SIEM Server Installation
- Forwarder Installation
- GeoIP Setup
- Dashboard Installation
SIEM: operate
- Management Console
- Forwarder Operations and Watchdog
- Multi-Interface and Retention
- Scripts Reference
SIEM: fix