OpenSearch 3.9.0 Fluent Bit 5.1.4
Overview
OpenSearch is an open source search and analytics engine, OpenSearch Dashboards is its web interface, and Fluent Bit is a lightweight log collector. In this image the three arrive wired together as one log pipeline. Fluent Bit collects this instance's systemd journal, any .log file you drop into /var/log/sac/sac-logs/ and records forwarded by your other machines. It ships them over TLS into OpenSearch as daily sac-logs-* indices. When you first sign in to Dashboards, Discover already lists your instance's logs.
This guide covers launching and using the OpenSearch 3.9.0 + Fluent Bit 5.1.4 on Ubuntu 24.04 AMI from SecureAnyCloud on Amazon EC2. It is one version of the SecureAnyCloud log management listing on AWS Marketplace. Pick it as the software version when you subscribe and launch.
journald (host logs) ---------------------\ /var/log/sac/sac-logs/*.log --------------+--> Fluent Bit --(TLS, per-instance account)--> OpenSearch 127.0.0.1:9200 your other machines: forward 24224 --------/ | (TLS + per-instance shared key) nginx 443 (per-instance certificate) --> OpenSearch Dashboards 127.0.0.1:5601What you get:
- No demo security configuration. OpenSearch normally bootstraps with the widely published
admin/adminlogin and demo certificates whose private keys are public. The demo installer never runs in this image, and the package's template account database (with its published password hashes) is removed. A start-up guard refuses to start OpenSearch if any published password or certificate is in effect. - Credentials and certificates unique to your instance. First boot creates a private certificate authority, the node,
admin, web and forward certificates, the admin password, two service account passwords, the forward shared key, the Dashboards session-cookie key and the OpenSearch keystore. The image ships an empty data directory, so the security index is initialised on your instance from those values. No two instances share a secret. - HTTPS from the first boot. nginx is the only web entry point. It serves Dashboards on port 443 with a certificate issued by your instance's own authority. Port 80 only redirects to HTTPS.
- Internal services on loopback. The OpenSearch REST API (
127.0.0.1:9200), its transport port (127.0.0.1:9300), Dashboards (127.0.0.1:5601) and the Fluent Bit monitor (127.0.0.1:2020) cannot be reached from the network. - Authenticated remote ingest. The Fluent Bit forward input on TCP 24224 accepts only TLS connections that present your instance's shared key. Keep it closed in the security group until you open it to your own networks.
- Fail closed. OpenSearch, Dashboards, Fluent Bit and nginx refuse to start until first boot has created this instance's secrets. First boot fails loudly rather than finishing with a credential that does not work.
- Hardened web front end. Requests for a host name the instance does not serve are dropped, cross-site requests and WebSocket upgrades are refused, and session cookies are marked Secure. nginx logs the real client address rather than any
X-Forwarded-Forheader a client sends. - No instance metadata for the web services. OpenSearch, Dashboards and nginx are blocked from the instance metadata service, so a notification channel or webhook cannot be turned against the instance's credentials.
- Key-only SSH. Password logins, root logins and X11 forwarding are switched off.
- Fully patched Ubuntu 24.04 LTS at build time, with unattended security upgrades switched on and the signed OpenSearch and Fluent Bit package repositories kept configured.
What is on the image: OpenSearch 3.9.0 and OpenSearch Dashboards 3.9.0 from the official OpenSearch Project packages, and Fluent Bit 5.1.4 from the official Fluent Bit package (all Apache License 2.0, unmodified, signature and checksum verified at build time). The image uses Ubuntu's security-maintained OpenJDK 21 in place of the Java runtime bundled in the OpenSearch package. It also contains nginx, Ubuntu 24.04 LTS, cloud-init and the AWS Systems Manager agent. The Security Analytics (SIEM rules) plugin is not included.
Default user: ubuntu. Architecture: x86_64. Recommended instance type: m5.large.
Prerequisites
- An AWS account subscribed to the listing, an EC2 key pair and a VPC subnet with a route to the internet (or a private route you use for management).
- An instance type with 8 GiB of memory or more, such as m5.large or t3.large. OpenSearch, Dashboards and Fluent Bit together use about 3.3 GiB at idle. On a 2 GiB instance such as t3.small, the kernel stops OpenSearch for lack of memory during first boot.
- A security group that allows TCP 22 (SSH) and TCP 443 (Dashboards) from your own networks only, and TCP 80 if you want plain HTTP requests redirected. Open TCP 24224 only if other machines will forward logs, and only from their private addresses. Never open 9200, 9300, 5601 or 2020, because those ports listen on loopback.
Launch the instance
In the AWS Marketplace listing, choose Continue to Subscribe, then Continue to Configuration. Pick OpenSearch 3.9.0 + Fluent Bit 5.1.4 on Ubuntu 24.04 as the software version, choose your Region, and select Launch through EC2.
Choose m5.large or larger, your key pair and a security group as described above. OpenSearch is a JVM service and Dashboards is a Node service, and the image sizes the OpenSearch heap from the memory it finds at boot. Increase the root volume on the Configure storage step if you expect to keep a lot of log history. Under Advanced details, keep Metadata version at V2 only.
To launch with the AWS CLI instead, replace the values in angle brackets:
aws ec2 run-instances --region <region> --image-id <ami-id-from-the-listing> \
--instance-type m5.large --key-name <your-key-pair> \
--security-group-ids <your-security-group> --subnet-id <your-subnet> \
--metadata-options HttpTokens=required,HttpEndpoint=enabled \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=opensearch-logs}]'Connect to your instance
Version SSH user
OpenSearch 3.9.0 + Fluent Bit 5.1.4 on Ubuntu 24.04 ubuntu
ssh -i <your-key.pem> ubuntu@<public-ip>The login message shows the Dashboards address and the location of the credentials.
Check the services
First boot creates the certificates, passwords and keystore. It starts OpenSearch on an empty data directory, applies this instance's security configuration, installs the single-node index template, starts Dashboards, Fluent Bit and nginx, and creates the Dashboards index pattern. This takes a few minutes on a 2 vCPU instance. When first boot has finished, run:
systemctl is-active opensearch opensearch-dashboards fluent-bit nginx
sudo test -f /var/lib/sac/data/opensearch-fluent-bit-firstboot.done && echo FIRSTBOOT_DONE cat /etc/sac/opensearch-fluent-bit-versions.txtactive active active active FIRSTBOOT_DONE opensearch=3.9.0 opensearch-dashboards=3.9.0 fluent-bit=5.1.4If FIRSTBOOT_DONE is not printed yet, follow progress with sudo journalctl -u opensearch-fluent-bit-firstboot -f.
Only SSH, nginx and the authenticated forward input listen on public addresses. OpenSearch, Dashboards and the Fluent Bit monitor listen on loopback:
sudo ss -Hlntp | awk '{print $4, $6}' | grep -v '127.0.0.5' | sed -E 's/,pid=[0-9]+,fd=[0-9]+//g' | sort0.0.0.0:22 users:(("sshd"),("systemd")) 0.0.0.0:24224 users:(("fluent-bit")) 0.0.0.0:443 users:(("nginx"),("nginx"),("nginx")) 0.0.0.0:80 users:(("nginx"),("nginx"),("nginx")) 127.0.0.1:2020 users:(("fluent-bit")) 127.0.0.1:5601 users:(("node")) [::]:22 users:(("sshd"),("systemd")) [::]:443 users:(("nginx"),("nginx"),("nginx")) [::]:80 users:(("nginx"),("nginx"),("nginx")) [::ffff:127.0.0.1]:9200 users:(("java")) [::ffff:127.0.0.1]:9300 users:(("java"))SSH accepts keys only. Passwords, root logins and X11 forwarding are switched off in /etc/ssh/sshd_config.d/00-sac.conf, which sorts before every other SSH setting. Check the effective values:
sudo sshd -T | grep -E '^(passwordauthentication|kbdinteractiveauthentication|permitrootlogin|x11forwarding|pubkeyauthentication) 'permitrootlogin no pubkeyauthentication yes passwordauthentication no kbdinteractiveauthentication no x11forwarding noGet your address and credentials
First boot writes everything it generated to the root-only file /root/opensearch-fluent-bit-credentials.txt (mode 0600). List the entries the file holds without printing any secret:
sudo grep -oE '^[a-z_]+=' /root/opensearch-fluent-bit-credentials.txt
sudo stat -c '%a %U:%G' /root/opensearch-fluent-bit-credentials.txt
sudo awk -F= '/^dashboards_url=/{print $2}' /root/opensearch-fluent-bit-credentials.txtdashboards_url= admin_username= admin_password= opensearch_url= opensearch_ca= forward_host= forward_port= forward_shared_key= forward_ca= dashboards_server_password= fluentbit_writer_password= 600 root:root https://<your-public-dns-name>/When you are ready to sign in, show the admin password:
sudo awk -F= '/^admin_password=/{print $2}' /root/opensearch-fluent-bit-credentials.txtConfirm that the certificate authority is unique to this instance and that the published demo login is refused:
openssl x509 -in /etc/sac/opensearch-root-ca.pem -noout -subject curl -s -o /dev/null -w 'HTTP %{http_code}\n' --cacert /etc/sac/opensearch-root-ca.pem -u 'admin:admin' https://127.0.0.1:9200/subject=CN = sac-opensearch-ca-05b72e4e3ee00e5c, OU = sac-appliance, O = sac HTTP 401The 16 hex characters after sac-opensearch-ca- are random and different on every instance.
Sign in to OpenSearch Dashboards
Browse to the dashboards_url from the credentials file (https://<your-public-dns-name>/). Your instance's own authority issued the certificate, so your browser warns that it is not signed by a public authority. Step 10 shows how to trust it or use your own name. Sign in as admin with the admin_password.
Open Discover. The sac-logs-* index pattern is already the default, so the histogram and the record list show what Fluent Bit has collected from this instance since first boot.
Every record collected on the instance carries an appliance field and the instance's hostname. Use them to narrow a search with Dashboards Query Language, for example:
appliance:"sac-opensearch-log-stack" and log:"payment-service"To see every field OpenSearch has mapped, open Dashboards Management, then Index patterns. The sac-logs-* pattern lists the fields, with @timestamp as the time field.
Ship your application logs
Fluent Bit collects anything written to a .log file directly under /var/log/sac/sac-logs/. It rescans the directory every five seconds, so new files are picked up without a restart:
echo "$(date -Is) payment-service order failed id=42 reason=card_declined" | sudo tee -a /var/log/sac/sac-logs/app.logSearch for the line in Discover, or from the command line as shown in Step 8.
Verify the pipeline end to end
The image ships a probe that writes a uniquely tagged line into the watched directory and then reads that exact line back from OpenSearch. Run it:
sudo /usr/local/sbin/opensearch-fluent-bit-e2e.shE2E: emitted probe token SACE2E32a40df594d8237e665a8386 into /var/log/sac/sac-logs/sac-e2e-probe.log E2E PASS: token SACE2E32a40df594d8237e665a8386 emitted by Fluent Bit and retrieved from OpenSearch after 2 poll(s) {"log":"2026-10-21T06:49:00+00:00 sac end-to-end pipeline probe token=SACE2E32a40df594d8237e665a8386","hostname":"ip-172-31-87-177","appliance":"sac-opensearch-log-stack","@timestamp":"2026-10-21T06:49:00.501Z"}The token differs on every run. If the probe cannot read its own line back, it exits with a non-zero status and reports where delivery stopped.
Use the OpenSearch REST API
The REST API listens on loopback only. Run these commands on the instance, or forward the port first with ssh -L 9200:127.0.0.1:9200 ubuntu@<public-ip>. The examples read the password into a shell variable and pass it to curl on standard input, so it never appears on a command line:
PW=$(sudo awk -F= '/^admin_password=/{print $2}' /root/opensearch-fluent-bit-credentials.txt) printf 'user = "admin:%s"\n' "$PW" | curl -s -K - --cacert /etc/sac/opensearch-root-ca.pem \
'https://127.0.0.1:9200/_cluster/health' | jq -r '"status=\(.status) nodes=\(.number_of_nodes)"' printf 'user = "admin:%s"\n' "$PW" | curl -s -K - --cacert /etc/sac/opensearch-root-ca.pem \
'https://127.0.0.1:9200/_cat/indices/sac-logs-*?h=health,index,pri,rep' printf 'user = "admin:%s"\n' "$PW" | curl -s -K - --cacert /etc/sac/opensearch-root-ca.pem \
-H 'Content-Type: application/json' 'https://127.0.0.1:9200/sac-logs-*/_count' \
-d '{"query":{"match_phrase":{"log":"payment-service"}}}' | jq '.count'status=green nodes=1 green sac-logs-2026.10.21 1 0 5The cluster is green because first boot installs an index template that gives the daily sac-logs-* indices one shard and no replica, which suits a single node.
Forward logs from your other machines
Remote Fluent Bit (or Fluentd) agents send to TCP 24224 with the forward protocol over TLS and must present this instance's shared key. The instance refuses a sender that does not use TLS or does not present the key.
- In the instance's security group, allow TCP 24224 from the private addresses of the sending machines only.
- Copy the certificate authority
/etc/sac/opensearch-root-ca.pemto each sender (it is public material) and readforward_shared_keyfrom the credentials file. - Add an output like this to each sender's Fluent Bit configuration, using the instance's private address or DNS name:
[OUTPUT] Name forward Match * Host <this-instance-private-dns-name> Port 24224 Shared_Key <forward_shared_key> Self_Hostname <sender-name> tls On tls.verify On tls.ca_file /etc/fluent-bit/sac-opensearch-ca.pemThe forward certificate is issued for the names in Step 10, so connect with one of those names or set tls.vhost. Forwarded records are indexed into the same sac-logs-* indices and keep the sender's own fields.
Serve Dashboards under your own name
First boot configures the instance to serve its public DNS name, public IP and private IP. To use your own DNS name, point the name at the instance and run:
sudo opensearch-set-hostname logs.example.comThe command issues new web and forward certificates for that name from the instance's own authority, updates nginx and the credentials file, and reloads the services. To stop browser warnings, import /etc/sac/opensearch-root-ca.pem into your browser or operating system trust store. Alternatively, replace /etc/ssl/opensearch-web/web.crt and web.key with a certificate from your own authority and run sudo systemctl reload nginx.
Server components
Component Version Purpose
OpenSearch 3.9.0 Search and analytics engine storing the log records
OpenSearch Dashboards 3.9.0 Web interface for search, filtering and visualisation
OpenSearch Security plugin bundled TLS and authentication on the REST and transport layers
Fluent Bit 5.1.4 Log collector and forward receiver
OpenJDK 21 Java runtime, from Ubuntu, security maintained
nginx Ubuntu package HTTPS front end for Dashboards
Ubuntu 24.04 LTS Base operating system
Files and services
Path Purpose
/root/opensearch-fluent-bit-credentials.txt Everything first boot generated, root only
/etc/sac/opensearch-root-ca.pem This instance's certificate authority (public)
/etc/opensearch/opensearch.yml Cluster and security configuration
/etc/opensearch/opensearch-security/ Account database, roles and role mappings
/var/lib/opensearch Index data
/etc/opensearch-dashboards/opensearch_dashboards.yml Dashboards configuration
/etc/fluent-bit/fluent-bit.conf The collection pipeline
/etc/fluent-bit/opensearch.env Fluent Bit's OpenSearch password and forward shared key, root only
/var/log/sac/sac-logs/ Drop .log files here to have them collected
/etc/nginx/sites-available/opensearch-dashboards The HTTPS front end
/usr/local/sbin/opensearch-fluent-bit-e2e.sh End to end pipeline probe
/usr/local/sbin/opensearch-set-hostname Change the name the instance is served as
/var/log/sac/sac-firstboot.log First boot log
To restart the stack in dependency order, run sudo systemctl restart opensearch opensearch-dashboards fluent-bit. After OpenSearch restarts, Dashboards answers HTTP 503 "server is not ready yet" for a short while.
Troubleshooting
Dashboards does not load. Check that the security group allows TCP 443 from your address, that first boot has finished (Step 3), and that nginx is running with systemctl status nginx --no-pager.
No records in Discover. Run the probe in Step 7, which reports where delivery stops. Then check Fluent Bit with sudo systemctl status fluent-bit --no-pager and curl -s http://127.0.0.1:2020/api/v1/health.
A remote agent cannot connect. Confirm that TCP 24224 is open from the sender's private address, that the sender uses TLS with tls.ca_file pointing at this instance's CA, and that its Shared_Key matches forward_shared_key.
Disk usage grows. Log indices accumulate daily. Check usage with df -h /, then delete old indices you no longer need through Dashboards (Index Management) or the REST API.
Security recommendations
- Keep ports 9200, 9300, 5601 and 2020 closed. They are bound to loopback by design.
- Restrict TCP 443 and 22 to your own networks, and open 24224 only to the machines that send logs.
- Create named users with the roles they need in Security instead of sharing
admin. - Rotate the
adminpassword if it is ever shared. Change it under Security, Internal users, then update/root/opensearch-fluent-bit-credentials.txt. - Take snapshots with the OpenSearch snapshot API if the log history matters to you.
- Keep the authentication configuration as shipped unless you need more. OpenSearch 3.9.0 and Dashboards 3.9.0 bundle a few third-party libraries with published advisories. SecureAnyCloud replaced every one that has a fixed release in the same line (Jackson, jsoup, lz4-java, handlebars, axios, follow-redirects, brace-expansion, source-map-js). The few that remain are reached only by features this image leaves switched off: the Jackson copy built into the SAML authenticator, and the node-forge PKCS#12 keystore loader in Dashboards. If you enable SAML or a PKCS#12 keystore, update to the next OpenSearch release first.
Support
SecureAnyCloud provides 24/7 technical support for this image by email and live chat: sales@secureanycloud.com. For questions about the software itself, see the upstream OpenSearch and Fluent Bit projects.
Deploy on AWS
Launch OpenSearch 3.9.0 + Fluent Bit 5.1.4 on Ubuntu 24.04 on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com