Connect to an OpenSearch cluster
To connect to an OpenSearch cluster, connect to nodes in a group with the Manager, Data, or Dashboard role. Choosing a node for connection depends on the purpose of your connection — for example, if you need access to the cluster dashboard, you should connect to a node from the group with the Dashboard role. For more information about node groups and their roles, see 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. The private subnet must meet the requirements. If the subnet does not meet the requirements, prepare it for a public IP address connection.
View connection address
- In the Control Panel, click Products in the top menu and select Managed Databases.
- Open the Active tab.
- Open the database cluster page → Connection tab.
- In the Connection addresses block, open the tab for 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 of groups with the Manager and Data roles using SSL only via 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/: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>— administrator password; ;<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>— IP address of a node in the group with the Dashboard role. -
Enter the login —
admin. -
Enter the password — it is specified during cluster creation. Once created, the password cannot be viewed in the Control Panel, but it can be changed.
-
To verify the connection, run a test query in the Dev Tools console — for example, check the cluster status:
GET _cluster/healthThe response will contain information about the cluster status.