Skip to main content

How These Tutorials Work

Each tutorial below is designed to get you hands-on with dstack and the Phala CLI as quickly as possible. For each stack, you’ll simply copy and paste the provided code into your editor, then run the listed commands in order—no prior setup or special SDKs required. These guides are intentionally basic, so you can get comfortable with the Phala CLI workflow and see how dstack operates in practice. Once you’ve completed a tutorial and are familiar with the basics, we recommend checking out the additional reading in the recommended learning path to dive deeper into dstack’s architecture and learn how to perform full production deployments.

Choose Your Application Stack

Pick the tutorial that matches your technology stack to see dstack in action:

🐍 Python Tutorial

Deploy a Flask/FastAPI application with dstack TEE security. Perfect for APIs, web services, and data processing applications.

⚡ Time: 10-15 minutes

Perfect for: APIs, data processing, machine learning

Includes containerization, deployment commands, and monitoring setup.

🔧 Node.js/TypeScript Tutorial

Deploy Express.js applications to dstack TEE infrastructure. Great for APIs, real-time applications, and microservices.

⚡ Time: 10-15 minutes

Perfect for: Real-time apps, APIs, microservices

Complete setup from TypeScript build to secure deployment.

⚡ Rust Tutorial

Deploy high-performance Rust applications with dstack. Optimal for security-critical applications and high-performance computing.

⚡ Time: 10-15 minutes

Perfect for: High-performance, security-critical apps

From Cargo build to TEE deployment with zero overhead.

🌐 Full-Stack Web App

Enterprise deployment patterns, CI/CD automation, and production-ready configurations for dstack.

⚡ Time: 30-60 minutes

Perfect for: Production deployments, enterprise setup

Advanced patterns for scaling dstack applications.