Documentation
📘 Elasticsearch + Kibana Setup with Docker Compose (8.x & 9.x)
This guide explains how to run Elasticsearch and Kibana locally using Docker Compose, for both the 8.x and 9.x releases.1. Snapshot Naming Convention Example
Example snapshot repository pattern (used in 8.x and 9.x):2. Elasticsearch + Kibana (8.x Example: 8.18.4)
- Security (
xpack.security.enabled) is disabled for simplicity. - Java heap set to 2g.
- Minimal environment variables (Kibana only needs
ELASTICSEARCH_HOSTS).
3. Elasticsearch + Kibana (9.x Example: 9.1.0)
- Added
network.host=0.0.0.0for broader connectivity. - Memory limit explicitly set (
mem_limit: 2g). - Java heap adjusted to 1g (default smaller footprint).
- More explicit Kibana flags disabling X-Pack features like monitoring, watcher, ML.
4. Run the Stack
- Elasticsearch → http://localhost:9200
- Kibana → http://localhost:5601
5. Key Differences (8.x vs 9.x)
| Feature | 8.x (8.18.4) | 9.x (9.1.0) |
|---|---|---|
| Java Heap | 2g | 1g |
Memory Limit (mem_limit) | Not set | 2g |
network.host | Not required | Required (0.0.0.0) |
| X-Pack flags in Kibana | Minimal | Explicit (security, monitoring, watcher, ML disabled) |
| Compatibility | Stable | Latest features, breaking changes possible |
✅ Executive Summary
- Use 8.x (8.18.4) for stability with fewer config flags.
- Use 9.x (9.1.0) for latest features, requires more explicit configuration.
- Both can be run via Docker Compose with minor adjustments in heap size, memory, and
network.host. - Disable X-Pack security & monitoring for local/dev use.
a snapshot repository + restore example (using that
auto-snap1-{now/m{yyyy.MM.dd-HH.mm|+05:30}} pattern)