Skip to main content

What You’ll Deploy

A secure Express.js API with:

  • Pre-built Node.js web server
  • TEE security verification
  • Health monitoring endpoints
  • No code changes required

This tutorial uses an existing Node.js container to demonstrate dstack deployment. Perfect for APIs, real-time applications, and microservices.

Prerequisites

  • Access to a dstack host (see setup guide)
  • SSH tunnel to dstack dashboard
  • Web browser for dashboard access
  • 5 minutes of your time

Step 1: Open Tunnel & Access Dashboard

Connect to your dstack host and open the dashboard:
1

Open tunnel & access dashboard

This command lets you access the dstack dashboard running on your remote host.
Open in your browser:http://127.0.0.1:13680

Step 2: Deploy Node.js Container

Navigate to your dstack dashboard and click “Deploy a new instance”.

Add the Docker Compose Configuration

Copy this YAML and paste it into the “Docker Compose File” field:
2Paste your Docker Compose YAML
Click “Deploy” to start your Node.js application.

Step 3: Launch and Monitor

  1. Click Launch in the dashboard
dstack will start your Node.js Express application. This usually takes 1–2 minutes.
  1. Monitor the deployment progress
  • Check Serial Logs for VM boot details
  • View container status in the Containers tab
  • Wait for the application to show as “Running”

Step 4: Test Your Deployment

After deployment, find your app’s URL in the dashboard:

Test the Endpoints

Expected Responses

Main endpoint (/):
Health endpoint (/health):
Compute endpoint (/api/compute):

What’s Next?

Your Node.js application is now running securely in a dstack TEE environment with: Hardware Protection - Application runs in Intel TDX secure environment
Memory Encryption - All data encrypted by CPU hardware
Attestation Support - Cryptographic proof of security available
Production Ready - HTTPS endpoints with automatic certificates

Continue Learning