Skip to the content.

RFC 0019: Managed Hosting via TeeSQL / AttestMesh

Summary

Run dstack-webhost as a managed, multi-tenant service on infrastructure TeeSQL operates (their AttestMesh mesh and dstack nodes), so the hosting/ops burden moves to them while we keep the app and the attestation-appraisal layer. dstack-webhost stays open and self-hostable for personal use; the managed deployment is the paid, multi-tenant version. Here a tenant means a separate customer account authorized to deploy its own apps on the shared host; today each CVM has a single owner and there are no tenants. This is a request for collaboration: the design below is reviewable, but the (a)/(b) topology choice and the commercial model are decided with TeeSQL, not unilaterally here.

Motivation

Two gaps line up:

A multi-tenant attestable-app host is a genuine stateful-cluster use of the mesh (membership, the cluster shared key, peer coordination), not a toy. Putting dstack-webhost on AttestMesh gives them their first real app and gives us a managed, reliable substrate.

What each side brings:

Design

TeeSQL data model

The unit of tenancy is a dstack-webhost instance (one daemon) owning N projects. The atom is the Project manifest (proxy/projects.py): name, runtime, entry, port, mode (dev/attested), the source pins (source/ref/commit_sha/ tree_hash, image/image_digest), volumes, and the per-app attestation fields (app_id, app_pubkey, binding_quote, attestation_kind). Private app state lives in the per-project data volume (/daemon-data/<name>); secrets live in env and are the credential broker’s problem (RFC 0018), not the host store’s.

What TeeSQL holds vs. never holds: they operate nodes, volumes, and the mesh, but no plaintext tenant secret ever reaches them — env stays behind RFC 0018 grants / dstack KMS-derived keys — and manifests plus pins are public-safe metadata (the RFC 0015 verification surface already publishes them for attested projects).

AttestMesh topology

Architecture options (decide together)

Recommendation: start with (a) to get live, with (b) as the target once it’s a real product. Their input decides this, since they operate it.

Deployment story

One codebase, two deployment modes (open core):

Ownership: we own the tenant relationship, billing, and signups by default; TeeSQL is invisible infra. The appraisal is ours; co-branding is an open question.

Migration (a) → (b): the RFC 0017 export bundle is carried across verbatim — it is the compatibility contract between the two options, so no bespoke migration format ever exists.

Open Questions

Out of scope

Constraints

MVP slice

First implementable step: option (a) pilot — one managed base-prod dstack node, mesh unused, durability floor wired. TeeSQL operates the node in production; any base-prod dstack node qualifies to prove the slice (a self-operated one stands in until theirs exists).

Our side, implementable now:

  1. RFC 0017 export/import plus the external-named-volume requirement land — this is the pilot’s recovery path (prerequisite, tracked under RFC 0017).
  2. Deploy dstack-webhost as an attested app on that node, promoted through the normal gate, so the hosting layer is itself attestable — the managed pitch’s proof point.
  3. Document the managed bring-up runbook (the steps above) in-repo; credentials stay out of the repo entirely.

Acceptance criteria for the slice:

The option (b) cluster work (CSK-keyed shared state, mesh coordination, HA replicas) is a follow-up tracking issue filed against this section, not part of the slice.