Skip to main content

Usage

phala cp <source> <destination> [options]

Arguments

NameRequiredDescription
sourceYesSource path (local or cvm-name:path, use :path for linked CVM)
destinationYesDestination path (same format as source)

Options

FlagShortDefaultDescription
--identity <file>-iSSH identity file
--port <port>-p443SSH port (priority: CLI > phala.toml > 443)
--gateway <domain>-gGateway domain (priority: CLI > phala.toml > API)
--recursive-rfalseCopy directories recursively
--verbose-vfalseVerbose SCP details
--dry-runfalsePrint SCP command without executing

Path Format

  • Local path: ./config.yml, /tmp/script.sh
  • Linked CVM: :~/config.yml (uses cvm_id from phala.toml)
  • Named CVM: my-app:~/logs/, app_abc123:/tmp/script.sh

Examples

Upload file to linked CVM:
$ phala cp ./config.yml :~/config.yml
Download directory from named CVM:
$ phala cp my-app:~/logs/ ./logs/ -r
Upload to specific CVM by ID:
$ phala cp ./script.sh app_abc123:/tmp/script.sh
Print SCP command without executing:
$ phala cp --dry-run ./file.txt :~/file.txt
Copy with custom SSH identity:
$ phala cp -i ~/.ssh/custom_key ./data.json :~/data.json
Copy with verbose output:
$ phala cp -v -r ./dist/ my-app:/app/dist/