Setup Elasticsearch 7.x Cluster on Raspberry Pi / ASUS Tinker Board

Eray Arslan
Sep 23, 2019 · 3 min read
My Cluster
My Cluster


1x Raspberry Pi 2B - Data Node
1x Raspberry Pi 3B - Data Node
1x Raspberry Pi 4B - Data Node
1x Asus Tinker Board - Master Node
1x 8-Port TP-LINK 10/100Mbps
1x Dark Connect Master
4x Samsung EVO Plus 32GB
3x Codegen Micro USB - For RPi 2B, RPi 3B and Asus Tinker Board
1x Codegen Type-C - For RPi 4B
4x Jadaol Cat 6 Flat Ethernet Cable 1 ft
1x iUniker Raspberry Pi Cluster Case

Yes, Four different single-board computer. Seems legit!

Operating System

Raspberry Pi      -> Raspbian Buster Lite
ASUS Tinker Board -> Armbian Bionic Server

Prepare all your SDCards with that images. You can use balenaEtcher for that. And don’t forget this for Raspberry Pi devices.

First Boot

Need to expand your filesystem for all your devices. And give them cool hostnames.

# Example


I think, Static IP better for managing our cluster. Run sudo nano /etc/network/interfaces command and set your configuration to every device.

# Example
auto eth0
iface eth0 inet static
address # current device ip
gateway # modem gateway

Update Packages and Reboot

sudo apt-get update
sudo apt-get upgrade
sudo reboot


# Example
tinker-node - - 2GB - Master
rpi4b-node - - 4GB - Data
rpi3b-node - - 1GB - Data
rpi2b-node - - 1GB - Data

Prepare Java

In this article, we will setup Elasticsearch 7.3.2. So we need to install JDK11 to every device.

sudo apt-get install openjdk-11-jdk          # Raspberry Pi
sudo apt-get install openjdk-11-jre-headless # ASUS Tinker Board

And set JAVA_HOME with sudo nano /etc/environment


And run source /etc/environment

Setup Elasticsearch

We need to install Elasticsearch manually, because latest version do not support our distribution.

sudo dpkg -i --force-all --ignore-depends=libc6 elasticsearch-7.3.2-no-jdk-amd64.deb

After that Elasticsearch installed wrongly and APT gonna broken. So we need to fix APT before everything.

Run sudo nano /var/lib/dpkg/status and find Package: elasticsearch line.

So change Status: install ok half-configured line to Status: install ok installed and change Depends: bash (>= 4.1), lsb-base (>= 4), libc6, adduser, coreutils (>= 8.4) line to Depends: bash (>= 4.1), lsb-base (>= 4), adduser, coreutils (>= 8.4)

Basically change half-configured to installed and remove libc6 from Depends

And run sudo apt-get upgrade to check everything is okay.

After that, we need to set JAVA_HOME for Elasticsearch with sudo nano /etc/default/elasticsearch

Uncomment JAVA_HOME line and set the value /usr/lib/jvm/java-11-openjdk-armhf

run sudo chmod g+w /etc/elasticsearch command for avoid keystore permission issues.

So our Elasticsearch nodes installed. Now we can configure it before to run.

Elasticsearch Configuration

Run sudo nano /etc/elasticsearch/elasticsearch.yml

Change (same for all nodes) and (different for all nodes) to what you want.

change discovery.seed_hosts and cluster.initial_master_nodes for your cluster

Add following line to end of file

# Data Nodes Example false
node.master: false true
discovery.seed_hosts: ["", "", "", ""] # all node ips # current node ip # current node ip
bootstrap.system_call_filter: false
cluster.initial_master_nodes: ["tinker-node"] # master node
# Master Node Example false
node.master: true false
discovery.seed_hosts: ["", "", "", ""] # all node ips # current node ip # current node ip
bootstrap.system_call_filter: false

And maybe you need to avoid memory issues for RPi 2B and 3B. Cause that devices have low memory.

For 2B and 3B, run sudo nano /etc/elasticsearch/jvm.options command. And change

-Xms1g to -Xms512M
-Xmx1g to -Xmx512M

So our Elasticsearch cluster ready.

Start Cluster and Check It

sudo systemctl enable elasticsearch
sudo systemctl start elasticsearch

After cluster is ready, I run our qa products ingestion process to cluster with Apache Spark (~600K document). Cluster face with heavy load but after all, our job successfully done!

In conclusion, this cluster ready for our personal projects! And its cool lab environment.

Have fun :)


You can monitor your cluster on Kibana with docker installed computer. (not arm)

# Example
docker run -d -p 5601:5601 \


# /var/log/elasticsearch permission issue solutionsudo chown -R elasticsearch:elasticsearch /var/log/elasticsearch
systemctl restart elasticsearch.service

Eray Arslan

Written by

Senior Software Developer @ Hepsiburada — Search and Navigation aka Mordor


hepsiburada technology

More From Medium

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade