Connect to an OpenSearch cluster
To connect to an OpenSearch cluster, connect to nodes in a group with the Manager, Data, or Dashboard role. The choice of node to connect to depends on the purpose of the connection—for example, if you need access to the cluster dashboard, you must connect to a node from a group with the Dashboard role. More information about node groups and their roles is available in the Node Groups instruction.
You can:
- connect to nodes in a group with the Manager and Data roles — via code with SSL;
- connect to a node in a group with the Dashboard role — via the OpenSearch Dashboards web interface or OpenSearch API.
TLS(SSL) encryption is supported only when connecting via a private IP address.
When connecting, specify the port and address.
Connection ports
Use port 9200 to connect to cluster nodes.
Connection addresses
You can choose an address for connection depending on one of the scenarios:
You can view the connection address in the Control Panel.

Connecting to a cluster from a private subnet
If you are connecting to a cluster from a private subnet, use a private IP address.
To connect from another private subnet, first connect both private subnets to a cloud router.
Connecting to a cluster from the internet
If you are connecting to the cluster from the Internet, use a public IP address.
View connection address
- In the Control panel, from the top menu, click Products and select Cloud Databases.
- Open the Active tab.
- Open the database cluster page → Connection tab.
- In the Addresses for connection block, open the tab of the node group whose addresses you want to view.
Connect to nodes of a group with the Manager and Data roles
You can connect to nodes in a group with the Manager and Data role via SSL using only a private IP address. Connecting using TLS (SSL) encryption ensures a secure connection between your server and the database cluster.
Bash
Python
Go
Node.js
-
Download the root certificate and place it in the
~/.opensearch/:folder:mkdir -p ~/.opensearch/wget https://storage.dbaas.selcloud.ru/CA.pem -O ~/.opensearch/root.crtchmod 0600 ~/.opensearch/root.crt -
Connect to the node:
curl -XGET -u 'admin:<password>' --cacert ~/.opensearch/root.crt 'https://<ip_address>:<port>/'Specify:
<password>— password of the administrator user;<ip_address>— node IP address;<port>— connection port.
Connect to a group node with the Dashboard role
OpenSearch Dashboards
OpenSearch API
You can connect to a group node with the Dashboard role through the OpenSearch Dashboards web interface.
-
Open the following page in your browser:
https://<ip_address>Specify
<ip_address>— the IP address of the group node with the Dashboard role. -
Enter the username —
admin. -
Enter the password — set when creating the cluster. After creation, the password cannot be viewed in the Control panel, but it can be changed.
-
To test the connection, in the Dev Tools console, run a test request — for example, check the cluster status:
GET _cluster/healthThe response will contain information about the cluster status.