CloudLinux.ro
Applications

How to install Elasticsearch on a Cloud VPS

Updated 7/18/2026

Elasticsearch is the distributed search and analytics engine behind full-text search, log analytics and real-time application monitoring.

A database on your own server gives you low latency and full control over configuration and backups, without managed-service pricing.

One-click install on cloudlinux.ro

The fastest way: Elasticsearch installs automatically at the first boot of a new server.

  1. Create a Cloud VPS from the control panel.
  2. In the configuration step, pick Elasticsearch from the app catalog.
  3. Start the server. The install runs in the background for a few minutes and its status shows on the server page.
  4. Access details and generated passwords are saved on the server in /root/app-credentials.txt. The app will be available on port 9200.

Manual install on any Ubuntu server

If you prefer doing it yourself, below is the exact script our automatic install runs. Execute it as root on a fresh Ubuntu server (24.04 recommended). It stops at the first error, and when it finishes you will find the access details in /root/app-credentials.txt.

export DEBIAN_FRONTEND=noninteractive
curl -fsSL https://get.docker.com | sh
ES_PASS=$(openssl rand -base64 24 | tr -dc 'A-Za-z0-9' | cut -c1-20)
printf 'vm.max_map_count=262144\n' > /etc/sysctl.d/99-elasticsearch.conf
sysctl -p /etc/sysctl.d/99-elasticsearch.conf
docker volume create es_data
docker run -d --name elasticsearch --restart=always -p 9200:9200 \
  -e discovery.type=single-node \
  -e ELASTIC_PASSWORD="$ES_PASS" \
  -e xpack.security.enabled=true \
  -e xpack.security.http.ssl.enabled=false \
  -e ES_JAVA_OPTS='-Xms1g -Xmx1g' \
  -v es_data:/usr/share/elasticsearch/data \
  docker.elastic.co/elasticsearch/elasticsearch:8.17.0
IP=$(hostname -I | awk '{print $1}')
printf 'Elasticsearch: http://%s:9200\nUtilizator: elastic\nParola: %s\nTest: curl -u elastic:%s http://%s:9200\nPortul este public cu autentificare, dar fara criptare, restrictioneaza accesul din firewall sau foloseste un tunel SSH pentru productie.\n' "$IP" "$ES_PASS" "$ES_PASS" "$IP" > /root/app-credentials.txt

You can also save this script as a recipe in your account and reuse it on any new server.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials