Skip to main content

Command: phala deploy

Syntax

phala deploy [options]

Description

Deploy new CVM or update existing one

Options

OptionDescription
-n, --name <value>CVM name (defaults to directory name)
-c, --compose <value>Path to Docker Compose file (default: docker-compose.yml)
-t, --instance-type <value>Instance type (e.g., tdx.small, auto-selected if omitted)
-r, --region <value>Preferred region (e.g., us-west, auto-selected if omitted)
-e, --env <value>Environment variable (KEY=VALUE) or env file path (repeatable)
--kms <value>KMS type: phala (default), ethereum/eth, or base
--waitWait for deployment/update completion
--ssh-pubkey <value>SSH public key path (default: ~/.ssh/id_rsa.pub)
--dev-os, --no-dev-osUse dev OS image (requires SSH key)
--public-logs, --no-public-logsMake CVM logs publicly accessible (default: true)
--public-sysinfo, --no-public-sysinfoMake CVM system info publicly accessible (default: true)
--listed, --no-listedList CVM on the public Trust Center (default: false)

Advanced Options

OptionDescription
--debugEnable debug logging
--disk-size <value>Disk size with unit (e.g., 50G, default: 40GB)
--fs <value>Filesystem type (ext4 or zfs, default: zfs)
--image <value>OS image version (auto-selected if omitted)
--node-id <value>Node ID (auto-selected if omitted)
--custom-app-id <value>Custom App ID (requires —nonce for PHALA KMS)
--nonce <value>Nonce for deterministic app_id (requires —custom-app-id, PHALA KMS only)
--pre-launch-script <value>Path to pre-launch script
--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 update and generate a commit token. Skips all on-chain operations. Intended for multisig workflows.
--commitCommit a previously prepared update using a commit token. Requires —token; —compose-hash and —transaction-hash are read from the token when omitted.
--token <value>Commit token from a prepare-only update.
--compose-hash <value>Compose hash from a prepare-only update. Optional in —commit mode when the token can provide it.
--transaction-hash <value>Transaction hash proving on-chain compose hash registration. Pass already-registered to skip the proof and rely on state-only verification.

Deprecated Options

OptionDescription
--uuid <value>[DEPRECATED] Use —cvm-id instead. CVM UUID.
--vcpu <value>Use —instance-type instead
--memory <value>Use —instance-type instead
--env-file <value>Use -e instead
--kms-id <value>Use —kms instead

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

  • Deploy new CVM
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 specific instance type
phala deploy --instance-type tdx.medium
  • Deploy to specific region
phala deploy --region us-west
  • Deploy with Ethereum KMS
phala deploy --kms ethereum --private-key <key> --rpc-url <url>
  • Update existing CVM by ID
phala deploy --cvm-id app_abc123
  • Update CVM with new compose file and env
phala deploy --cvm-id my-app --compose ./new-docker-compose.yml -e .env
  • Update CVM and wait for completion
phala deploy --cvm-id app_abc123 --wait
  • Update CVM from phala.toml
phala deploy
  • Deploy with logs and sysinfo disabled
phala deploy --no-public-logs --no-public-sysinfo
  • Deploy and list on Trust Center
phala deploy --listed
  • Update existing CVM to disable logs
phala deploy --cvm-id app_123 --no-public-logs
  • Prepare update for multisig approval
phala deploy --cvm-id app_123 --prepare-only -c docker-compose.yml
  • Commit a prepared update
phala deploy --cvm-id app_123 --commit --token <token> --compose-hash 0x... --transaction-hash 0x...