Documentation Index
Fetch the complete documentation index at: https://docs.phala.com/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start: Deploy Your First dstack App on GCP
You’ll have a Docker application running inside a hardware-encrypted Confidential VM on GCP within 25 minutes. This tutorial covers the full path: install the CLI, configure your project, deploy, and verify that attestation proves your workload runs in genuine TEE hardware. Estimated time: 15–25 minutes (first run). What you will do:- Install
dstack-cloudCLI - Configure global GCP/KMS settings
- Create a project and define workload
- Deploy to GCP TDX CVM
- Verify workload access and runtime status
Prerequisites
Before you begin:- GCP project with Intel TDX quota in target zone (for example
us-central1-a) gcloudauthenticated- Linux host (required —
dstack-cloud deployuses FAT32 disk images, which don’t work on macOS) - Docker installed
gsutil,jq,mtools(formcopy),dosfstools(formkfs.fat) — these are needed by the deploy process to build a shared disk image
Step 1: Install dstack-cloud CLI
Step 2: Configure global settings
~/.config/dstack-cloud/config.json):
Optional: configure external KMS
If you already deployed your own KMS, replaceservices.kms_urls:
Step 3: Pull OS image
Step 4: Create project
Step 5: Configure app
Editapp.json and set:
gcp_config.project = "YOUR_PROJECT_ID"gcp_config.zone = "us-central1-a"gcp_config.bucket = "gs://YOUR_BUCKET"
kms. If you want no external KMS for a basic quick test, switch to:
"key_provider": "tpm""gateway_enabled": false- remove
.envfile and removeenv_filefield fromapp.json
Step 6: Define workload
Editdocker-compose.yaml:
Step 7: Deploy
Step 8: Open firewall
Step 9: Verify
Check that the CVM is running and your workload is accessible:- The workload runs in genuine Intel TDX hardware
- The exact code and measurements match expectations
- The boot chain integrity is verified via TDX + vTPM
dstack-cloud status.
Understanding What Happened
When you deployed your application:- Confidential VM Created — A GCP VM with Intel TDX was provisioned
- dstack OS Booted — A minimal, attested guest OS started inside the TEE
- Automatic Disk Encryption — All disk I/O is encrypted with keys managed by the Guest Agent
- TEE Attestation — The Guest Agent provides attestation proof via the TDX + vTPM mechanism
- TLS Certificate — Gateway automatically provisions ACME certificates for your domain
Key Delivery via KMS
dstack uses an external Key Management Service (dstack-kms) to deliver keys to your confidential workloads. The KMS runs in its own TEE and only dispatches keys to workloads that pass attestation verification.Managing Your Deployment
Your application now runs in a hardware-protected environment where even the cloud provider cannot access the memory or data.Troubleshooting
| Issue | Fix |
|---|---|
Boot image ... not found | verify image path and disk.raw existence |
| VM UEFI boot loop | use valid UKI boot image (-uki.tar.gz) |
.env found but KMS is not enabled | remove .env and remove env_file in app.json |
| Port not reachable | ensure firewall rule exists and container has started |
missing gsutil / mcopy / mkfs.fat | install required dependencies |
Next steps
- Detailed guide: Run a Workload on GCP with Self-hosted KMS
- External KMS flow: Run a dstack-kms CVM on GCP
- Concepts: Attestation Integration

