> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phala.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cvms replicate

> Create a replica of an existing CVM

<Note>
  This command is marked as unstable and may change in future releases.
</Note>

## Command: `phala cvms replicate`

### Syntax

```
phala cvms replicate [options] [<cvm_id>]
```

### Description

Create a replica of an existing CVM

### Arguments

| Argument    | Description                                           |
| ----------- | ----------------------------------------------------- |
| `<cvm_id>?` | CVM identifier (UUID, app\_id, instance\_id, or name) |

### Options

| Option                                   | Description                                                                          |
| ---------------------------------------- | ------------------------------------------------------------------------------------ |
| `--node-id <value>, --teepod-id <value>` | Target node ID for the replica.                                                      |
| `--compose-hash <value>`                 | Compose hash to replicate. Required when the source app has multiple live instances. |
| `-e, --env-file <value>`                 | Path to environment file.                                                            |

### Advanced Options

| Option                       | Description                                                                                                                                   |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `--private-key <value>`      | Private key for signing on-chain transactions (or set PRIVATE\_KEY env var)                                                                   |
| `--rpc-url <value>`          | RPC URL for on-chain KMS transactions (or set ETH\_RPC\_URL env var)                                                                          |
| `--prepare-only`             | Prepare the replica and generate a commit token. Skips all on-chain operations.                                                               |
| `--commit`                   | Commit a previously prepared replica using a commit token. Requires --token, --compose-hash, and --transaction-hash.                          |
| `--token <value>`            | Commit token from a prepare-only replica request.                                                                                             |
| `--transaction-hash <value>` | Transaction hash proving on-chain compose hash registration. Pass `already-registered` to skip the proof and rely on state-only verification. |

### Global Options

| Option                               | Description                                               |
| ------------------------------------ | --------------------------------------------------------- |
| `-h, --help`                         | Show help information for the current command             |
| `-v, --version`                      | Show CLI version                                          |
| `--api-token TOKEN, --api-key TOKEN` | API token for authenticating with Phala Cloud             |
| `-j, --json, --no-json`              | Output in JSON format                                     |
| `-i, --interactive`                  | Enable interactive mode                                   |
| `--cvm-id <value>`                   | CVM identifier (UUID, app\_id, instance\_id, or name)     |
| `--profile PROFILE`                  | Temporarily use a different auth profile for this command |
| `--api-version <value>`              | API version to use (e.g. 2025-10-28, 2026-01-21)          |

### Examples

* Replicate a CVM

```bash theme={"system"}
phala cvms replicate 1234 --node-id 5
```

* Prepare a replica for multisig approval

```bash theme={"system"}
phala cvms replicate 1234 --node-id 5 --compose-hash <hash> --prepare-only
```

* Commit a prepared replica

```bash theme={"system"}
phala cvms replicate 1234 --commit --token <token> --compose-hash <hash> --transaction-hash <tx-hash>
```
