Skip to main content

Frequently Asked Questions

What is Phala Cloud?

Phala Cloud is a platform that provides TEE virtual machines. These VMs offer hardware-level isolation through Intel TDX technology, allowing for secure and private computation.

How are the VMs provisioned?

Each application gets one CVM (Confidential Virtual Machine), which is one TDX. TDX is a VM technology that provides hardware-level isolation powered by Intel CPU.

What are the limitations of the TEE environment in Phala? Can my app access file and network IO?

  • Apps in CVM cannot directly access the host file/network IO.
  • Internet access for the app is allowed but must go through the proxy module.
  • Local filesystem access within the CVM is supported, similar to how a docker container accesses its host machine.
  • Direct access to the host’s filesystem is not allowed when deployed on Phala Cloud

How can I serve a REST API in Phala’s TEE environment?

You need a web server for serving REST APIs. Requests will be forwarded through a proxy module (dstack-gateway) to CVM. Exposed ports in the docker-compose file will generate a public endpoint for accessing your service.

Can I run an app with a database inside the container?

Yes, local disk access is supported within the container environment, allowing you to run an app with a database.

Can the encrypted environment variable be accessed by any other part, including the host OS?

No, it’s encrypted on the client side and sent to the CVM using X25519 encryption scheme. The variables can only be decrypted inside the CVM.

Can Docker logs be accessed by any other part, including the host OS?

Docker logs are not end-to-end encrypted. When Public Logs is enabled, anyone with a container’s log URL can view its output without signing in to Phala Cloud. To get the URL, open the CVM detail page, click Logs, select the container under Docker Containers, then choose Open in New Window and copy the URL from the browser address bar. For an existing CVM, manage this setting under Settings → Worker Attestation Visibility Settings → Public Logs. When Public Logs is disabled, Phala Cloud does not provide Docker log URLs. Use a private log viewer or forward logs to a private external service instead. Changing the setting restarts the CVM.

Is application data persistent on the disk?

Yes, the data you write to the filesystem inside Docker will persist on the disk and be encrypted. Restarting or upgrading will not affect data recovery. To save data on disk, you need to configure volumes in the Docker Compose file and write data to the correct path.

Can I deploy / manage / upgrade CVMs programmatically?

Yes. Resources for programmatic management:

Does the “update” feature sync the latest Docker image?

No. By default, Docker does not proactively update the image unless the image reference is changed (e.g., by modifying the tag or the hash), even if an update is triggered. This is because the update feature is essentially equivalent to running: docker compose down && docker compose up. To ensure the image is actually updated, it’s recommended to always update the tag. Additionally, for best security practices, it’s advised to include the image hash to trace the TEE proof back to the exact Docker image file.

Does a CVM support multiple containers?

Yes, you can deploy multiple containers per CVM through the docker compose file.

Does the cloud support a firewall?

You can apply firewall rules inside your containers. For example, add Nginx to apply IP address filters or WAF rules. There is no cloud-level firewall currently.

Does it support Terraform deployment?

Yes! The Terraform provider is now available. See the Terraform Provider documentation for setup and usage.

Can CVM accept arbitrary TCP / TLS connections?

CVMs support both HTTP-over-TLS (Zero Trust HTTPS) and TCP-over-TLS. See the TCP port forwarding example for exposing SSH or other TCP ports. Under the hood, the TEE wraps the tcp ports you have exposed in docker with TLS. The gateway then routes the TLS traffic based on SNI, the domain name attached to every TLS connection. TLS is needed because it’s the only way to multiplex the tcp traffic. When using the tcp-port-forwarding example, it automatically helps you set up the domain and TLS certificate securely in TEE (thus “Zero Trust”), and reverse-proxy the incoming traffic to your tcp port. You can also manually accept TLS traffic in your CVM and handle the certificate on the application level.

Is there a simulator available for testing?

Yes. The Phala Cloud CLI includes a simulator for local testing. Some new workspaces are also offered a welcome credit when they add a card, while the offer lasts. The dashboard shows the amount before you claim it.

Is Phala Cloud based on serverless functions or traditional VMs? What are the startup and shutdown times?

Phala Cloud uses a VM-based model, not serverless functions. While exact boot time can vary, users can create a CVM to measure startup latency. For most scenarios, it’s best to keep a small instance running continuously and scale up during traffic spikes. Spinning up a new VM for every request may not be efficient. There is currently no TEE-based serverless function, but the team is open to collaborating on building one.

