Last updated on July 6, 2023
To install Elasticsearch on a Windows Server with SSL certificates, you can follow these steps:
- Download and install Java Development Kit (JDK):
- Download the latest version of the JDK for Windows from the Oracle website: https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
- Run the JDK installer and follow the installation instructions.
- Download Elasticsearch:
- Go to the Elasticsearch downloads page: https://www.elastic.co/downloads/elasticsearch
- Under “Download Elasticsearch,” click on “Windows” to download the ZIP file.
- Extract the Elasticsearch ZIP file:
- Extract the downloaded ZIP file to a directory of your choice, such as
C:\elasticsearch
.
- Extract the downloaded ZIP file to a directory of your choice, such as
- Configure Elasticsearch for SSL:
- Open the
elasticsearch.yml
configuration file located in theconfig
directory of the Elasticsearch installation. - Uncomment and modify the following settings:
- Set
network.host
to the IP address or hostname of your server. - Set
http.port
to the desired HTTP port number (e.g., 9200). - Set
http.enabled
tofalse
to disable HTTP access. - Set
xpack.security.enabled
totrue
to enable X-Pack security features. - Configure SSL settings, such as
xpack.security.transport.ssl.enabled
,xpack.security.transport.ssl.keystore.path
,xpack.security.transport.ssl.truststore.path
, etc., according to your SSL certificate configuration.
- Set
- Open the
- Copy your SSL certificate files:
- Copy your SSL certificate files (e.g., keystore, truststore) to a location on your server.
- Start Elasticsearch:
- Open a command prompt or PowerShell in the Elasticsearch directory (e.g.,
C:\elasticsearch
). - Run the following command to start Elasticsearch
.\bin\elasticsearch.bat
- Open a command prompt or PowerShell in the Elasticsearch directory (e.g.,
- Verify Elasticsearch:
- Open a web browser and navigate to
https://localhost:9200
(replacelocalhost
with your server IP or hostname). - If Elasticsearch is running and SSL is configured correctly, you should see JSON information about the Elasticsearch cluster.
- Open a web browser and navigate to
By following these steps, you can install Elasticsearch on a Windows Server and configure SSL certificates for secure communication. Make sure to adjust the SSL configuration settings and paths based on your SSL certificate setup.