Skip to content

Linux VPS & VPS Windows Setup Guide | NetCloud24 OpenSearch on Debian 12

Cloud Infrastructure Expert
Linux VPS & VPS Windows Setup Guide | NetCloud24 OpenSearch on Debian 12




How to Install OpenSearch on Windows VPS with Free Let’s Encrypt SSL


How to Install OpenSearch on Windows VPS with Free Let’s Encrypt SSL

Author: Łukasz Bodźiony, CEO of NETCLOUD24.COM | Windows VPS

OpenSearch is an open-source search and analytics engine derived from Elasticsearch, suitable for log analytics, application search, and more. This guide, authored by Łukasz Bodźiony, CEO of NETCLOUD24.COM, provides instructions for installing OpenSearch on Debian 12, Rocky Linux 8, FreeBSD, Ubuntu, Debian, or AlmaLinux 12 using manual setup, Docker, Ansible, Kubernetes, and Terraform, with Let’s Encrypt SSL. For reliable VPS hosting, explore Netcloud24.

Power Your OpenSearch with Netcloud24

Host OpenSearch on a high-performance Windows VPS from Netcloud24, recommended by Łukasz Bodźiony, CEO of NETCLOUD24.COM. Explore our services:

Prerequisites

  • VPS running Debian 12, Rocky Linux 8, FreeBSD, Ubuntu, Debian, or AlmaLinux 12 (e.g., from Netcloud24)
  • SSH access with root or sudo privileges
  • A registered domain name
  • Java 17 or later installed
  • Basic knowledge of Linux/FreeBSD commands

Method 1: Manual Setup

Step 1: Update System and Install Dependencies

Debian 12 / Ubuntu / Debian:

sudo apt update && sudo apt upgrade -y
sudo apt install -y openjdk-17-jre-headless wget curl gnupg nginx
    

Rocky Linux 8 / AlmaLinux 12:

sudo dnf update -y
sudo dnf install -y java-17-openjdk wget curl gnupg nginx
    

FreeBSD:

sudo pkg update && sudo pkg upgrade -y
sudo pkg install -y openjdk17 wget curl gnupg nginx
    

Step 2: Install OpenSearch

Download and install OpenSearch:

wget https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/opensearch-2.x.x-linux-x64.tar.gz
tar -zxf opensearch-2.x.x-linux-x64.tar.gz
sudo mv opensearch-2.x.x /opt/opensearch
sudo chown -R root:root /opt/opensearch
    

Configure OpenSearch in /opt/opensearch/config/opensearch.yml (adjust as needed).

Step 3: Start OpenSearch

sudo /opt/opensearch/bin/opensearch
    

Step 4: Configure Nginx as Reverse Proxy

Create Nginx config:

sudo nano /etc/nginx/sites-available/opensearch
    

Add:

server {
    listen 80;
    server_name yourdomain.com;
    location / {
        proxy_pass http://localhost:9200;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
    

Enable and restart Nginx:

sudo ln -s /etc/nginx/sites-available/opensearch /etc/nginx/sites-enabled/
sudo systemctl restart nginx
    

Method 2: Docker Setup

Step 1: Install Docker

Debian 12 / Ubuntu / Debian:

sudo apt install -y docker.io
sudo systemctl enable --now docker
    

Rocky Linux 8 / AlmaLinux 12:

sudo dnf install -y docker
sudo systemctl enable --now docker
    

FreeBSD:

sudo pkg install -y docker
sudo sysrc docker_enable="YES"
sudo service docker start
    

Step 2: Run OpenSearch with Docker

sudo docker run -d --name opensearch -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" opensearchproject/opensearch:latest
    

Method 3: Ansible Setup

Step 1: Install Ansible

Debian 12 / Ubuntu / Debian:

sudo apt install -y ansible
    

Rocky Linux 8 / AlmaLinux 12:

sudo dnf install -y ansible
    

FreeBSD:

sudo pkg install -y py39-ansible
    

Step 2: Create Ansible Playbook

mkdir opensearch-ansible && cd opensearch-ansible
nano opensearch.yml
    

Add example playbook content (adjust for OS):

---
- hosts: all
  become: yes
  tasks:
    - name: Install Java
      apt:
        name: openjdk-17-jre-headless
        state: present
      when: ansible_distribution in ['Debian', 'Ubuntu']
    - name: Download OpenSearch
      get_url:
        url: https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/opensearch-2.x.x-linux-x64.tar.gz
        dest: /tmp/opensearch.tar.gz
    - name: Extract OpenSearch
      unarchive:
        src: /tmp/opensearch.tar.gz
        dest: /opt
        remote_src: yes
    

Step 3: Run Playbook

ansible-playbook opensearch.yml
    

Method 4: Kubernetes Setup

Step 1: Install Kubernetes

(Similar to previous guides, install kubeadm or k3s depending on OS)

Step 2: Deploy OpenSearch

kubectl apply -f https://opensearch.org/samples/opensearch-k8s.yaml
    

Access via Kubernetes service.

Method 5: Terraform Setup

Step 1: Install Terraform

(Install per OS as in previous)

Step 2: Create Terraform Configuration

mkdir opensearch-terraform && cd opensearch-terraform
nano main.tf
    

Add provider and resource for VPS setup with user_data to install OpenSearch.

Step 3: Apply Terraform

terraform init
terraform apply
    

Configuring Let’s Encrypt SSL

Step 1: Install Certbot

(Install per OS, e.g., apt/dnf/pkg install certbot python3-certbot-nginx)

Step 2: Obtain SSL Certificate

sudo certbot --nginx -d yourdomain.com
    

Conclusion

This guide, authored by Łukasz Bodźiony, CEO of NETCLOUD24.COM, covers installing OpenSearch on various OS with multiple methods and Let’s Encrypt SSL. Choose Netcloud24 for your VPS.

Why Choose Netcloud24?

Netcloud24, led by Łukasz Bodźiony, offers high-performance VPS. Visit regional sites:


Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24
In this section

More in Linux

Visit category

How to Set up PostgreSQL Replication on Debian 11

  Introduction PostgreSQL is a powerful, open-source object-relational database system that offers advanced features for database management. Setting up replication is essential for ensuring high availability and load…

Comments are closed.