Deploy your first confidential workload on GCP (or AWS EC2 NitroTPM) in under 10 minutes.
GCP
- GCP account with Confidential VM quota (Intel TDX)
gcloudCLI installed and authenticated
AWS (optional)
- AWS account with EC2 and EBS Direct snapshot permissions
awsCLI installed and authenticated
The following IAM policy covers image creation, deployment, status/log access,
start/stop, replacement, and removal performed by dstack-cloud:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ebs:StartSnapshot",
"ebs:PutSnapshotBlock",
"ebs:CompleteSnapshot"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateTags",
"ec2:DeleteSnapshot",
"ec2:DescribeImages",
"ec2:DescribeInstances",
"ec2:DescribeSnapshots",
"ec2:GetConsoleOutput",
"ec2:RegisterImage",
"ec2:RunInstances",
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances"
],
"Resource": "*"
}
]
}If aws_config.iam_instance_profile is set, also grant iam:PassRole for that
specific role. iam:PassRole is not required for EBS Direct or for instances
launched without an instance profile. Creating a VPC, subnet, or security group
is outside dstack-cloud; supply existing IDs in aws_config and grant their
management permissions separately only when needed.
Download the dstack-cloud CLI:
# Clone the repository (temporary until packaged release)
git clone https://github.com/Dstack-TEE/dstack.git
export PATH="$PATH:$(pwd)/dstack/scripts/bin"Verify the installation:
dstack-cloud --helpSet up your cloud credentials:
dstack-cloud config-editThis opens an editor with the global configuration file. For GCP, configure:
{
"gcp": {
"project": "your-gcp-project-id",
"zone": "us-central1-a"
},
"aws": {
"region": "us-east-1"
}
}For AWS, dstack-cloud writes the local boot, shared, and labeled-data RAW disks
directly to EBS snapshots in 512-KiB checksummed blocks. It does not require an
S3 bucket, a vmimport service role, or iam:PassRole.
# GCP (default)
dstack-cloud new my-app
cd my-app
# or AWS NitroTPM
dstack-cloud new my-aws-app --platform aws --region us-east-1
cd my-aws-appThis creates a project directory with:
my-app/
├── app.json # Application configuration
├── docker-compose.yaml # Your container definition
├── .env # Environment variables
└── prelaunch.sh # Pre-launch script (optional)
Edit docker-compose.yaml with your application:
services:
web:
image: nginx:latest
ports:
- "8080:80"For AI workloads with GPU:
services:
vllm:
image: vllm/vllm-openai:latest
runtime: nvidia
command: --model Qwen/Qwen2.5-7B-Instruct
ports:
- "8000:8000"Add sensitive environment variables to .env:
API_KEY=your-secret-key
DATABASE_URL=postgres://...These are encrypted before leaving your machine and only decrypted inside the TEE.
Deploy to your cloud provider:
# AWS without a preconfigured aws_config.ami_id needs the local UKI package first:
# dstack-cloud pull <release-image-name>
dstack-cloud deployThe CLI will:
- Build and push your container configuration
- Create a Confidential VM
- Boot the dstack guest OS
- Start your containers
Monitor your deployment:
# Check deployment status
dstack-cloud status
# View console logs
dstack-cloud logs
# Follow logs in real-time
dstack-cloud logs --followAllow traffic to your application:
# Allow HTTPS traffic
dstack-cloud fw allow 443
# Allow your app port
dstack-cloud fw allow 8080
# List firewall rules
dstack-cloud fw listOnce deployed, access your application via the assigned endpoint. The dstack-cloud status command shows the public URL.
For apps with TLS:
https://<app-id>.<gateway-domain>
For specific ports:
https://<app-id>-8080.<gateway-domain>
Users can verify your deployment is running in a genuine TEE:
# Get attestation quote from your app
curl https://<your-app>/attestation
# Verify with dstack-verifier
dstack-verifier verify <quote>See the Verification Guide for details.
# List all deployments
dstack-cloud list
# Stop a deployment
dstack-cloud stop
# Start a stopped deployment
dstack-cloud start
# Remove a deployment completely
dstack-cloud remove- Usage Guide - Detailed deployment and management
- Confidential AI - Run AI workloads with hardware privacy
- GCP Attestation - How TDX + TPM attestation works
- AWS Nitro Attestation - How NSM attestation works
- Security Model - Understand the trust boundaries
Deployment stuck at "Creating VM":
- Check your cloud quota for Confidential VMs
- Verify your credentials with
gcloud auth list
Container not starting:
- Check logs with
dstack-cloud logs - Verify your docker-compose.yaml syntax
- Ensure images are accessible from the cloud region
Cannot access application:
- Check firewall rules with
dstack-cloud fw list - Verify the port mapping in docker-compose.yaml
- Check if the container is healthy in the logs