# Zenarmor Remote Elasticsearch

*September 30, 2024*
 — by Flaviu Vlaicu

> Zenarmor Remote Elasticsearch Database with Docker



#### elasticsearch:8.13.1 is the latest version working and tested.

```dockerfile
version: '3.7'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.13.1 # Replace with the latest version if needed
    container_name: elasticsearch
    environment:
      - discovery.type=single-node
      - ES_JAVA_OPTS=-Xms512m -Xmx512m  # Adjust JVM heap size as needed
      - bootstrap.memory_lock=true
      - xpack.security.enabled=true          # Enable security
      - ELASTIC_USERNAME=elastic         # Set the username for the 'elastic' user
      - ELASTIC_PASSWORD=YourSecurePasswordHere # Set the password for the 'elastic' user
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - es_data:/usr/share/elasticsearch/data
    ports:
      - "9200:9200"
      - "9300:9300"
    networks:
      - es_network

volumes:
  es_data:
    driver: local

networks:
  es_network:
    driver: bridge
```

* Do the initial configuration of Zenarmor
* Database settings -> Use a Remote Elasticsearch Database
* Provide the http://hostname:9200 where the docker is running and user / pass specified in the compose config file


![Repoertin Database](/images/2024-09/zenarmor-reporting-database.jpg)


---
*Source: [https://vlaicu.io/posts/zenarmor-remote-elasticsearch/](https://vlaicu.io/posts/zenarmor-remote-elasticsearch/)*
