{"id":13339,"date":"2025-12-20T11:26:52","date_gmt":"2025-12-20T05:56:52","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?p=13339"},"modified":"2025-12-20T11:26:54","modified_gmt":"2025-12-20T05:56:54","slug":"how-to-setup-elasticsearch-on-linux-server","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/how-to-setup-elasticsearch-on-linux-server","title":{"rendered":"How to Setup ElasticSearch on Linux Server &#8211; Easy Guide"},"content":{"rendered":"\n<p><strong>To set up Elasticsearch on a Linux server<\/strong>, add Elastic\u2019s official repository, install the package, configure elasticsearch.yml (network, discovery, security), tune JVM heap, adjust kernel limits (vm.max_map_count), open firewall ports, disable swap, and enable the systemd service. Then secure with built\u2011in authentication and TLS, and verify via curl or Kibana.<\/p>\n\n\n\n<p>In this guide, you\u2019ll learn how to setup Elasticsearch on Linux server securely and correctly, from package installation to production-grade tuning. I\u2019ll show Ubuntu\/Debian and RHEL\/CentOS flows, explain core settings, and share real-world tips from 12+ years in hosting so you avoid bootstrap and performance pitfalls.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"what-is-elasticsearch-and-why-it-matters\"><strong>What is Elasticsearch and Why it Matters<\/strong>?<\/h2>\n\n\n\n<p>Elasticsearch is a distributed, RESTful search and analytics engine used for full\u2011text search, logging (ELK\/Elastic Stack), observability, and metrics. It scales horizontally, stores JSON documents, and provides near real\u2011time search. Getting the <a href=\"https:\/\/www.youstable.com\/blog\/configure-directadmin-on-linux\/\">Linux<\/a> install right is critical: misconfigured memory, swap, or network settings cause crashes, slow queries, or failed cluster startups.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"prerequisites-and-system-requirements\"><strong>Prerequisites and System Requirements<\/strong><\/h2>\n\n\n\n<p>Before you install, ensure the following for a smooth deployment and to pass Elasticsearch bootstrap checks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Linux distro: Ubuntu 20.04\/22.04\/24.04, Debian 11\/12, RHEL\/Rocky\/Alma 8\/9.<\/li>\n\n\n\n<li>CPU\/RAM: Minimum 2 vCPU, 4 GB RAM (8\u201316 GB+ recommended for production).<\/li>\n\n\n\n<li>Storage: SSD-backed volumes; plan for growth (indexes grow faster than you expect).<\/li>\n\n\n\n<li>Java: Elasticsearch 8.x ships with a bundled JDK\u2014no separate Java needed.<\/li>\n\n\n\n<li>Network ports: 9200 (HTTP), 9300 (transport\/cluster). Keep 9200 private unless protected.<\/li>\n\n\n\n<li>Root or sudo access.<\/li>\n<\/ul>\n\n\n\n<p>If you prefer <a href=\"https:\/\/www.youstable.com\/blog\/benefits-of-fully-managed-dedicated-server\/\">fully managed<\/a> infrastructure, YouStable\u2019s SSD NVMe VPS and Dedicated Servers are ideal for Elasticsearch, with quick scaling, DDoS protection, and 24\u00d77 help setting up secure clusters.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"quick-install-ubuntu-debian-apt\"><strong>Quick Install: Ubuntu\/Debian (APT)<\/strong><\/h2>\n\n\n\n<p>These commands install the latest Elasticsearch 8.x from Elastic\u2019s official repository.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># 1) Import GPG key and add repo\nsudo apt update\nsudo apt install -y curl gnupg apt-transport-https\n\ncurl -fsSL https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch | sudo gpg --dearmor -o \/usr\/share\/keyrings\/elasticsearch-keyring.gpg\necho \"deb &#91;signed-by=\/usr\/share\/keyrings\/elasticsearch-keyring.gpg] https:\/\/artifacts.elastic.co\/packages\/8.x\/apt stable main\" | sudo tee \/etc\/apt\/sources.list.d\/elastic-8.x.list\n\n# 2) <a href=\"https:\/\/www.youstable.com\/blog\/install-elasticsearch-on-linux\/\">Install Elasticsearch<\/a>\nsudo apt update\nsudo apt install -y elasticsearch<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"quick-install-rhel-centos-rocky-alma-yum-dnf\"><strong>Quick Install: RHEL\/CentOS\/Rocky\/Alma (YUM\/DNF)<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># 1) Import key and repo\nsudo rpm --import https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch\nsudo tee \/etc\/yum.repos.d\/elasticsearch.repo &gt;\/dev\/null &lt;&lt;'EOF'\n&#91;elasticsearch-8.x]\nname=Elasticsearch repository for 8.x packages\nbaseurl=https:\/\/artifacts.elastic.co\/packages\/8.x\/yum\ngpgcheck=1\ngpgkey=https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch\nenabled=1\nautorefresh=1\ntype=rpm-md\nEOF\n\n# 2) Install\nsudo dnf <a href=\"https:\/\/www.youstable.com\/blog\/install-yum-on-linux\/\">install -y elasticsearch || sudo yum<\/a> install -y elasticsearch<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"post-install-system-tuning-must-do\"><strong>Post\u2011Install System Tuning (Must\u2011Do)<\/strong><\/h2>\n\n\n\n<p>These settings prevent common \u201cbootstrap checks failed\u201d errors and improve stability.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"increase-virtual-memory-areas\"><strong>Increase Virtual Memory Areas<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Temporary until reboot\nsudo sysctl -w vm.max_map_count=262144\n\n# Persist across reboots\necho \"vm.max_map_count=262144\" | sudo tee \/etc\/sysctl.d\/99-elasticsearch.conf\nsudo sysctl --system<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"disable-swap\"><strong>Disable Swap<\/strong><\/h3>\n\n\n\n<p>Elasticsearch relies on the OS page cache; swap degrades performance and can block startup.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Disable now\nsudo swapoff -a\n\n# Comment out any swap entries in \/etc\/fstab to keep it off after reboot\nsudo sed -ri 's\/^(&#91;^#].*\\s+swap\\s+)\/#\\1\/' \/etc\/fstab<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"file-descriptors-and-processes\"><strong>File Descriptors and Processes<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Allow Elasticsearch to open many files and threads\nsudo tee \/etc\/security\/limits.d\/elasticsearch.conf &gt;\/dev\/null &lt;&lt;'EOF'\nelasticsearch - nofile 65535\nelasticsearch - nproc  4096\nEOF<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"core-configuration-elasticsearch-yml\"><strong>Core Configuration: elasticsearch.yml<\/strong><\/h2>\n\n\n\n<p>Edit the main config file: \/etc\/elasticsearch\/elasticsearch.yml. For a single-node dev or sandbox, use discovery.type: single-node and keep HTTP bound to localhost for safety.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/elasticsearch\/elasticsearch.yml\n\n# Minimal single-node example (safe for a dev box)\ncluster.name: my-es-cluster\nnode.name: es-1\npath.data: \/var\/lib\/elasticsearch\npath.logs: \/var\/log\/elasticsearch\nnetwork.host: 127.0.0.1\nhttp.port: 9200\ndiscovery.type: single-node\n# In 8.x, security is on by default. Keep it enabled.\nxpack.security.enabled: true<\/code><\/pre>\n\n\n\n<p>For a production node, bind to a private IP, configure initial master nodes, and seed hosts:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Production sketch (adjust IPs\/hostnames)\ncluster.name: prod-es\nnode.name: es-1\nnetwork.host: 10.0.1.10\nhttp.port: 9200\n\ndiscovery.seed_hosts: &#91;\"10.0.1.11\",\"10.0.1.12\"]\ncluster.initial_master_nodes: &#91;\"es-1\",\"es-2\",\"es-3\"]\n\nxpack.security.enabled: true<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"jvm-heap-and-performance-tuning\"><strong>JVM Heap and Performance Tuning<\/strong><\/h2>\n\n\n\n<p>Right-size the heap so Elasticsearch has memory while leaving OS cache for Lucene segments.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set -Xms and -Xmx to the same value (avoid resizing pauses).<\/li>\n\n\n\n<li>Use ~50% of system RAM for heap, max 31g to keep compressed OOPs efficient.<\/li>\n\n\n\n<li>Leave at least 50% to the OS for file system cache.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Create a JVM override file (survives package updates)\nsudo mkdir -p \/etc\/elasticsearch\/jvm.options.d\necho \"-Xms4g\" | sudo tee \/etc\/elasticsearch\/jvm.options.d\/heap.options\necho \"-Xmx4g\" | sudo tee -a \/etc\/elasticsearch\/jvm.options.d\/heap.options<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"start-and-enable-the-service\"><strong>Start and Enable the Service<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl daemon-reload\nsudo systemctl enable --now elasticsearch\nsudo systemctl status elasticsearch --no-pager<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"open-firewall-ports-only-what-you-need\"><strong>Open Firewall Ports (Only What You Need)<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"ufw-ubuntu-debian\"><strong>UFW (Ubuntu\/Debian)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Allow SSH\nsudo ufw allow 22\/tcp\n\n# Allow HTTP API only if necessary and secured\n# sudo ufw allow 9200\/tcp\n\n# Allow transport port for intra-cluster comms (private networks only)\nsudo ufw allow 9300\/tcp\n\nsudo ufw enable\nsudo ufw status<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"firewalld-rhel-family\"><strong>firewalld (RHEL Family)<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --permanent --add-service=ssh\n# sudo firewall-cmd --permanent --add-port=9200\/tcp\nsudo firewall-cmd --permanent --add-port=9300\/tcp\nsudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"security-basics-users-passwords-and-tls\"><strong>Security Basics: Users, Passwords, and TLS<\/strong><\/h2>\n\n\n\n<p>Elasticsearch 8.x enables security by default. Set passwords for built-in users and use TLS. For a single-node dev host, keep 127.0.0.1 binding to avoid exposing 9200 publicly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Set or reset the elastic <a href=\"https:\/\/www.youstable.com\/blog\/change-a-database-user-password-in-directadmin\/\">user's password<\/a> (Elasticsearch 8.x)\nsudo \/usr\/share\/elasticsearch\/bin\/elasticsearch-reset-password -u elastic\n\n# (Optional) Generate HTTP\/transport TLS materials\n# This creates a CA and certs you can reference in elasticsearch.yml\nsudo \/usr\/share\/elasticsearch\/bin\/elasticsearch-certutil ca\nsudo \/usr\/share\/elasticsearch\/bin\/elasticsearch-certutil cert --ca elastic-stack-ca.p12<\/code><\/pre>\n\n\n\n<p>For zero-trust environments, terminate TLS at a reverse proxy (Nginx\/HAProxy) with mTLS or IP allowlists, and restrict 9300 to private networks only. Never leave 9200 open to the internet without authentication and TLS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"verify-the-installation\"><strong>Verify the Installation<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># If bound to localhost and security enabled\ncurl -k -u elastic:&lt;PASSWORD&gt; https:\/\/127.0.0.1:9200\n\n# Expected: cluster_name, cluster_uuid, tagline: \"You Know, for Search\"<\/code><\/pre>\n\n\n\n<p>If you see SSL or auth errors, confirm the password, CA trust, and that you are using HTTPS. For non\u2011TLS local testing (not recommended in production), you would connect via http:\/\/127.0.0.1:9200 if security\/TLS are disabled.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"optional-install-kibana\"><strong>Optional: Install Kibana<\/strong><\/h2>\n\n\n\n<p>Kibana is the UI for Elasticsearch exploration and management. Use the same repository you added for Elasticsearch.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Ubuntu\/Debian\nsudo apt install -y kibana\n\n# RHEL family\nsudo dnf install -y kibana || sudo yum install -y kibana\n\n# Configure\nsudo nano \/etc\/kibana\/kibana.yml\n# Minimal edits:\n# server.host: \"0.0.0.0\"              # or private IP\n# elasticsearch.hosts: &#91;\"https:\/\/127.0.0.1:9200\"]\n\n# For 8.x, use enrollment flow or set kibana_system password:\n# sudo \/usr\/share\/elasticsearch\/bin\/elasticsearch-reset-password -u kibana_system\n\n# Start Kibana\nsudo systemctl enable --now kibana\nsudo systemctl status kibana --no-pager<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"production-ready-checklist\"><strong>Production\u2011Ready Checklist<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Network and topology: Use 3+ master\u2011eligible nodes for quorum; separate data and master roles if scaling.<\/li>\n\n\n\n<li>Security: Keep xpack.security enabled; enforce HTTPS; rotate passwords; restrict 9200 to trusted sources.<\/li>\n\n\n\n<li>Heap: 50% of RAM, max 31g; disable swap.<\/li>\n\n\n\n<li>Storage: Use fast SSD\/NVMe; dedicate disks; monitor IOPS; enable RAID1\/10 where needed.<\/li>\n\n\n\n<li>Index lifecycle: Use ILM for logs\/metrics; rollover and shrink to control shard counts.<\/li>\n\n\n\n<li>Shards: Don\u2019t overshard\u2014prefer fewer, larger shards; target shard sizes of a few GB to tens of GB based on workload.<\/li>\n\n\n\n<li>Monitoring: Enable Elastic Stack monitoring or Prometheus exporters; set alerts on heap, CPU steal, disk watermarks.<\/li>\n\n\n\n<li>Backups: Use snapshot repositories (S3, GCS, NFS) and test restores.<\/li>\n\n\n\n<li>Upgrades: Read release notes; upgrade minor versions across the cluster in rolling fashion.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"troubleshooting-common-errors\"><strong>Troubleshooting Common Errors<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"vm-max_map_count-too-low\"><strong>\u201cvm.max_map_count too low\u201d<\/strong><\/h3>\n\n\n\n<p>Set vm.max_map_count=262144 and reload sysctl as shown earlier, then restart Elasticsearch.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"bootstrap-checks-failed-during-startup\"><strong>\u201cbootstrap checks failed\u201d during startup<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure swap is disabled.<\/li>\n\n\n\n<li>Increase file descriptors and nproc.<\/li>\n\n\n\n<li>Use discovery settings (seed hosts and initial master) for clusters.<\/li>\n\n\n\n<li>Don\u2019t bind 0.0.0.0 without proper security.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"high-gc-pauses-or-oom\"><strong>High GC pauses or OOM<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lower shard count; avoid tiny shards.<\/li>\n\n\n\n<li>Right\u2011size heap; keep -Xms = -Xmx, stay under 31g.<\/li>\n\n\n\n<li>Check hot threads: GET _nodes\/hot_threads, profile heavy queries.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"when-to-consider-opensearch\"><strong>When to Consider OpenSearch<\/strong><\/h2>\n\n\n\n<p>Elasticsearch 8.x uses the Elastic license. If you need Apache 2.0 licensing or want AWS-integrated alternatives, consider OpenSearch. Operationally it\u2019s similar, but plugins, features, and APIs can differ. YouStable supports both Elasticsearch and OpenSearch on our VPS and dedicated platforms\u2014ask us which fits your compliance and budget.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"real-world-tips-from-hosting-at-scale\"><strong>Real\u2011World Tips From Hosting at Scale<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Plan index lifecycle early. Log\/metrics stacks balloon; ILM saves storage and cost.<\/li>\n\n\n\n<li>Keep 9200 private. Use a bastion or VPN for API access; expose Kibana behind SSO.<\/li>\n\n\n\n<li>Reserve CPU credits on burstable instances to avoid latency spikes.<\/li>\n\n\n\n<li>Pre-warm caches after rolling restarts for predictable performance.<\/li>\n\n\n\n<li>Test snapshot restores quarterly\u2014backups you can\u2019t restore aren\u2019t backups.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"step-by-step-summary\"><strong>Step\u2011By\u2011Step Summary<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add Elastic\u2019s repo and install the package.<\/li>\n\n\n\n<li>Set vm.max_map_count, disable swap, raise ulimits.<\/li>\n\n\n\n<li>Configure elasticsearch.yml (network, discovery, security).<\/li>\n\n\n\n<li>Tune JVM heap to ~50% RAM (max 31g).<\/li>\n\n\n\n<li>Start and enable the service with systemd.<\/li>\n\n\n\n<li>Secure with passwords and TLS; lock down ports.<\/li>\n\n\n\n<li>Verify with curl and (optionally) install Kibana.<\/li>\n<\/ul>\n\n\n\n<p>If you want a turnkey setup, YouStable can provision an optimized <a href=\"https:\/\/www.youstable.com\/blog\/configure-elasticsearch-on-linux\/\">Linux server with Elasticsearch<\/a> pre\u2011tuned for your workload, including VPC\/firewall hardening, SSL, snapshots, and 24\u00d77 monitoring.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"faqs-how-to-setup-elasticsearch-on-linux-server\"><strong>FAQs: How to Setup Elasticsearch on Linux Server<\/strong><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1765797284845\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"what-is-the-fastest-way-to-install-elasticsearch-on-ubuntu\"><strong>What is the fastest way to install Elasticsearch on Ubuntu?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Use Elastic\u2019s official APT repo, then apt install elasticsearch. This ensures the latest compatible 8.x build with bundled JDK. After install, tune vm.max_map_count, disable swap, edit elasticsearch.yml, and enable the service via systemctl.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765797295498\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"which-ports-does-elasticsearch-need\"><strong>Which ports does Elasticsearch need?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Port 9200 for the HTTP API and 9300 for node\u2011to\u2011node transport. Keep 9200 private or gated by TLS and authentication. Restrict 9300 to your cluster\u2019s private network only.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765797301981\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-much-ram-should-i-allocate-to-the-jvm-heap\"><strong>How much RAM should I allocate to the JVM heap?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Allocate about 50% of system RAM to the heap with -Xms and -Xmx set equally, but cap at 31g to retain compressed object pointers. Leave the remaining RAM for the OS page cache.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765797310298\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"do-i-need-java-installed-separately\"><strong>Do I need Java installed separately?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>No. Elasticsearch 8.x includes a bundled JDK. Using the bundled JDK avoids version conflicts and is the recommended approach.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765797320619\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-do-i-secure-elasticsearch-in-production\"><strong>How do I secure Elasticsearch in production?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Keep xpack.security enabled, set strong passwords for built\u2011in users, enforce HTTPS (TLS), restrict network access, and consider a reverse proxy with SSO or IP allowlisting. Regularly patch and monitor the cluster, and don\u2019t expose 9200 directly to the public internet.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>To set up Elasticsearch on a Linux server, add Elastic\u2019s official repository, install the package, configure elasticsearch.yml (network, discovery, security), [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":15559,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[350],"tags":[],"class_list":["post-13339","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Setup-ElasticSearch-on-Linux-Server.jpg","author_info":{"display_name":"Prahlad Prajapati","author_link":"https:\/\/www.youstable.com\/blog\/author\/prahladblog"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/13339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=13339"}],"version-history":[{"count":4,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/13339\/revisions"}],"predecessor-version":[{"id":15560,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/13339\/revisions\/15560"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/15559"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=13339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=13339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=13339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}