Skip to main content

Command: phala deploy

Syntax

phala deploy [options]

Description

Create a new CVM with on-chain KMS in one step.

Options

OptionDescription
-h, --helpShow help information for the current command
-v, --versionShow CLI version
--cvm-id <value>CVM identifier (UUID, app_id, instance_id, or name)
--uuid <value>[DEPRECATED] Use —cvm-id instead. CVM UUID.
--json, --no-jsonOutput in JSON format
--debugEnable debug logging
-n, --name <value>Name of the CVM
-c, --compose <value>Path to Docker Compose file (default: docker-compose.yml in current directory)
-t, --instance-type <value>Instance type (e.g., tdx.small, tdx.medium, tdx.large). Optional - auto-selected if not specified.
--vcpu <value>Number of vCPUs (optional, auto-matched if not specified), default is 1
--memory <value>Memory with optional unit (optional, auto-matched if not specified), e.g., 2G, 1024MB, default is 2048MB
--disk-size <value>Disk size with optional unit (optional, auto-matched if not specified), e.g., 50G, 100GB, default is 40GB
--image <value>OS image version (optional, auto-selected if not specified)
-r, --region <value>Preferred region (e.g., us-west, eu-central). Optional - auto-selected if not specified.
--node-id <value>Node ID (optional, auto-selected if not specified)
-e, --env <value>Environment variable (KEY=VALUE) or path to env file. Can be specified multiple times.
-i, --interactiveEnable interactive mode for required parameters
--kms-id <value>KMS ID to use.
--pre-launch-script <value>Path to pre-launch script
--private-key <value>Private key for signing transactions.
--rpc-url <value>RPC URL for the blockchain.
--waitWait for CVM to complete deployment/update before returning (only applies to updates)
--ssh-pubkey <value>Path to SSH public key file (default: ~/.ssh/id_rsa.pub)
--dev-osUse development OS image (requires SSH public key)
--non-dev-osUse non-development OS image (SSH public key only if explicitly specified)

Examples

  • Deploy with auto-selection (simplest)
phala deploy
  • Deploy with environment variables
phala deploy -e NODE_ENV=production -e DEBUG=true
  • Deploy with env file
phala deploy -e .env
  • Deploy with env file and overrides
phala deploy -e .env -e NODE_ENV=production
  • Deploy with specific instance type
phala deploy --instance-type tdx.medium
  • Deploy to specific region
phala deploy --region us-west
  • Deploy with instance type and region
phala deploy --instance-type tdx.small --region eu-central
  • Deploy with manual resource specs
phala deploy --vcpu 4 --memory 8G --disk-size 100G
  • Deploy with on-chain KMS
phala deploy --kms-id ethereum --private-key <key> --rpc-url <url>
  • Deploy to specific node (advanced)
phala deploy --node-id 6