How can I access my docker volume data after deploy?

The docker volume is persisted in the TEE encrypted volume. By default it’s not accessible by humans or the cloud. However, if your business logic requires to expose the volume or part of the volume, you can do it with your backend code manually. For example if you want to allow users to upload images and download it later, you can implement a simple backend web server with file uploading and static file serving. Here are the example tutorials from Flask (upload, static file serving). And it’s also easy to find the tutorials for other web servers (nginx, express, etc).

Can I send encrypted values (like API keys) through the Phala Cloud API for deployment?

Yes, Phala Cloud supports sending encrypted values (e.g., Twitter API keys/secrets) through the API. You must encrypt the variables locally before sending them. The encrypted values can then be included in your deployment request. You can also send them through the feature of Encrypted Environment Variable. If you use CLI, you can set it like here, or if you on the Cloud UI, use the “Encrypted Environment Variables” feature during VM creation.

How long does it take to deploy a Docker image in Phala Cloud?

Deployment time depends on the Docker image size and decompression requirements:
  • A small Python-based image (e.g., kennethreitz/httpbin) typically takes about 1-2 minutes.
  • A larger image like ElizaOS/Eliza (1.4GB) takes 20-25 minutes, with most time spent decompressing after a fast pull.

How fast can a simple program (e.g., multiplying two numbers) execute in a TEE?

Execution speed for a simple operation like multiplying two numbers within a TEE depends on the setup. If the TEE environment (e.g., a Docker container) is already running, execution is near-instantaneous (milliseconds), similar to non-TEE environments. However, if deployment or cold start is required, the total time includes the container pull and decompression (1-2 minutes, as above). For a function-as-a-service (FaaS) experience with seconds-scale execution, the TEE server must be pre-deployed and running, not started on-demand.

Can I update specific environment variables for a deployed Docker image without changing the entire set?

Currently, Phala Cloud does not support updating individual environment variables—you must update all variables together. However, this feature is on the development roadmap. As a workaround: Use two separate environment files: one for static variables (e.g., required for the app to run) and another for dynamic, user-editable variables (e.g., trading parameters). Alternatively, integrate a dedicated HTTPS API endpoint within your deployed instance to allow users to update specific variables without redeploying.
Discuss custom solutions with the Phala team if this is critical for your use case.

How can I deploy multiple Docker instances on a single VM to optimize costs?

You can deploy multiple Docker instances on a single Phala Cloud VM using a “Docker-in-Docker” approach, similar to what large clients have implemented (e.g., running 150+ instances). To do this: Step 1: Create a larger VM (e.g., 10 vCPUs, 20GB RAM).
Step 2: Deploy your Dockerized images inside this VM, adjusting ports or configurations as needed to avoid conflicts.
Step 3: Use custom environment variables per instance for differentiation, for example, set the image name or version through environment variable.
This reduces overhead (e.g., from multiple OS instances) and can lower costs. Phala can assist with implementation—reach out for support.

What endpoint do I use to view logs for a specific instance?

To access logs for a specific instance, if you use Cloud UI, you can check the log on the container page. If you use the Cloud API, you can use the endpoint GET /api/v1/cvms/app_<app_id>/composition. This returns details about all containers within the Compute VM (CVM), including the log endpoint for each. Replace <app_id> with your instance’s unique identifier. Find the full API specification at /phala-cloud/phala-cloud-api/overview. Ensure you authenticate with your API key in the x-api-key header.

Can I set my own TLS certificate for my CVM network access?

Yes. After configuring your certificates, expose port 8080:443 in your Docker Compose file. To access the service over your TLS certificate, use the public endpoint from the Network section and append s to the port number — for example, <id>-8080s.<base_domain>.

How does Phala Cloud ensure that the data in a CVM isn’t accessed by other programs running in the same machine?

Phala Cloud CVM uses a hardware root key unique to the TEE platform, from which individual encryption keys are derived for each application. This key hierarchy ensures that each TEE app has its own distinct key, preventing other programs in the same TEE from accessing your encrypted data. Additionally, you should attest the programs running on Phala Cloud (e.g., via remote attestation) to verify they’re not malicious, enhancing security.

How can others verify that my application is running inside a TEE?

Once the application is running, you can prove this by providing the RA Report, which is exported through an endpoint by your Docker application. See How to Generate Attestation Reports for details.

What’s the best approach to verify Phala Cloud Attestation Report in a smart contract?

