This guide deploys a Swarms agent into a Trusted Execution Environment (TEE) on Phala Cloud. TEEs run your agent inside a hardware-isolated enclave so neither the host operator nor a compromised orchestrator can read or tamper with the running process. After deployment you can produce an on-chain proof that the published Docker image is exactly what is executing.Documentation Index
Fetch the complete documentation index at: https://docs.swarms.world/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Docker installed locally.
- A DockerHub account.
- Access to the Phala Cloud dashboard.
Step 1: Build and publish the Docker image
Step 2: Deploy to Phala Cloud
Pick one of:- CLI (recommended) — use tee-cloud-cli for scripted, reproducible deployments.
- Dashboard — deploy interactively from the Phala Cloud Dashboard.
Step 3: Verify the TEE attestation
Once your service is live, visit the TEE Attestation Explorer and check that the published image hash matches the running enclave. This is your verifiable proof that the deployed code is exactly the code you pushed — anyone (you, your users, an auditor) can independently verify it.Sample docker-compose.yaml
tappd.sock mount exposes Phala’s TEE attestation socket inside your container so the agent can request and emit attestation reports at runtime.
When to use TEE deployment
- Sensitive system prompts or tools — the prompt and tool implementations stay isolated from the host.
- Regulated workloads — health, finance, or legal use cases where you need cryptographic evidence of what code processed user data.
- Multi-party trust — when several stakeholders need to agree on what an agent is doing without trusting a single operator.
Useful links
Source: docs/swarms_cloud/phala_deploy.md. Replace
<your-dockerhub-username> with your actual DockerHub username when running the commands above.See also
- Deployment Solutions Overview — when to pick TEE vs Cloud Run vs Workers.
- Google Cloud Run — managed-container alternative without TEE guarantees.
- Cloudflare Workers — edge-cron alternative for non-confidential workloads.