Skip to main content
This command is marked as unstable and may change in future releases.

Command: phala cvms replicate

Syntax

phala cvms replicate [options] [<cvm_id>]

Description

Create a replica of an existing CVM

Arguments

ArgumentDescription
<cvm_id>?CVM identifier (UUID, app_id, instance_id, or name)

Options

OptionDescription
--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

OptionDescription
--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-onlyPrepare the replica and generate a commit token. Skips all on-chain operations.
--commitCommit 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

OptionDescription
-h, --helpShow help information for the current command
-v, --versionShow CLI version
--api-token TOKEN, --api-key TOKENAPI token for authenticating with Phala Cloud
-j, --json, --no-jsonOutput in JSON format
-i, --interactiveEnable interactive mode
--cvm-id <value>CVM identifier (UUID, app_id, instance_id, or name)
--profile PROFILETemporarily 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
phala cvms replicate 1234 --node-id 5
  • Prepare a replica for multisig approval
phala cvms replicate 1234 --node-id 5 --compose-hash <hash> --prepare-only
  • Commit a prepared replica
phala cvms replicate 1234 --commit --token <token> --compose-hash <hash> --transaction-hash <tx-hash>