Prerequisites
- Node.js 18+ or Bun installed
- A Phala Cloud account
Install the CLI
Install the Phala Cloud CLI globally:npx phala / bunx phala to run commands without installing.
Authenticate
The CLI supports device flow authentication—run the login command and follow the browser prompt:Deploy a Jupyter Notebook
Create adocker-compose.yml file:
dstack.sock volume mount enables your code to communicate with the TEE environment.
Deploy with a name and access token:
Access Your Notebook
Check deployment status:running, get the public URL:
my-secret-token in this example) and click Log in.
View container logs if needed:
Test TEE Functions
Once logged in, click Python 3 (ipykernel) under “Notebook” to create a new notebook. In the first cell, install the dstack SDK:Clean Up
When you’re done experimenting, delete the CVM to stop billing:phala cvms stop to pause without deleting, phala cvms start to resume, and phala cvms attestation to view the TEE attestation report.
Next Steps
- Deploy a custom application with your own Docker Compose file
- Set up CI/CD for automated deployments
- Learn about TEE attestation and verification

