<a id="cloud-install-schema-registry"></a>

# Connect Self-Managed Schema Registry to Confluent Cloud

You can work with Schema Registry on Confluent Cloud in multiple ways:

- Connect a self-managed Schema Registry to Confluent Cloud (described below)
- [Migrate schemas from a self-managed Schema Registry to Confluent Cloud (one-time migration or ongoing)](/platform/current/schema-registry/installation/migrate.html)
- [Use the native Confluent Cloud Schema Registry](../get-started/schema-registry.md#cloud-sr-config)

To learn requirements and options for working with Schema Registry by means of access control lists (ACLs) and role-based access control (RBAC), see [access control lists (ACLs)](../security/access-control/acls/overview.md#acl-manage), [RBAC role](../security/access-control/rbac/overview.md#cloud-rbac), and [Access control (RBAC) for Stream Lineage](../stream-governance/stream-lineage.md#stream-lineage-rbac).

<a id="self-managed-sr-ccloud"></a>

## Connect self-managed Schema Registry to Confluent Cloud

You can connect a self-managed or on-premises Schema Registry to Confluent Cloud as described in this section.

### Prerequisites

- Access to Confluent Cloud.
- [Confluent CLI](https://docs.confluent.io/confluent-cli/current/install.html).

- A Confluent Cloud instance is running.
- [Confluent Platform](/platform/current/installation/index.html)

#### NOTE
The Confluent Platform installation provides the binaries for Schema Registry that run locally and connect to your Confluent Cloud cluster. You do not have to start the other Confluent Platform services.

### Configure and connect

1. Configure Schema Registry by modifying `etc/schema-registry/schema-registry.properties`. The minimally required Schema Registry property settings for Confluent Cloud are provided below:
   ```bash
   # If set to true, API requests that fail will include extra debugging information, including stack traces.
   debug=false

   # REQUIRED: Specifies the bootstrap servers for your Kafka cluster. It is used for selecting the primary
   # Schema Registry instance and for storing the registered schema data.
   kafkastore.bootstrap.servers=<bootstrap-servers>

   # REQUIRED: Specifies Confluent Cloud authentication.
   kafkastore.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
     username="<api-key>" \
     password="<api-secret>";

   # Configures Schema Registry to use SASL authentication.
   kafkastore.sasl.mechanism=PLAIN

   # Configures Schema Registry for SSL encryption.
   kafkastore.security.protocol=SASL_SSL

   # Specifies the name of the topic to store schemas in.
   kafkastore.topic=_schemas

   # Specifies the address the socket server listens on. The format is
   # "listeners = listener_name://host_name:port". For example, "listeners = PLAINTEXT://your.host.name:9092".
   listeners=http://0.0.0.0:8081
   ```

   For more information, see [Schema Registry configuration options](/platform/current/schema-registry/installation/deployment.html), [Configuring PLAIN](/platform/current/kafka/authentication_sasl/authentication_sasl_plain.html#sr),
   and [Quick Start for Schema Management on Confluent Cloud](../get-started/schema-registry.md#cloud-sr-config) (for native cloud Schema Registry).
2. Start Schema Registry with the `schema-registry.properties` file specified.
   ```bash
   bin/schema-registry-start etc/schema-registry/schema-registry.properties
   ```

## Docker environment

You can run a mix of fully managed services in Confluent Cloud and self-managed components running in Docker. For a Docker
environment that connects any Confluent Platform component to Confluent Cloud, see [cp-all-in-one-cloud](https://github.com/confluentinc/cp-all-in-one/tree/latest/cp-all-in-one-cloud).

## Suggested reading

- To learn how to migrate schemas from an on-premises (self-managed) Schema Registry to Confluent Cloud, see [Migrate Schemas](/platform/current/schema-registry/installation/migrate.html).
- To configure and run native Confluent Cloud Schema Registry, see [Quick Start for Schema Management on Confluent Cloud](../get-started/schema-registry.md#cloud-sr-config).
- For more information about running a cluster, see the [Schema Registry](/platform/current/schema-registry/installation/deployment.html) documentation.
- To view a working example of hybrid Apache Kafka® clusters from self-hosted to Confluent Cloud, see [cp-demo](/platform/current/tutorials/cp-demo/docs/index.html).
- For example configs for all Confluent Platform components and clients connecting to Confluent Cloud, see [template examples for components](https://github.com/confluentinc/examples/tree/latest/ccloud/template_delta_configs).
- To look at all the code used in the Confluent Cloud demo, see the [Confluent Cloud demo examples](https://github.com/confluentinc/examples/tree/latest/ccloud).
