Skip to content

Dstack-TEE/dstack-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

dstack Examples

GitHub Stars License Telegram Documentation

Example applications for dstack - Deploy containerized apps to TEEs with end-to-end security in minutes

Getting StartedExamplesContributingDocumentationCommunity


Overview

This repository contains ready-to-deploy examples demonstrating how to build and run applications on dstack, the developer-friendly SDK for deploying containerized apps in Trusted Execution Environments (TEE).

What You'll Find Here

  • Security Features - Remote attestation, verification, and privacy-preserving apps
  • Secret Management - Secure handling of credentials and sensitive data in TEE environments
  • Networking Patterns - HTTPS termination, custom domains, port forwarding in the cloud
  • Best Practices - Production-ready implementations following TEE security principles

Prerequisites

Before you begin, ensure you have:

  • Access to a dstack environment
  • Basic understanding of TEE concepts
  • Basic familiarity with Docker Compose configuration files
  • Git for cloning the repository

You can deploy dstack on your own server, or use Phala Cloud.

Getting Started

Quick Start

# Clone the repository
git clone https://github.com/Dstack-TEE/dstack-examples.git
cd dstack-examples

# Choose an example
cd attestation/configid-based

# Copy the docker-compose.yaml content to your dstack deployment
# Follow the example-specific README for deployment instructions

Examples

Security & Attestation

Example Description
attestation/configid-based ConfigID-based remote attestation verification
attestation/rtmr3-based RTMR3-based attestation (legacy)

Networking & Domains

Example Description
custom-domain Set up custom domain with automatic TLS certificate management via zt-https
ssh-over-gateway SSH tunneling through dstack gateway
tcp-port-forwarding Arbitrary TCP port forwarding
tor-hidden-service Run Tor hidden services in TEEs

Development Tools

Example Description
launcher Generic launcher pattern for Docker Compose apps
webshell Web-based shell access for debugging
prelaunch-script Pre-launch script patterns used by Phala Cloud

Advanced Use Cases

Example Description
lightclient Blockchain light client integration
timelock-nts Timelock decryption with NTS
private-docker-image-deployment Using private Docker registries

Documentation

Development

Use the dev.sh script for validation and development tasks:

./dev.sh help              # Show available commands
./dev.sh validate <example> # Validate a specific example
./dev.sh validate-all      # Validate all examples
./dev.sh security          # Run security checks
./dev.sh lint              # Run linting checks
./dev.sh check-all         # Run all checks

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Community

Getting Help

Reporting Issues

When reporting issues, please include:

  1. Example name and version
  2. Steps to reproduce
  3. Expected vs actual behavior
  4. Relevant logs and error messages

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.


About

examples and utilities of Dstack applications

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published