---
title: "replicas add"
description: "Add a read replica"
canonical: "https://pgbeam.com/docs/cli/projects/replicas/add"
last-updated: "2026-09-14T19:37:21.000Z"
---

# replicas add

> Add a read replica

URL: https://pgbeam.com/docs/cli/projects/replicas/add

Add a read replica to a database connection. PgBeam can route read-only queries to replicas for improved performance and load distribution. Without the `--host` flag, the command prompts for the replica hostname interactively.

## Usage

## Options

Option

Description

Required

Default

`--database-id <value>`

ID of the database to add the replica to

Yes

-

`--host <value>`

Hostname or IP address of the replica server

No

-

`--port <value>`

Port number of the replica server

No

`5432`

`--ssl-mode <value>`

SSL connection mode: disable, require, verify-ca, or verify-full

No

-

All global options (`--token`, `--profile`,
`--project`, `--org`, `--json`, `--no-color`, `--no-trunc`, `--debug`) are
also available on this command.

## Examples

## Output

Prints the new replica ID. With `--json`, returns the full replica object.