Skip to main content
The Phala Cloud CLI (phala) is a command-line tool for deploying and managing Confidential Virtual Machines (CVMs) on Phala Cloud. It is also available as the pha alias.

Install

Or run without installing: npx phala / bunx phala

Get Started

Follow the Deploy Your First CVM tutorial to deploy a Jupyter notebook and test TEE functions in under 10 minutes.

API Versioning

The CLI communicates with the Phala Cloud API using header-based versioning. The current default API version is 2026-06-23. The CLI sends an X-Phala-Version header with every request. This determines the response format returned by the server. See the JS SDK API Versioning page for details on version differences. You can override the API version with the --api-version global flag (added in v1.1.12):

Authentication

Deployment

App Management

CVM Operations

Advanced

Deprecated

These commands remain available for compatibility but have newer replacements. Deprecated deploy options:

Profiles & Credentials

The CLI supports multiple authentication profiles stored in ~/.phala-cloud/credentials.json. Each profile stores: Use profiles to list profiles and switch to change the active profile.

Environment Variables

Configuration

Credentials are stored in ~/.phala-cloud/credentials.json (schema version 1, supports multiple profiles). Project-level configuration is in phala.toml in the working directory. Supported fields: Example phala.toml:

Global Flags