---
title: Configure Shadowing
latest-redpanda-tag: v26.2.7
latest-console-tag: v3.14.0
latest-operator-version: v26.2.6
# EOL = End-of-Life (support lifecycle status)
page-is-nearing-eol: "false"
page-is-past-eol: "false"
page-eol-date: July 28, 2027
latest-connect-version: 4.118.0
docname: disaster-recovery/shadowing/setup
page-component-name: streaming
page-version: "26.2"
page-component-version: "26.2"
page-component-title: Streaming
page-relative-src-path: disaster-recovery/shadowing/setup.adoc
page-edit-url: https://github.com/redpanda-data/docs/edit/main/modules/manage/pages/disaster-recovery/shadowing/setup.adoc
description: Set up Shadowing for disaster recovery, including cross-region replication, data filters, networking, and authentication.
page-git-created-date: "2025-11-19"
page-git-modified-date: "2026-10-26"
page-generated-content: none
support-status: supported
---

# Configure Shadowing

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [streaming-full.txt](https://docs.redpanda.com/streaming-full.txt)

<!-- Source: https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/setup.md -->

You can create and manage shadow links with the [Redpanda Console](https://docs.redpanda.com/streaming/current/console/), the [Admin API v2](https://docs.redpanda.com/api/doc/admin/v2/), or [`rpk`](https://docs.redpanda.com/streaming/current/get-started/rpk/), giving you flexibility in how you interact with your disaster recovery infrastructure.

> 💡 **TIP**
>
> Deploy clusters in different geographic regions to protect against regional disasters.

If you’re using Kubernetes, see [Configure Shadowing in Kubernetes](https://docs.redpanda.com/streaming/current/manage/kubernetes/shadowing/k-shadow-linking/) for Kubernetes-specific shadow link configuration.

## Prerequisites

> 📝 **NOTE**
>
> This feature requires an [enterprise license](https://docs.redpanda.com/streaming/current/get-started/licensing/). To get a trial license key or extend your trial period, [generate a new trial license key](https://redpanda.com/try-enterprise). To purchase a license, contact [Redpanda Sales](https://redpanda.com/upgrade).
>
> If Redpanda has enterprise features enabled and it cannot find a valid license, [restrictions](https://docs.redpanda.com/streaming/current/get-started/licensing/#self-managed) apply.

### License and cluster requirements

-   The shadow cluster must be running Redpanda v25.3 or later and must have an [Enterprise Edition](https://docs.redpanda.com/streaming/current/get-started/licensing/overview/) license. API-mode Schema Registry replication requires v26.2 or later.

-   The source cluster can be a Redpanda cluster running v25.3 or later, or any Kafka API-compatible cluster such as Apache Kafka, Confluent Cloud, or Confluent Platform. See [Non-Redpanda source clusters](#non-redpanda-source-clusters).

-   Role synchronization requires Redpanda v26.2 or later on both the source and shadow clusters. See [Role filtering](#role-filtering).

-   If you use Redpanda Console, ensure that it is running v3.3.0 or later.


> 💡 **TIP**
>
> When both clusters run Redpanda and you later upgrade them, the upgrade order matters. See [Upgrade Clusters in a Shadowing Topology](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/upgrade/).

### Non-Redpanda source clusters

The shadow cluster reads from the source cluster through the Kafka API, so the source does not need to be a Redpanda cluster. From any Kafka API-compatible source, Shadowing replicates:

-   Topic data, with preserved offsets and timestamps

-   Topic configurations, following the rules in [Topic properties replication](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/overview/#topic-properties-replication)

-   Consumer group offsets

-   ACLs


The following require a Redpanda source cluster:

-   **RBAC roles**: If the source is not a Redpanda cluster, leave `role_sync_options` unconfigured. A Roles Migrator task pointed at a non-Redpanda source reports `LINK_UNAVAILABLE` while the rest of the shadow link keeps running. See [Role filtering](#role-filtering).

-   **Byte-for-byte Schema Registry replication**: Topic mode (`shadow_schema_registry_topic`) shadows Redpanda’s internal `_schemas` topic. To replicate schemas from a Confluent Schema Registry or another Confluent-compatible registry, use API mode (`shadow_schema_registry_api`) instead. See [Migrate Schemas from Confluent Schema Registry](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/migrate-schemas-confluent/).


The source cluster must accept one of the authentication methods that the shadow link supports. See [Network and authentication](#network-and-authentication).

> 📝 **NOTE**
>
> Amazon MSK can be a source cluster when SASL/SCRAM-SHA-512 authentication is enabled on the MSK cluster. MSK IAM authentication is not supported. AWS Glue Schema Registry is not supported as a schema source.

### Cluster configuration

The shadow cluster must have the [`enable_shadow_linking`](https://docs.redpanda.com/streaming/current/reference/properties/cluster-properties/#enable_shadow_linking) cluster property set to `true`.

To enable this property, run:

```bash
rpk cluster config set enable_shadow_linking true
```

> 📝 **NOTE**
>
> This cluster property must be configured using `rpk` or the Admin API v1 before you can create shadow links through any interface.

To learn more about configuring cluster properties, see [Configure Cluster Properties](https://docs.redpanda.com/streaming/current/manage/cluster-maintenance/cluster-property-configuration/).

### Administrative access

Superuser access is required on the shadow cluster, and on the source cluster when it is a Redpanda cluster, through [`rpk`](https://docs.redpanda.com/streaming/current/get-started/rpk/), the Admin API, or [Redpanda Console](https://docs.redpanda.com/streaming/current/console/) to create and manage shadow links.

### Replication service permissions

You must configure a service account on the source cluster with the following [ACL](https://docs.redpanda.com/streaming/current/manage/security/authorization/acl/) permissions for shadow link replication:

-   **Topics**: `read` permission on all topics you want to replicate

-   **Topic configurations**: `describe_configs` permission on topics for configuration synchronization

-   **Consumer groups**: `describe` and `read` permission on consumer groups for offset replication

-   **ACLs**: `describe` permission on ACL resources to replicate security policies

-   **Cluster**: `describe` permission on the cluster resource to access ACLs


This service account authenticates from the shadow cluster to the source cluster and performs the actual data replication. The credentials for this account are provided when you set up the shadow link.

### Network and authentication

You must configure network connectivity between clusters with appropriate firewall rules to allow the shadow cluster to connect to the source cluster for data replication. Shadowing uses a pull-based architecture where the shadow cluster fetches data from the source cluster. For detailed networking configuration, see [Networking](#networking).

If using [authentication](https://docs.redpanda.com/streaming/current/manage/security/authentication/) for the shadow link connection, configure the source cluster with your chosen authentication method (SASL/SCRAM, SASL/PLAIN, TLS, mTLS; SASL/PLAIN requires v25.3.2 or later) and ensure the shadow cluster has the proper credentials to authenticate to the source cluster.

## Set up Shadowing

To set up Shadowing, you need to create a shadow link and configure filters to select which topics, consumer groups, ACLs, and Schema Registry data to replicate.

### Create a shadow link

Any cluster can create a shadow link to a source cluster.

> 💡 **TIP**
>
> You can use `rpk` to generate a sample configuration file with common filter patterns:
>
> ```bash
> # Generate a sample configuration file with placeholder values
> rpk shadow config generate -o shadow-config.yaml
>
> # Or generate a template with detailed field documentation
> rpk shadow config generate --print-template -o shadow-config-template.yaml
> ```
>
> This creates a complete YAML configuration file that you can customize for your environment. The template includes all available fields with comments explaining their purpose. For detailed command options, see [`rpk shadow config generate`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-shadow/rpk-shadow-config-generate/).

Explore the configuration file

```yaml
# Sample ShadowLinkConfig YAML with all fields

name: <shadow-link-name>            # Unique name for this shadow link, example: "production-dr"

client_options:
  bootstrap_servers:                         # Source cluster brokers to connect to
  - <source-broker-1>:<port>                 # Example: "prod-kafka-1.example.com:9092"
  - <source-broker-2>:<port>                 # Example: "prod-kafka-2.example.com:9092"
  - <source-broker-3>:<port>                 # Example: "prod-kafka-3.example.com:9092"
  source_cluster_id: <cluster-id>            # Optional: UUID assigned by Redpanda
                                             # Example: a882bc98-7aca-40f6-a657-36a0b4daf1fd
# To get source_cluster_id, run `rpk cluster config get cluster_id`.

  # TLS settings using file paths
  tls_settings:
    enabled: true                     # Enable TLS
    tls_file_settings:
      ca_path: <ca-cert-path>         # Path to CA certificate, example: "/etc/ssl/certs/ca.crt"
      key_path: <client-key-path>     # Optional: Path to client private key, example: "/etc/ssl/private/client.key"
      cert_path: <client-cert-path>   # Optional: Path to client certificate, example: "/etc/ssl/certs/client.crt"
    do_not_set_sni_hostname: false   # Optional: Skip SNI hostname when using TLS (default: false)

# Create SASL credentials in the source cluster.
# Then, with this configuration, ensure the shadow cluster uses the credentials
# to authenticate to the source cluster.
  authentication_configuration:
    # SASL/SCRAM authentication
    scram_configuration:
      username: <sasl-username>       # SASL/SCRAM username, example: "shadow-replication-user"
      password: <sasl-password>     # SASL/SCRAM password, example: "secure-password-123"
      scram_mechanism: SCRAM_SHA_256  # SCRAM mechanism: "SCRAM_SHA_256" or "SCRAM_SHA_512"
    # SASL/PLAIN authentication: to use SASL/PLAIN instead of SASL/SCRAM,
    # remove scram_configuration and uncomment the following lines.
    # plain_configuration:
    #   username: <sasl-username>     # SASL/PLAIN username, example: "shadow-replication-user"
    #   password: <sasl-password>     # SASL/PLAIN password, example: "secure-password-123"

  # Connection tuning - adjust based on network characteristics
  metadata_max_age_ms: 10000          # How often to refresh cluster metadata (default: 10000ms)
  connection_timeout_ms: 1000         # Connection timeout (default: 1000ms, increase for high latency)
  retry_backoff_ms: 100               # Backoff between retries (default: 100ms)
  fetch_wait_max_ms: 500              # Max time to wait for fetch requests (default: 500ms)
  fetch_min_bytes: 5242880            # Min bytes per fetch (default: 5MB)
  fetch_max_bytes: 20971520           # Max bytes per fetch (default: 20MB)
  fetch_partition_max_bytes: 5242880  # Max bytes per partition fetch (default: 5MB)

topic_metadata_sync_options:
  interval: 30s                       # How often to sync topic metadata (examples: "30s", "1m", "5m")
  auto_create_shadow_topic_filters:   # Filters for automatic topic creation
  - pattern_type: LITERAL             # Include all topics (wildcard)
    filter_type: INCLUDE
    name: '*'
  - pattern_type: PREFIX              # Exclude topics with specific prefix
    filter_type: EXCLUDE
    name: <topic-prefix-to-exclude>   # Examples: "temp-", "test-", "debug-"
  synced_shadow_topic_properties:     # Additional topic properties to sync (beyond defaults)
  - retention.ms                      # Topic retention time
  - segment.ms                        # Segment roll time
  exclude_default: false              # Include default properties (compression, retention, etc.)
  start_at_earliest: {}               # Start from the beginning of source topics (default)
  paused: false                       # Enable topic metadata synchronization

consumer_offset_sync_options:
  interval: 30s                       # How often to sync consumer group offsets
  paused: false                       # Enable consumer offset synchronization
  group_filters:                      # Filters for consumer groups to sync
  - pattern_type: LITERAL
    filter_type: INCLUDE
    name: '*'                         # Include all consumer groups

security_sync_options:
  interval: 30s                       # How often to sync security settings
  paused: false                       # Enable security settings synchronization
  acl_filters:                        # Filters for ACLs to sync
  - resource_filter:
      resource_type: TOPIC            # Resource type: "TOPIC", "GROUP", "CLUSTER"
      pattern_type: PREFIXED          # Pattern type: "LITERAL", "PREFIXED"
      name: <resource-pattern>        # Examples: "prod-", "app-data-"
    access_filter:
      principal: User:<username>      # Principal name, example: "User:app-service"
      operation: ANY                  # Operation: "READ", "WRITE", "CREATE", "DELETE", "ALTER", "DESCRIBE", "ANY"
      permission_type: ALLOW          # Permission: "ALLOW" or "DENY"
      host: '*'                       # Host pattern, examples: "*", "10.0.0.0/8", "app-server.example.com"

schema_registry_sync_options:         # Schema Registry synchronization options
  shadow_schema_registry_topic: {}    # Byte-for-byte _schemas replication (Redpanda source)
  # For a Confluent source, replace the line above with a
  # shadow_schema_registry_api block (API mode). See Migrate Schemas
  # from Confluent Schema Registry.

# Role synchronization requires a Redpanda source cluster and v26.2 or
# later on both clusters. Omit role_sync_options otherwise.
role_sync_options:                    # RBAC role synchronization options
  interval: 30s                       # How often to sync roles
  paused: false                       # Enable role synchronization
  role_name_filters:                  # Default empty: no roles sync until you add an INCLUDE filter
  - pattern_type: LITERAL             # Pattern type: "LITERAL", "PREFIX"
    filter_type: INCLUDE              # Filter type: "INCLUDE", "EXCLUDE"
    name: '*'                         # Include all roles ('*' must be the only character, LITERAL only)
```

To create a shadow link with the source cluster using `rpk`, run the following command from the shadow cluster:

```bash
# Use the generated configuration file to create the shadow link
rpk shadow create --config-file shadow-config.yaml
```

For detailed command options, see [`rpk shadow create`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-shadow/rpk-shadow-create/).

> 💡 **TIP**
>
> Use [`rpk profile`](https://docs.redpanda.com/streaming/current/get-started/config-rpk-profile/) to save your cluster connection details and credentials for both source and shadow clusters. This allows you to easily switch between the two configurations.

### Set filters

Filters determine which resources Shadowing automatically creates when establishing your shadow link.

Topic filters select which topics Shadowing automatically creates as shadow topics when they appear on the source cluster. After Shadowing creates a shadow topic, it continues replicating until you failover the topic, delete it, or delete the entire shadow link.

Consumer group and ACL filters control which groups and security policies replicate to maintain application functionality.

#### Filter types and patterns

Each filter uses two key settings:

-   **Pattern type**: Determines how names are matched

    -   `LITERAL`: Matches names exactly (including the special wildcard `*` to match all items)

    -   `PREFIX`: Matches names that start with the specified string


-   **Filter type**: Specifies whether to INCLUDE or EXCLUDE matching items

    -   `INCLUDE`: Replicate items that match the pattern

    -   `EXCLUDE`: Skip items that match the pattern



#### Filter processing rules

Redpanda processes filters in the order you define them with EXCLUDE filters taking precedence. Design your filter lists carefully:

1.  **Exclude filters win**: If any EXCLUDE filter matches a resource, it is excluded regardless of INCLUDE filters.

2.  **Order matters for INCLUDE filters**: Among INCLUDE filters, the first match determines the result.

3.  **Default behavior**: Items that don’t match any filter are excluded from replication.


#### Common filtering patterns

Replicate all topics except test topics:

```yaml
topic_metadata_sync_options:
  auto_create_shadow_topic_filters:
  - pattern_type: PREFIX
    filter_type: EXCLUDE
    name: test-                        # Exclude all test topics
  - pattern_type: LITERAL
    filter_type: INCLUDE
    name: '*'                         # Include all other topics
```

Replicate only production topics:

```yaml
topic_metadata_sync_options:
  auto_create_shadow_topic_filters:
  - pattern_type: PREFIX
    filter_type: INCLUDE
    name: prod-                       # Include production topics
  - pattern_type: PREFIX
    filter_type: INCLUDE
    name: production-                 # Alternative production prefix
```

Replicate specific consumer groups:

```yaml
consumer_offset_sync_options:
  group_filters:
  - pattern_type: LITERAL
    filter_type: INCLUDE
    name: critical-app-consumers      # Include specific consumer group
  - pattern_type: PREFIX
    filter_type: INCLUDE
    name: prod-consumer-              # Include production consumers
```

#### Schema Registry synchronization

Shadowing can replicate Schema Registry data in one of two modes:

-   **Topic mode** (`shadow_schema_registry_topic`): Shadows the `_schemas` system topic for byte-for-byte replication of schema definitions, versions, and compatibility settings from another Redpanda cluster.

-   **API mode** (`shadow_schema_registry_api`): Polls the source Schema Registry over HTTP and imports selected contexts and subjects, with validation. Use this mode to replicate schemas from a Confluent Schema Registry, or to replicate only part of the source registry. See [Migrate Schemas from Confluent Schema Registry](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/migrate-schemas-confluent/).


A shadow link uses one mode or the other, not both.

To enable topic mode, add the following to your shadow link configuration:

```yaml
schema_registry_sync_options:
  shadow_schema_registry_topic: {}
```

To enable API mode instead, add a `shadow_schema_registry_api` block; its connection, filtering, and mapping options are described in [Migrate Schemas from Confluent Schema Registry](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/migrate-schemas-confluent/).

Topic mode requirements:

-   The `_schemas` topic must exist on the source cluster

-   The `_schemas` topic must not exist on the shadow cluster, or must be empty

-   Once enabled, the `_schemas` topic will be replicated completely


Important: After the `_schemas` topic becomes a shadow topic, it cannot be stopped without either failing over the topic or deleting it entirely.

#### System topic filtering rules

Redpanda system topics have the following specific filtering restrictions:

-   Literal filters for `__consumer_offsets` and `_redpanda.audit_log` are rejected.

-   Prefix filters for topics starting with `_redpanda` or `__redpanda` are rejected.

-   Wildcard `*` filters will not match topics that start with `_redpanda` or `__redpanda`.

-   To shadow specific system topics, you must provide explicit literal filters for those individual topics.


#### ACL filtering

ACLs are replicated by the [Security Migrator task](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/overview/#shadow-link-tasks). This is recommended to ensure that your shadow cluster has the same permissions as your source cluster. To configure ACL filters:

```yaml
security_sync_options:
  acl_filters:
  # Include read permissions for production topics
  - resource_filter:
      resource_type: TOPIC            # Filter by topic resource
      pattern_type: PREFIXED          # Match by prefix
      name: prod-                     # Production topic prefix
    access_filter:
      principal: User:app-user        # Application service user
      operation: READ                 # Read operation
      permission_type: ALLOW          # Allow permission
      host: '*'                       # Any host
  # Include consumer group permissions
  - resource_filter:
      resource_type: GROUP            # Filter by consumer group
      pattern_type: LITERAL           # Exact match
      name: '*'                       # All consumer groups
    access_filter:
      principal: User:app-user        # Same application user
      operation: READ                 # Read operation
      permission_type: ALLOW          # Allow permission
      host: '*'                       # Any host
```

#### Role filtering

After a failover, your users and applications need the same permissions on the shadow cluster that they had on the source. Role synchronization prepares the shadow cluster for that moment: the [Roles Migrator task](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/overview/#roles-migrator-task) periodically reads [RBAC](https://docs.redpanda.com/streaming/current/manage/security/authorization/rbac/) role definitions and role memberships from the source cluster and mirrors them to the shadow cluster. Use role synchronization together with [ACL filters](#acl-filtering) whenever your authorization model uses roles, so that role-based permissions keep working after failover.

> ❗ **IMPORTANT**
>
> In the configuration file and `rpk`, no roles are replicated by default: the `role_name_filters` list defaults to empty, which synchronizes nothing. Add at least one `INCLUDE` filter to start replicating roles. When you create a shadow link in Redpanda Console on Redpanda 26.2 or later, the default is **All roles**.

To replicate all roles:

```yaml
role_sync_options:
  interval: 30s                       # How often to sync roles
  role_name_filters:
  - pattern_type: LITERAL
    filter_type: INCLUDE
    name: '*'                         # '*' must be the only character and requires LITERAL
```

Role filters use the same pattern and filter types as topic filters: `pattern_type` is `LITERAL` or `PREFIX`, and `filter_type` is `INCLUDE` or `EXCLUDE`.

You can also configure role filters in Redpanda Console v3.11.0 or later, when you create a shadow link or when you edit an existing one on the **Shadowing** tab. The **Roles** card offers two modes:

-   **All roles**: Replicates every role. This is equivalent to a single `INCLUDE` filter with the literal name `*`, and it is the default when you create a shadow link in Redpanda Console.

-   **Specify roles**: Replicates only the roles that match the filters you add. Each filter takes a role name and a match mode: **Include specific roles**, **Include starting with**, **Exclude specific**, or **Exclude starting with**. The four modes correspond to the `filter_type` and `pattern_type` combinations above.


When you edit a shadow link that has no role synchronization configured, the **Roles** card starts on **Specify roles** with no filters, and role synchronization remains off unless you add a filter or select **All roles**. Redpanda Console does not expose the `interval` or `paused` settings: a link created in Redpanda Console uses the default sync interval, and pausing role synchronization requires the configuration file or `rpk`.

The shadow link details page shows the configured filters in the **Role replication** section. The section appears only when the link has role synchronization configured, and it shows **No role filters configured** when the filter list is empty. If the cluster does not support role synchronization (Redpanda versions earlier than 26.2), Redpanda Console hides the **Roles** card and sends no role sync options.

Within the configured filters, the Roles Migrator task keeps the shadow cluster’s roles as a full mirror of the source:

-   The task creates roles that exist on the source but not on the shadow.

-   The task updates roles whose membership changed on the source.

-   The task deletes roles that were deleted on the source.


The task does not modify roles on the shadow cluster that fall outside your filters.

Role synchronization replicates role definitions and memberships only:

-   **Shadowing does not replicate user credentials.** Manage and distribute credentials outside of Shadowing, and provision users on the shadow cluster before failover.

-   **Role synchronization does not replicate the ACLs bound to roles.** Configure [ACL filters](#acl-filtering) as well, so that both the roles and the permissions granted to them exist on the shadow cluster.


Role synchronization uses the same connection and service account as the rest of the shadow link. The cluster `describe` permission already required for ACL replication also covers role reads, and no additional network configuration is required. Both the source and shadow clusters must be running Redpanda 26.2 or later. The capability activates after the upgrade completes on all brokers. If the source is not a Redpanda cluster, or is a Redpanda cluster running a version earlier than 26.2, the Roles Migrator task enters the `LINK_UNAVAILABLE` state, without affecting the other tasks on the link.

Role synchronization continues to run after a [failover](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/failover/). Failover acts on topic data only: it stops topic replication and makes shadow topics writable, but the sync tasks, including the Roles Migrator, keep running on their intervals. To stop role synchronization, set `paused: true` in `role_sync_options`, or delete the shadow link.

To monitor role synchronization, run [`rpk shadow status`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-shadow/rpk-shadow-status/). The Roles Migrator task’s `Reason` field reports the counts from the most recent sync cycle, for example: `Synced roles: 2 created, 0 updated, 0 deleted, 0 failures`.

#### Consumer group filtering and behavior

Consumer group filters determine which consumer groups have their offsets replicated to the shadow cluster by the [Consumer Group Shadowing task](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/overview/#shadow-link-tasks).

Offset replication operates selectively within each consumer group. Only committed offsets for active shadow topics are synchronized, even if the consumer group has offsets for additional topics that aren’t being shadowed. For example, if consumer group "app-consumers" has committed offsets for "orders", "payments", and "inventory" topics, but only "orders" is an active shadow topic, then only the "orders" offsets will be replicated to the shadow cluster.

```yaml
consumer_offset_sync_options:
  interval: 30s                      # How often to sync consumer group offsets
  paused: false                       # Enable consumer offset synchronization
  group_filters:
  - pattern_type: PREFIX
    filter_type: INCLUDE
    name: prod-consumer-              # Include production consumer groups
  - pattern_type: LITERAL
    filter_type: EXCLUDE
    name: test-consumer-group         # Exclude specific test groups
```

##### Important consumer group considerations

**Avoid name conflicts:** If you plan to consume data from the shadow cluster, do not use the same consumer group names as those used on the source cluster. While this won’t break shadow linking, it can impact your RPO/RTO because conflicting group names may interfere with offset replication and consumer resumption during disaster recovery.

**Offset clamping:** When Redpanda replicates consumer group offsets from the source cluster, offsets are automatically "clamped" during the commit process on the shadow cluster. If a committed offset from the source cluster is above the high watermark (HWM) of the corresponding shadow partition, Redpanda clamps the offset to the shadow partition’s HWM before committing it to the shadow cluster. This ensures offsets remain valid and prevents consumers from seeking beyond available data on the shadow cluster.

#### Starting offset for new shadow topics

When the [Source Topic Sync task](https://docs.redpanda.com/streaming/current/manage/disaster-recovery/shadowing/overview/#shadow-link-tasks) creates a shadow topic for the first time, you can control where replication begins on the source topic. This setting only applies to empty shadow partitions and is crucial for disaster recovery planning. Changing this configuration only affects new shadow topics, existing shadow topics continue replicating from their current position.

```yaml
topic_metadata_sync_options:
  start_at_earliest: {}
```

Alternatively, to start from the most recent offset:

```yaml
topic_metadata_sync_options:
  start_at_latest: {}
```

Or to start from a specific timestamp:

```yaml
topic_metadata_sync_options:
  start_at_timestamp: 2024-01-01T00:00:00Z
```

Starting offset options:

-   **`earliest`** (default): This replicates all existing data from the source topic. Use this for complete disaster recovery where you need full data history.

-   **`latest`**: This starts replication from the current end of the source topic, skipping existing data. Use this when you only need new data for disaster recovery and want to minimize initial replication time.

-   **`timestamp`**: This starts replication from the first record with a timestamp at or after the specified time. Use this for point-in-time disaster recovery scenarios.


> ❗ **IMPORTANT**
>
> The starting offset only affects **new shadow topics**. After a shadow topic exists and has data, changing this setting has no effect on that topic’s replication.

#### Networking

Configure network connectivity between your source and shadow clusters to enable shadow link replication. The shadow cluster initiates connections to the source cluster using a pull-based architecture.

For additional details about networking, see [Network and authentication](#network-and-authentication).

##### Connection requirements

-   **Direction**: Shadow cluster connects to source cluster (outbound from shadow, inbound to source)

-   **Protocol**: Kafka protocol over TCP (default port 9092, or your configured listener ports)

-   **Persistence**: Connections remain active for continuous replication


##### Firewall configuration

You must configure firewall rules to allow the shadow cluster to reach the source cluster.

**On the source cluster network:**

-   Allow inbound TCP connections on Kafka listener ports (typically 9092).

-   Allow connections from the shadow cluster’s IP addresses or subnets.


**On the shadow cluster network:**

-   Allow outbound TCP connections to the source cluster’s Kafka listener ports.

-   Ensure DNS resolution works for source cluster hostnames.


##### Bootstrap servers

Specify multiple bootstrap servers in your shadow link configuration for high availability:

```yaml
client_options:
  bootstrap_servers:                  # Source cluster brokers to connect to
  - <source-broker-1>:<port>          # Example: "prod-kafka-1.example.com:9092"
  - <source-broker-2>:<port>          # Example: "prod-kafka-2.example.com:9092"
  - <source-broker-3>:<port>          # Example: "prod-kafka-3.example.com:9092"
```

The shadow cluster uses these addresses to discover all brokers in the source cluster. If one bootstrap server is unavailable, the shadow cluster tries the next one in the list.

##### Network security

For production deployments, secure the network connection between clusters:

TLS encryption:

```yaml
client_options:
  tls_settings:
    enabled: true                     # Enable TLS
    tls_file_settings:
      ca_path: <ca-cert-path>         # Path to CA certificate, example: "/etc/ssl/certs/ca.crt"
      key_path: <client-key-path>     # Optional: Path to client private key, example: "/etc/ssl/private/client.key"
      cert_path: <client-cert-path>   # Optional: Path to client certificate, example: "/etc/ssl/certs/client.crt"
    do_not_set_sni_hostname: false   # Optional: Skip SNI hostname when using TLS (default: false)
```

Authentication:

```yaml
client_options:
  authentication_configuration:
    # SASL/SCRAM authentication.
    # Create SASL credentials in the source cluster.
    # Then, with this configuration, ensure the shadow cluster uses the credentials
    # to authenticate to the source cluster.
    scram_configuration:
      username: <sasl-username>       # SASL/SCRAM username, example: "shadow-replication-user"
      password: <sasl-password>     # SASL/SCRAM password, example: "secure-password-123"
      scram_mechanism: SCRAM_SHA_256  # SCRAM mechanism: "SCRAM_SHA_256" or "SCRAM_SHA_512"
    # SASL/PLAIN authentication: to use SASL/PLAIN instead of SASL/SCRAM,
    # remove scram_configuration and uncomment the following lines.
    # plain_configuration:
    #   username: <sasl-username>     # SASL/PLAIN username, example: "shadow-replication-user"
    #   password: <sasl-password>     # SASL/PLAIN password
```

##### Connection tuning

Adjust connection parameters based on your network characteristics. For example:

```yaml
client_options:
  # Connection and metadata settings
  connection_timeout_ms: 1000         # Default 1000ms, increase for high-latency networks
  retry_backoff_ms: 100               # Default 100ms, backoff between connection retries
  metadata_max_age_ms: 10000          # Default 10000ms, how often to refresh cluster metadata

  # Fetch request settings
  fetch_wait_max_ms: 500              # Default 500ms, max time to wait for fetch requests
  fetch_min_bytes: 5242880            # Default 5MB, minimum bytes to fetch per request
  fetch_max_bytes: 20971520           # Default 20MB, maximum bytes to fetch per request
  fetch_partition_max_bytes: 5242880  # Default 5MB, maximum bytes to fetch per partition
```

## Update an existing shadow link

To modify a shadow link configuration after creation, run:

```bash
rpk shadow update <shadow-link-name>
```

For detailed command options, see [`rpk shadow update`](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-shadow/rpk-shadow-update/).

This opens your default editor with the current shadow link configuration. Passwords appear as `<redacted>`. To keep an existing password, leave the placeholder unchanged.

To apply a configuration file without opening an editor, such as in a script, use the `--config-file` flag. This flag requires `rpk` v26.2.2 or later.

```bash
rpk shadow update <shadow-link-name> --config-file shadow-config.yaml
```

The `name` in the file must match the shadow link name. The file cannot contain the `<redacted>` placeholder. To keep an existing password, leave its `password` field empty and keep its `username` field set.

You cannot change the shadow link name. To rename a shadow link, delete it and create a new one.

How `rpk` applies your changes depends on the `rpk` version:

-   `rpk` v26.2.2 and later, and v26.1.15 and later 26.1 releases: The configuration that you submit replaces the entire shadow link configuration. Any field that you omit is reset to its default value.

-   `rpk` v26.2.1, and v26.1.14 and earlier: `rpk` sends only the fields that you changed. If you change a list field, such as the topic filters, Redpanda adds the entire edited list to the end of the existing list instead of replacing it. For example, if you add an exclude filter to a list that contains one include filter, the resulting list contains the include filter twice, followed by the exclude filter. To change a list field, upgrade `rpk`.


See also: [Admin API v2 reference](https://docs.redpanda.com/api/doc/admin/v2/)