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 your connection — for example, if you need access to the cluster dashboard, you must connect to a node from the group with the Dashboard role. For more information about node groups and their roles, see the Node Groups guide.
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
The connection address depends on where you are connecting from. You can choose an address based on one of the following scenarios:

Connecting to a cluster from a private subnet
If you are connecting to a cluster from a private subnet, use the private IP address.
To connect from a different private subnet, first connect both private subnets to a cloud router.
You can view the connection address in the Control panel.
Connecting to a cluster from the internet
If you are connecting to a 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.
You can view the connection address in the Control panel.
View connection address
- In the Control panel, on the top menu, click Products 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 in a group with the Manager and Data roles
You can connect to nodes in a group with the Manager and Data roles with SSL only via a private IP address. Using TLS(SSL) encryption ensures a secure connection between your server and the Managed Databases 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 node in a group with the Dashboard role
OpenSearch Dashboards
OpenSearch API
You can connect to a node in a group with the Dashboard role via the OpenSearch Dashboards web interface.
-
Open the following page in your browser:
https://<ip_address>Specify
<ip_address>— IP address of the node in the group with the Dashboard role. -
Enter username —
admin. -
Enter password — set when creating the cluster. Once created, 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 query — for example, check the cluster status:
GET _cluster/healthCluster status information will appear in the response.