{"id":2748,"date":"2025-09-09T01:32:51","date_gmt":"2024-06-11T21:28:05","guid":{"rendered":""},"modified":"2025-02-02T00:46:19","modified_gmt":"2025-02-01T23:46:19","slug":"how-to-install-opensearch-on-debian-12","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-opensearch-on-debian-12\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 OpenSearch on Debian 12"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header>\n<h1>\u00a0<\/h1>\n<\/header>\n<article>\n<p><strong>OpenSearch<\/strong> is an open-source search and analytics suite derived from Elasticsearch. It is designed to help you index, search, and analyze data at scale. In this guide, we will walk you through how to install OpenSearch on <strong>Debian 12<\/strong>. Hosting OpenSearch on a  ensures optimal performance, scalability, and control using the dedicated resources of a <strong>VPS server<\/strong>.<\/p>\n<h2>Step 1: Update Your VPS Server<\/h2>\n<p>Before installing OpenSearch, ensure your <a href=\"https:\/\/ie.netcloud24.com\">VPS server<\/a> is up to date. Run the following commands to update your Debian system:<\/p>\n<pre><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n<p>Using a <strong>Windows VPS<\/strong> provides dedicated resources, allowing OpenSearch to handle large volumes of data and search queries more efficiently.<\/p>\n<h2>Step 2: Install Java<\/h2>\n<p>OpenSearch requires Java to run. You can install OpenJDK 11, which is recommended for OpenSearch, using the following command:<\/p>\n<pre><code>sudo apt install openjdk-11-jdk -y<\/code><\/pre>\n<p>Verify the Java installation with:<\/p>\n<pre><code>java -version<\/code><\/pre>\n<h2>Step 3: Download and Install OpenSearch<\/h2>\n<p>Now, download the latest version of OpenSearch. Navigate to your desired directory (for example, <code>\/usr\/local<\/code>) and download OpenSearch:<\/p>\n<pre><code>\r\ncd \/usr\/local\r\nsudo wget https:\/\/artifacts.opensearch.org\/releases\/bundle\/opensearch\/2.5.0\/opensearch-2.5.0-linux-x64.tar.gz\r\n<\/code><\/pre>\n<p>Once the download is complete, extract the tarball:<\/p>\n<pre><code>sudo tar -xzf opensearch-2.5.0-linux-x64.tar.gz<\/code><\/pre>\n<p>Move the extracted folder to a more convenient location:<\/p>\n<pre><code>sudo mv opensearch-2.5.0 opensearch<\/code><\/pre>\n<h2>Step 4: Configure OpenSearch<\/h2>\n<p>OpenSearch requires some basic configuration before starting. Navigate to the configuration directory:<\/p>\n<pre><code>cd \/usr\/local\/opensearch\/config<\/code><\/pre>\n<p>Edit the <code>opensearch.yml<\/code> configuration file:<\/p>\n<pre><code>sudo nano opensearch.yml<\/code><\/pre>\n<p>Add or modify the following settings (replace <code>your-server-ip<\/code> with your actual server IP address):<\/p>\n<pre><code>\r\ncluster.name: my-cluster\r\nnetwork.host: 0.0.0.0\r\nnode.name: node-1\r\ndiscovery.seed_hosts: [\"127.0.0.1\", \"your-server-ip\"]\r\ncluster.initial_master_nodes: [\"node-1\"]\r\n<\/code><\/pre>\n<p>Save and close the file.<\/p>\n<h2>Step 5: Create a Systemd Service for OpenSearch<\/h2>\n<p>To manage OpenSearch as a service, create a systemd service file:<\/p>\n<pre><code>sudo nano \/etc\/systemd\/system\/opensearch.service<\/code><\/pre>\n<p>Add the following content to the file:<\/p>\n<pre><code>\r\n[Unit]\r\nDescription=OpenSearch Service\r\nDocumentation=https:\/\/opensearch.org\/\r\nWants=network-online.target\r\nAfter=network-online.target\r\n\r\n[Service]\r\nType=simple\r\nUser=root\r\nExecStart=\/usr\/local\/opensearch\/bin\/opensearch\r\nRestart=on-failure\r\nLimitNOFILE=65535\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/code><\/pre>\n<p>Save the file, then reload systemd and start the OpenSearch service:<\/p>\n<pre><code>\r\nsudo systemctl daemon-reload\r\nsudo systemctl start opensearch\r\nsudo systemctl enable opensearch\r\n<\/code><\/pre>\n<h2>Step 6: Configure Firewall for OpenSearch<\/h2>\n<p>If you have a firewall enabled, you need to allow traffic on OpenSearch\u2019s default port (9200). Run the following commands to open the necessary port:<\/p>\n<pre><code>\r\nsudo ufw allow 9200\/tcp\r\nsudo ufw reload\r\n<\/code><\/pre>\n<h2>Step 7: Verify OpenSearch Installation<\/h2>\n<p>To verify that OpenSearch is running, you can use the following command to check the service status:<\/p>\n<pre><code>sudo systemctl status opensearch<\/code><\/pre>\n<p>Additionally, you can verify that OpenSearch is accessible by sending a request using <code>curl<\/code>:<\/p>\n<pre><code>curl http:\/\/localhost:9200<\/code><\/pre>\n<p>You should see output confirming that OpenSearch is running and ready to process requests.<\/p>\n<h2>Step 8: Secure OpenSearch with Basic Authentication (Optional)<\/h2>\n<p>To secure OpenSearch, you can configure basic authentication. Navigate to the <code>opensearch-plugins<\/code> directory and run the following command to generate passwords for the built-in users:<\/p>\n<pre><code>sudo \/usr\/local\/opensearch\/bin\/opensearch-securityadmin.sh<\/code><\/pre>\n<p>Follow the prompts to configure security settings, including enabling SSL and adding basic authentication to protect your OpenSearch cluster.<\/p>\n<h2>Step 9: Optimize Your VPS Server for OpenSearch<\/h2>\n<p>Running OpenSearch on a  allows you to take advantage of dedicated resources such as CPU, memory, and storage, which are crucial for handling large datasets and multiple queries. A <strong>VPS server<\/strong> provides scalability, enabling you to increase resources as your search and analytics requirements grow.<\/p>\n<h2>Conclusion<\/h2>\n<p>OpenSearch is a powerful search and analytics platform, and installing it on Debian 12 allows you to build scalable search applications. Hosting OpenSearch on a  ensures better performance, dedicated resources, and flexibility for handling growing data needs.<\/p>\n<p>For more information about VPS hosting and optimizing your OpenSearch setup, visit  today.<\/p>\n<\/article>\n<footer>\n<p>\u00a9 2024 Windows VPS &#8211; All Rights Reserved<\/p>\n<\/footer>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 OpenSearch is an open-source search and analytics suite derived from Elasticsearch. It is designed to help you index, search, and analyze data at scale. In this\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-2748","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=2748"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2748\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=2748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=2748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=2748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}