{"id":460,"date":"2024-11-19T17:21:16","date_gmt":"2024-11-19T17:21:16","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2024\/11\/19\/10157780-how-to-use-the-elasticsearch-vps-template\/"},"modified":"2025-08-27T06:43:27","modified_gmt":"2025-08-27T06:43:27","slug":"10157780-how-to-use-the-elasticsearch-vps-template","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/10157780-how-to-use-the-elasticsearch-vps-template\/","title":{"rendered":"How to use the Elasticsearch VPS template"},"content":{"rendered":"<p class=\"no-margin\">Elasticsearch is a powerful search and analytics engine that enables fast data querying and efficient indexing. Our Elasticsearch VPS template makes setting up Elasticsearch on your Hostinger VPS straightforward. This guide will walk you through the steps to get started.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">If you don&rsquo;t have a VPS yet, you can check the available options here: <b><a href=\"https:\/\/www.hostinger.com\/vps-hosting\" target=\"_blank\" class=\"intercom-content-link\">VPS hosting<\/a><\/b> <\/p>\n<\/div><p class=\"no-margin\">To start using Elasticsearch, install the <b>Ubuntu 22.04 with Elasticsearch<\/b> template and follow these steps:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2024\/11\/4dc58f35-7653-4fa6-a42f-2abaf5f5d6f2.jpg\"><\/div><p class=\"no-margin\">\n<\/p><h2 id=\"h_a371e76ca8\"><b>Step 1 &ndash; Connect to Your VPS<\/b><\/h2><p class=\"no-margin\">Open <b>Terminal<\/b> (Linux\/macOS) or <b>Command Prompt\/PowerShell<\/b> (Windows) on your local computer and enter the following command:<\/p><p class=\"no-margin\">\n<\/p><pre><code>ssh root@your_vps_ip<\/code><\/pre><p class=\"no-margin\">Replace <code>your_vps_ip<\/code> with your VPS IP address. You might be prompted to enter your VPS password.<\/p><p class=\"no-margin\">\n<\/p><h2 id=\"h_69c1a3f0a5\"><b>Step 2 &ndash; Verify Elasticsearch Installation<\/b><\/h2><p class=\"no-margin\">After logging into the VPS, check if Elasticsearch is running with the command:<\/p><p class=\"no-margin\">\n<\/p><pre><code>systemctl status elasticsearch<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">You should see a message indicating that Elasticsearch is active and running. Test the Elasticsearch API by making a simple HTTP request inside your terminal:<\/p><p class=\"no-margin\">\n<\/p><pre><code>curl -X GET \"http:\/\/localhost:9200\"<\/code><\/pre><p class=\"no-margin\">Or simply go to <b>http:\/\/your_vps_ip:9200\/<br>&#8203;<\/b><\/p><p class=\"no-margin\">Both of these methods should return a JSON response with Elasticsearch&rsquo;s status.<br>&#8203;<\/p><h2 id=\"h_69edc871e3\"><b>Step 3 &ndash; Test Elasticsearch with Sample Data<\/b><\/h2><p class=\"no-margin\">Index some sample data:<\/p><p class=\"no-margin\">\n<\/p><pre><code>curl -X POST \"http:\/\/localhost:9200\/my_index\/_doc\/1\" -H 'Content-Type: application\/json' -d'<br><br>{<br>  \"name\": \"Test Data\",<br>  \"type\": \"Sample\",<br>}<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">Then query the data:<\/p><p class=\"no-margin\">\n<\/p><pre><code>curl -X GET \"http:\/\/localhost:9200\/my_index\/_search?q=type:Sample\"<\/code><\/pre><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">You should be able to see the same data, that we provided a second ago in a sample.<br>&#8203;<\/p><h2 id=\"h_13b91e579f\"><b>Step 4 &ndash; Visualizing and Scaling<\/b><\/h2><p class=\"no-margin\">Use tools like <b><a href=\"https:\/\/www.elastic.co\/kibana\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">Kibana<\/a><\/b> for visualizing Elasticsearch data. And if your workload increases, consider scaling up your VPS resources from the Hostinger hPanel.<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\">That&rsquo;s it! Now you can easily set up and start using Elasticsearch on your Hostinger VPS. Enjoy the power of fast search and efficient data management!<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Make sure to explore the official <b><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/elasticsearch-intro-what-is-es.html\" target=\"_blank\" class=\"intercom-content-link\" rel=\"noopener\">Elasticsearch documentation<\/a><\/b> and resources to learn more &#128161;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Getting started with Elasticsearch on VPS<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[206],"tags":[],"class_list":["post-460","post","type-post","status-publish","format-standard","hentry","category-vps-os-and-templates"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/10157780-how-to-use-the-elasticsearch-vps-template\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=460"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/460\/revisions"}],"predecessor-version":[{"id":2242,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/460\/revisions\/2242"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}