- NVIDIA H100
- NVIDIA H200
- NVIDIA B200
- Enable TDX in BIOS, configure the system environment, and install Dstack (with GPU stack enabled)
- Run the Phala GPU Mining service inside the server via Docker and connect to Phala Cloud
1. Enable TDX & Install Dstack
1.1 Enable TDX in BIOS
Before installing or booting the OS, enter the server BIOS and enable:- Intel TDX
- Intel VT-x / VT-d
- SR-IOV (if available)
- Any required CPU virtualization / security features (names may vary by vendor)
Different hardware vendors may use different BIOS names. Please refer to your server’s manual.
1.2 Configure TDX System Environment
Follow Intel’s / Dstack’s official instructions to configure the TDX system environment:- Dstack repo & basic setup:
https://github.com/Dstack-TEE/dstack
- Intel TDX hardware setup guide:
https://cc-enabling.trustedservices.intel.com/intel-tdx-enabling-guide/04/hardware_setup/
1.3 Upgrade NVIDIA Driver to Latest Version
Phala GPU Mining relies on NVIDIA Confidential Computing–capable GPUs and drivers.Please upgrade your NVIDIA driver to the latest supported version and verify compatibility:
- NVIDIA Confidential Computing compatibility matrix:
https://www.nvidia.com/en-us/data-center/solutions/confidential-computing/secure-ai-compatibility-matrix/
1.4 Install and Run Dstack
The base deployment of Dstack follows the official documentation:- Dstack repo:
https://github.com/Dstack-TEE/dstack
By default, the Dstack GitHub documentation focuses on Confidential CPU only.
To run Phala GPU Mining, you must additionally enable and configure the GPU Stack.
1.4.1 Update vmm.toml for GPU Stack
Locate your vmm.toml configuration file and update (or add) the following fields.
Global paths & KMS configuration:
cvm.gpu.include[]= use all available GPUs- Or specify specific GPU device IDs as needed.
kms_url/kms_urls- Replace with your actual KMS installation address or domain.
gateway_urls- Replace with your actual Dstack gateway URL(s).
qemu_path- In some environments,
qemuis not located at/opt/qemu-xxx.
Check the actual QEMU location and ensure your Dstack configuration points to the correct path.
- In some environments,
image_path/run_path- Use paths where your VM images and runtime files will be stored.
1.4.2 Start Dstack Services
Once configuration is complete, start the core Dstack components in the following order:- Start KMS
- Start Gateway
- Start VMM
1.4.3 Verify Dstack Setup
Dstack is considered correctly deployed if:- All three processes (KMS, Gateway, VMM) run without critical errors.
- You can access the Dstack web UI via its URL (dashboard loads successfully).
- GPU devices are visible/usable through Dstack after enabling
[cvm.gpu].
2. Run the Phala GPU Mining Service
After Dstack and the GPU stack are running correctly, you can start deploying the Phala GPU Mining service. The mining backend is a Docker-based service that:- Connects to your local Dstack instance
- Registers the node with Phala Cloud
- Exposes your GPU resources for Phala GPU mining
It is recommended to run the backend as root (or with equivalent privileges).
2.1 Use the Official Mining Backend Docker Setup
Phala provides an official Docker Compose configuration:-
Docker Compose file:
https://github.com/Phala-Network/dstack-mining-backend/blob/main/docker-compose.yaml -
Full backend repo:
https://github.com/Phala-Network/dstack-mining-backend
2.2 Clone the Repository and Configure
docker-compose.yaml and update necessary fields:
- Dstack gateway and KMS endpoints
- Phala Cloud API credentials
- Optional: volume mounts, logging, etc.
2.3 Start the Mining Backend
- Launch the backend container
- Connect it to your local Dstack instance
- Register your GPU node with Phala Cloud
2.4 Confirm Mining Is Active
Check Docker containers:- Backend connects to Dstack gateway & KMS
- GPUs (H100 / H200 / B200) are detected
- Your node registers on Phala Cloud
- Mining jobs begin to run
3. Troubleshooting
Common issues:-
Intel TDX module errors
→ Re-check BIOS and Intel’s TDX guide. -
GPU not detected
→ Ensurecvm.gpu.enabled = trueand correct NVIDIA drivers. -
QEMU path issue
→ Verify QEMU location on your OS. -
Backend cannot reach Dstack
→ Confirm gateway/KMS URLs and firewall settings. -
Docker device permission issues
→ Use root or ensure access to/dev/nvidia*.

