Import PGP key of the repository and create the repository entry
wget -qO - https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --dearmor -o /etc/apt/trusted.gpg.d/opensearch.pgp echo "deb [signed-by=/etc/apt/trusted.gpg.d/opensearch.pgp] https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/2.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/opensearch-dashboards-2.x.list
Update APT install all pending updates
apt update && upgrade -y
apt install opensearch-dashboards
Get all available versions
apt list -a opensearch-dashboards
If the service started successfully, Opensearch Dashboards should be reachable with a browser at 5601
Install a specific version
sudo apt install opensearch-dashboards=2.5.0
Set the environment variables for Opensearch Dashboards
export OSD_HOME=/usr/share/opensearch-dashboards export OSD_PATH_CONF=/etc/opensearch-dashboards
Copy the certificates
cd /etc/opensearch-dashboards mkdir certs chown opensearch-dashboards:opensearch-dashboards certs chmod 600 certs cd certs cp /etc/opensearch/certs/root-ca-myopensearch.pem ./ cp /etc/opensearch/certs/node-01.pem ./ cp /etc/opensearch/certs/node-01-key.pem ./
In /etc/opensearch-dashboards/opensearch-dashboards.yml set:
--- # Copyright OpenSearch Contributors # SPDX-License-Identifier: Apache-2.0 # Configuration for OpenSearch Dashboards # server.port: 5601 server.host: "node-01" # The OpenSearch Dashboards server's name. This is used for display purposes. server.name: "node-01" # Enable SSL for Dashboards server.ssl.enabled: true server.ssl.certificate: /etc/opensearch-dashboards/certs/node-01.pem server.ssl.key: /etc/opensearch-dashboards/certs/node-01-key.pem # The URLs of the OpenSearch instances to use for all your queries. opensearch.hosts: ["https://node-01:9200"] # Security (SSL/ TLS) configuration opensearch.ssl.certificate: /etc/opensearch-dashboards/certs/node-01.pem opensearch.ssl.key: /etc/opensearch-dashboards/certs/node-01-key.pem # Optional setting that enables you to specify a path to the PEM file for the certificate # authority for your OpenSearch instance. opensearch.ssl.certificateAuthorities: [ "/etc/opensearch-dashboards/certs/root-ca-myopensearch.pem" ] # To disregard the validity of SSL certificates, change this setting's value to 'none'. # opensearch.ssl.verificationMode: full opensearch.ssl.verificationMode: certificate # Enables you to specify a file where OpenSearch Dashboards stores log output. #logging.dest: stdout logging.dest: /var/log/opensearch-dashboards/dashboards.log # opensearch.hosts: [https://localhost:9200] # opensearch.ssl.verificationMode: none opensearch.username: dashboardsserver opensearch.password: password opensearch.requestHeadersWhitelist: [authorization, securitytenant] opensearch_security.multitenancy.enabled: true opensearch_security.multitenancy.tenants.preferred: [Private, Global] opensearch_security.readonly_mode.roles: [kibana_read_only] opensearch_security.cookie.secure: true
Create user for Dashboards and create password (see “Configure users” in Opensearch Installation on Linux)
Now the system contains a basic configuration
systemctl daemon-reload
systemctl enable opensearch-dashboards
systemctl start opensearch-dashboards
systemctl status opensearch-dashboards
The last command should show:
● opensearch-dashboards.service - "OpenSearch Dashboards" Loaded: loaded (/lib/systemd/system/opensearch-dashboards.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-01-01 00:00:01 CET; 0h 01min ago ...
If the service started without errors, Opensearch Dashboards should now be reachable at https://node-01:5601