Prerequisites
- Phala Cloud account
- Credentials for one of the supported registries:
- Docker Hub
- GitHub Container Registry (GHCR)
- AWS
Overview
Phala Cloud supports private image pulls during CVM startup. Registry credentials are passed as encrypted environment variables and only used at runtime inside the trusted boot flow.Method 1: Configure from the Dashboard
- Open CVM creation and go to Advanced Features.
- Open Private Container Registry.
- Select one provider:
- No private registry
- Docker Hub
- AWS
- Fill in credentials for the selected provider.
- Submit deployment.

Private Container Registry providers
All registry credentials are encrypted before submission and consumed only at runtime.
Method 2: Configure with Encrypted Secrets
Set the following environment variables for CLI or API workflows.Docker Hub
Use your Docker Hub username and password (or access token). Image paths follow the formatusername/image:tag or docker.io/username/image:tag.
See Docker Hub documentation for account and repository setup.
Docker Hub is the default registry — you do not need to set
DSTACK_DOCKER_REGISTRY.
GHCR

GHCR credential form
read:packages scope. Image paths follow the format ghcr.io/OWNER/IMAGE:TAG.
With GitHub CLI, check your token scopes, add read:packages if missing, and print the token:
AWS ECR

AWS ECR credential form
ecr:GetAuthorizationToken and ecr:BatchGetImage permissions. Image paths follow the format ACCOUNT_ID.dkr.ecr.REGION.amazonaws.com/REPO:TAG.
With AWS CLI:
Deploy with Phala Cloud CLI
You can deploy withphala CLI and pass secrets via -e .env.
GHCR example
.env:
docker-compose.yml:
AWS ECR example
.env:
Deploy with Phala Cloud API
When using the API, set the same environment variables listed above. See Phala Cloud API docs for endpoint details.Pull Rate Limits
Each registry enforces pull rate limits. During frequent debugging and redeployment cycles, these limits can block image pulls and cause CVM startup failures.Docker Hub
See Docker Hub pull usage and limits for details.
GHCR
GitHub does not publish hard pull rate limits for GHCR. Public image pulls are effectively unlimited. Private image pulls are subject to your GitHub plan’s data transfer quota. See GitHub billing for Packages for details.AWS ECR
Private does not impose per-image pull rate limits. API calls (e.g.GetAuthorizationToken) are throttled at ~20 TPS per region per account. See Amazon ECR service quotas for details.
Troubleshooting
If private image deployment fails:- Verify credentials are valid and not expired.
- Ensure image path and tag exist.
- Confirm pull permissions for the account used.
- Check CVM serial logs for pre-launch errors.
GHCR-specific checks
DSTACK_DOCKER_REGISTRYis set toghcr.io- contains at least
read:packages - The package visibility and permission settings allow this account to pull

