Need to migrate your e-mails to a new server? Free and paid versions of our online tool available.
Hero Image

Elasticsearch Multi-Node Cluster on OpenBSD 7.5

Elasticsearch Multi-Node Cluster on OpenBSD 7.5

Nodes: node-1 192.168.1.10 · node-2 192.168.1.11 · node-3 192.168.1.12

Node 1 elasticsearch.yml

cluster.name: production-cluster
node.name: node-1
node.roles: [master, data, ingest]
network.host: 192.168.1.10
http.port: 9200
transport.port: 9300
discovery.seed_hosts: ["192.168.1.10","192.168.1.11","192.168.1.12"]
cluster.initial_master_nodes: ["node-1","node-2","node-3"]
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: certs/transport.p12
xpack.security.transport.ssl.truststore.path: certs/transport.p12

Generate transport certificates (on node-1)

/usr/share/elasticsearch/bin/elasticsearch-certutil ca
/usr/share/elasticsearch/bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
# Distribute transport.p12 to all nodes

Start all nodes

systemctl start elasticsearch

Check health

curl -u elastic:Pass --cacert /etc/elasticsearch/certs/http_ca.crt \
    'https://localhost:9200/_cluster/health?pretty'
# "status": "green", "number_of_nodes": 3