You can verify the Attestation Report with Automata’s onchain DCAP verifier written in Solidity and deployed on multiple blockchains. To verify the report, user can get the report hex data from Phala Cloud dashboard “Attestation” tab, and call the smart contract method verifyAndAttestOnChain, check the example here.

Pricing and Resources

Rates and billing rules change over time. The dashboard pages always show the current values:
  • Pricing - current instance, storage, and GPU rates
  • Billing - how billing works

What is the current pricing structure for Phala Cloud?

See the pricing page for current rates and the billing page for billing rules.

How do I pay for CVMs, GPU instances, and Private AI?

Your workspace has one Balance. It pays for CVMs, GPU instances, and Private AI. You top it up in the dashboard, or turn on auto-topup to charge your card when Balance drops below an amount you choose. Auto-topup checks every hour.
  • Gifted credits (for example from a promotion code) pay for CVMs and GPU instances first, then your Balance pays. Gifted credits never pay for Private AI. A welcome credit goes into your Balance.
  • Private AI only uses Balance. We move money from your Balance to Private AI every 5 minutes as you use it. There is no separate Private AI top-up and no minimum.
  • With a card (post-paid, the default when you add one), your CVMs keep running when Balance runs out. We charge your card for the rest.
  • Without a card, top up first. Your CVMs stop when Balance reaches $0.
When you add a card, we charge $1 to check it and refund it right after.

Can I get a refund, and do top-ups expire?

You can get a refund for a top-up within 24 hours of paying it, for the part you have not used. Each top-up expires one year after you paid it. Gifted credits also expire one year after we give them. See the billing page for details.

What kind of user levels do we have on Phala Cloud?

  • Pro: Paid users with self-service capabilities
  • Enterprise: Customized pricing, available through Business Development only

What are the account tier limits?

New accounts start at Tier 1. Contact cloud@phala.network to upgrade.
Check your tier limits before you deploy several CVMs. If you go over your limits, you get a “No available nodes found” error.

What is the billing granularity for Phala Cloud? Is it by hour or minute?

Regular CVMs: Billed by the minute. The pricing page shows hourly rates, but we charge by the minute. GPU TEE: Billed by hours with a minimum rental period. See GPU TEE Billing for details.

How does GPU TEE billing work?

For On-Demand GPU TEE (e.g., H200):
  • Minimum charge: Each instance has a minimum rental period, charged upfront when you order. For example, a single H200 has a 24-hour minimum and a B300 has a 30-day (720-hour) minimum. Check the pricing page for current hourly rates.
  • When billing starts: Only when the instance is actually launched
  • Topping up your Balance or configuring Docker settings does not incur charges
  • GPU instances use Gifted credits first, then your Balance
  • Usage beyond the minimum period is billed hourly
  • If you stop and restart later, the minimum charge applies again
For commitment plans (30, 180, or 365 days), you get lower hourly rates.

What happens if my Balance reaches zero?

It depends on whether your workspace has a card.
  • With a card (post-paid, the default when you add one): your CVMs keep running, and we charge your card for the usage beyond your Balance.
  • Without a card: your CVMs stop. We keep the data of stopped CVMs for 30 days. After that, we may delete it. Top up within those 30 days to get everything back.
  • Private AI stops when your Balance is too low to fund it. Your API keys stay on, and calls work again within about 5 minutes after you top up.
To avoid running out, turn on auto-topup on the Billing page. Enterprise customers can contact cloud@phala.network for custom terms.

Are there any anti-spam measures?

Yes, Phala implements several measures:
  • Adding a card runs a $1 card check (refunded right after) to prevent automated registrations
  • Gifted credits do not pay for Private AI; it is paid from your Balance
  • Free VMs may be offered when they don’t impact paying users
  • Certain Docker base images may be blocked if they’ve been used for abuse
If your deployment is blocked with “violates terms & conditions”, try using official base images (e.g., python:3.11, node:20) or contact support if you believe it’s a false positive.

Can I deploy CVMs through GitHub Actions / CI/CD?

Yes! Phala Cloud supports automated deployments through GitHub Actions. See the CI/CD Pipeline Guide for:
  • Setting up repository secrets
  • Configuring the deployment workflow
  • Using the phala-deploy-action
You can also use the Phala Cloud API for custom automation.

Is Phat Contract / DevPhase / Swanky still supported?

Phat Contract has been sunset. DevPhase and Swanky are no longer supported.
The tech stack has moved to dstack-based infrastructure. For new projects, use: