Heads-up: This step assumes you finished Step 3 (kernel headers, Rust, WireGuard, .env, and the systemd unit).

1 – Clone the Sources

git clone https://github.com/Dstack-TEE/meta-dstack.git
cd meta-dstack

2 – Visual Walk-through

2.1 Connect to Your Server

Action
SSH into the host
step1.png
Accept the fingerprint
step2.png
Confirm WireGuard installed
step4.0.png

2.2 Prepare the Build Environment

Action
Install Rust (rustup)
step4.1.png
Finish rustup setup
step4.2.png
Clone meta-dstack
step4.3.png
Generate local build config
step4.4.png

2.3 Build dstack Binaries

Inside the repo:
./build.sh hostcfg          # host configuration
./build.sh dl <domain>      # gateway helper
./build.sh guest            # guest agent
Command
./build.sh hostcfg
step5.png
./build.sh dl …
step6.png
./build.sh guest
step7.png

3 – Start Core Services

# 1. Key-management service
./target/release/dstack-kms --config kms.toml
# 2. Gateway
./target/release/dstack-gateway --config gateway.toml
# 3. Virtual-machine manager
./target/release/dstack-vmm --config vmm.toml
Action
Start kms
step9.png
Start gateway
step10.png
Start vmm
step11.png
Open VMM UI
step12.0.png
Verify components
step12.1.png
Ready to deploy
step12.2.png

✅ Next Step: Deploy Your First Application

By now you’ve successfully built and started all the core dstack components. Your dstack cluster is now ready to deploy confidential applications. To continue with deploying your first application, visit: dstack Deployment Walkthrough