Recipe: static site on a custom domain

Deploy your built static site to a nodejs-24 VM, then attach a custom domain — add the CNAME your agent gives you, and wait_for_domain flips it live with automatic TLS.

Host a built static site (Astro, Vite, plain HTML) on a VM and serve it on your own domain with automatic TLS.

One prompt

host the contents of ./dist on a VM at www.example.com

Your agent chains:

  1. create_vm with image: nodejs-24 — the supervisor serves /root/app on :3000 (a tiny static server like serve works; or point your framework’s preview/start command at the build output).
  2. upload your ./dist into /root/app.
  3. add_domain with your domain, the vmId, and vmPort: 3000. The response includes the exact CNAME record to add at your DNS provider.
  4. You add the CNAME at your DNS provider. Your agent calls wait_for_domain, which polls until the hostname is verified and routing is live — TLS is provisioned automatically.

Your site is now at https://www.example.com.

See Custom domains for the full CNAME → verify → enable walk-through and managing domains later.

Notes

  • The default per-VM URL (https://vm-abc123-3000.superjolt.host) works immediately, before you attach any domain.
  • A custom domain must point at an HTTP port. Toggle the public route off/on any time with set_domain_enabled.