﻿---
title: Connect to a remote cluster
description: To replicate an index on a remote cluster (Cluster A) to a local cluster (Cluster B), you configure Cluster A as a remote on Cluster B. To configure a...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4399/deploy-manage/tools/cross-cluster-replication/_connect_to_a_remote_cluster
products:
  - Elasticsearch
---

# Connect to a remote cluster
To replicate an index on a remote cluster (Cluster A) to a local cluster (Cluster B), you configure Cluster A as a remote on Cluster B.
![ClusterA contains the leader index and ClusterB contains the follower index](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4399/deploy-manage/images/elasticsearch-reference-ccr-tutorial-clusters.png)

To configure a remote cluster in Kibana:
1. Set up a [secure connection](/elastic/docs-content/pull/4399/deploy-manage/remote-clusters/remote-clusters-self-managed#add-remote-clusters) as needed.
2. Go to the **Remote Clusters** management page in the navigation menu or use the [global search field](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4399/explore-analyze/find-and-organize/find-apps-and-objects).
3. Select the appropriate connection type.
4. Specify the Elasticsearch endpoint URL, or the IP address or host name of the remote cluster (`ClusterA`) followed by the transport port (defaults to `9300`). For example, `cluster.es.eastus2.staging.azure.foundit.no:9400` or `192.168.1.1:9300`.

<dropdown title="API example">
  You can also use the [cluster update settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings) to add a remote cluster:
  ```json

  {
    "persistent" : {
      "cluster" : {
        "remote" : {
          "leader" : {
            "seeds" : [
              "127.0.0.1:9300" <1>
            ]
          }
        }
      }
    }
  }
  ```
  You can verify that the local cluster is successfully connected to the remote cluster.
  ```json
  ```
  The API response indicates that the local cluster is connected to the remote cluster with cluster alias `leader`.
  ```json
  {
    "leader" : {
      "seeds" : [
        "127.0.0.1:9300"
      ],
      "connected" : true,
      "num_nodes_connected" : 1, 
      "max_connections_per_cluster" : 3,
      "initial_connect_timeout" : "30s",
      "skip_unavailable" : true,
      "mode" : "sniff"
    }
  }
  ```
</dropdown>