
Elasticsearch is a distributed, open-source search and analytics engine built on Apache Lucene. It delivers real-time indexing, full-text search, aggregations, and vector-based retrieval at scale. The Vultr Marketplace provides a pre-configured Elasticsearch instance, enabling quick deployment and setup on a Vultr server.
This guide explains deploying and using Vultr's Elasticsearch Marketplace Application. You will deploy an instance, configure security, verify health, index and search data, set up snapshots to Vultr Object Storage, and add basic monitoring and integrations.
Log in to your Vultr Console and click the Deploy Server button.
Select your preferred server type.
Choose a server location.
Select a server plan with at least 4GB RAM and 2 CPU cores for production workloads.
Click the Configure button to proceed.
Under Marketplace Apps, search for Elasticsearch and select it as the Marketplace Application.
Select the Limited Login option from the Additional Features section to create a limited user with sudo access.
Review your configurations and click the Deploy Now button to start deployment.
It may take up to 10 minutes for your server to finish installing Elasticsearch.
After the instance shows the status of Running, navigate to the Server Overview page and copy the SSH connection details.
After deployment, complete essential baseline tasks to make the instance reachable and secure. You will map a friendly domain, confirm service health, lock down network access, and enable built-in security before exposing the HTTP API to the internet.
Create a DNS A record pointing to your server's IP address, such as elastic.example.com.
Connect to your Vultr server instance over SSH using the connection details from the Server Information page.
Check the Elasticsearch service status.
The service should show as active (running).
Verify the installed Elasticsearch version.
Output:
Secure your server by configuring the firewall to allow only necessary traffic.
Allow SSH connections.
Allow HTTP and HTTPS traffic for Nginx and Certbot.
Enable the firewall.
Verify firewall status.
Port 9200 is used by Elasticsearch's HTTP API. You will remove this rule after enabling SSL through the Nginx reverse proxy.
Set up Nginx as a reverse proxy to serve Elasticsearch over standard HTTPS port with authentication, securing public access.
Install the Nginx web server package.
Create a password file for basic authentication.
Enter a secure password when prompted. This creates the admin user for accessing Elasticsearch.
Create an Nginx virtual host configuration for Elasticsearch.
Replace elastic.example.com with your domain name.
Save and close the file.
Enable the Elasticsearch server block.
Test the Nginx configuration syntax.
Output:
Reload Nginx to apply the changes.
Enable HTTPS access through the Nginx reverse proxy using Let's Encrypt certificates.
Install Certbot and the Nginx plugin.
Request an SSL certificate for your domain.
Follow the prompts and select the option to redirect HTTP traffic to HTTPS when asked.
Verify SSL certificate auto-renewal.
Access Elasticsearch securely at https://elastic.example.com.
Test the public endpoint with basic authentication:
You can now use this public HTTPS endpoint for external access, while server-side commands can continue using http://localhost:9200.
Close direct port 9200 access now that traffic goes through the Nginx reverse proxy.
Elasticsearch requires specific operating system settings for optimal performance and stability.
Increase the virtual memory map count.
Disable swap to prevent performance degradation.
Persist these settings across reboots.
Add the following lines:
Save and close the file.
Configure JVM heap size (set to approximately 50% of available RAM, maximum 32GB).
Add the following lines (adjust based on your server's RAM):
For a server with 8GB RAM, use -Xms4g and -Xmx4g. Save and close the file.
Restart Elasticsearch to apply all changes.
Elasticsearch provides powerful search and analytics capabilities through its REST API. Verify your cluster is healthy before indexing data.
Check cluster health status.
A green status indicates all shards are allocated. yellow is normal for single-node setups (no replicas).
List all indices.
Learn the core Elasticsearch workflow by creating an index, adding documents, and performing searches with filters and aggregations.
Create a new index with mapping for products.
Add a sample product document.
Search with filters and aggregations.
Extend Elasticsearch's capabilities by connecting visualization dashboards, log shippers, and alerting systems. This section demonstrates setting up Kibana for interactive exploration, plus highlights other ecosystem tools to build a complete observability stack.
Kibana is the official visualization platform for Elasticsearch, providing dashboards, charts, and exploration tools.
Install Kibana.
Configure Kibana to connect to Elasticsearch.
Update the configuration:
Save and close the file.
Start and enable Kibana.
Access Kibana at http://elastic.example.com:5601 or configure an Nginx reverse proxy with SSL similar to Elasticsearch for production use.
Elasticsearch supports integrations with various external tools:
Protect your data by configuring automated backups to Vultr Object Storage, which is S3-compatible. Use the Elasticsearch keystore to securely store credentials instead of plaintext in configuration files.
Create a bucket in Vultr Object Storage. Note your bucket name and access credentials.
Add your Vultr Object Storage credentials to the Elasticsearch keystore.
Enter your access key when prompted.
Enter your secret key when prompted.
Restart Elasticsearch to load the keystore changes.
Register the S3 snapshot repository.
Replace YOUR_BUCKET_NAME with your bucket name and ewr1.vultrobjects.com with your region's endpoint (e.g., sjc1.vultrobjects.com for San Jose).
Verify the repository and create your first snapshot.
List all snapshots.
Restore a snapshot.
Use these recommendations to keep your single-node deployment reliable and responsive. You will configure retention with Index Lifecycle Management (ILM), standardize defaults with index templates, monitor JVM memory usage, and enable diagnostics like slow query logs. Adjust values to match your data size and workload profile.
Set up index lifecycle policies to automatically delete old indices (example: 30 days).
Monitor JVM heap usage and cluster performance.
This section covers common issues and diagnostic commands to help resolve problems with your Elasticsearch instance.
Verify Elasticsearch service is running and view recent logs.
Verify cluster health.
A green status indicates all shards are allocated. yellow means some replica shards are unallocated (normal for single-node). red indicates data loss.
Diagnose unallocated shards.
Elasticsearch excels in various real-world scenarios:
In this guide, you deployed Vultr's Elasticsearch Marketplace Application and configured it for production use. You secured the instance with firewall rules, authentication, and TLS encryption, applied OS-level tuning for optimal performance, and explored core search capabilities including indexing, querying, and aggregations. You configured role-based access control, set up snapshots to Vultr Object Storage for data protection, and integrated monitoring tools like Kibana. With these production-ready configurations, you can build scalable search applications, centralize log management, and perform real-time analytics on your data.
0 Comments
Be the first to comment and share your perspective with the community.