Prerequisites
- A Phala Cloud account
- For CLI/SDK: an API key from Settings > API Keys in the dashboard
Choose an Instance Type
Phala Cloud offers several instance sizes. For a simple web server,tdx.small is plenty.
| Instance Type | vCPU | RAM | Good For |
|---|---|---|---|
tdx.small | 2 | 4 GB | Lightweight services, testing |
tdx.medium | 4 | 8 GB | Production APIs, small databases |
tdx.large | 8 | 16 GB | Multi-container apps, ML inference |
phala instance-types.
Write Your Docker Compose File
Create adocker-compose.yml that defines your services. Here’s a minimal nginx example:
localhost.
Deploy
Pick the method that fits your workflow. All three produce the same result: a running CVM with a public HTTPS endpoint.Option A — Dashboard UI
Open the Deploy page
Navigate to your workspace and click Deploy in the top-right corner of the CVMs page.Configure the CVM
Enter a name (e.g.my-nginx), paste your docker-compose.yml into the editor, select Phala as the KMS provider, pick a region, and choose tdx.small as the instance type.Click Deploy
You’ll be redirected to the CVMs page. The status changes from starting to running in about one to two minutes.Option B — CLI
Install the CLI
Deploy
Runphala deploy from the directory containing your docker-compose.yml. The CLI auto-selects a region and instance type if you don’t specify them.--wait flag blocks until the CVM is fully running.Option C — SDK
Verify Your Deployment
Once the status shows running, your CVM has a public endpoint. The URL follows this pattern:Endpoints may take 30 to 60 seconds to become reachable after the CVM enters the running state.
Verify TEE Attestation
Every CVM generates a Remote Attestation report proving it runs inside a genuine TEE. Navigate to Attestations in the CVM sidebar and click Check Attestation to verify it in the TEE Attestation Explorer. For details, see Get Attestation and Verify.Next Steps
- Environment Variables — pass secrets securely to your CVM
- Docker Compose Configuration — multi-service setups and private registries
- Set Up CI/CD — automate deployments on every push
- Scale with Replicas — run multiple copies of your app

