Skip to main content

Sites: static and frontend hosting on a global CDN

Sites are just like Apps, but purpose-built for frontend frameworks and static sites. They provide streamlined builds, global CDN caching, and instant rollbacks — ideal for frameworks like Next.js (static export), Vinext, React (SPA), Vue, Nuxt, Astro, Docusaurus, Vite, Svelte, and more.

What you get

  • Global CDN for static assets
  • Automatic previews and rollbacks
  • Simple build configuration (framework, build command, output directory)
  • Custom domains and HTTPS
  • Environment variables for build-time only or client-side usage

Create a Site

  1. Go to Sites → Create New Site
  2. Connect your Git provider and select a repository. The planned opt-in self-hosted forge beta will add Gitea, Forgejo, and Gogs connections after contract validation.
  3. Select your framework (e.g., React, Next.js, Vinext, Vue, Nuxt, Astro, Docusaurus, Vite, Svelte)
  4. Provide build settings:
    • Build Command (e.g., npm run build)
    • Output Directory (e.g., dist, build, out, public)
    • (Optional) Working Directory for monorepos (e.g., /apps/web)
  5. Click Create — we build and deploy to a globally cached URL

Framework Hints

  • React / Vite / Vue / Svelte:
    • Build: npm run build
    • Output: dist (defaults vary by tool but dist is common)
  • Next.js (static export):
    • next.config.jsoutput: 'export'
    • Build: next build && next export
    • Output: out
  • Vinext:
    • Build: npm run build
    • Output: .output (node-server preset); runtime uses vinext start (Node server)
  • Nuxt:
    • Build: npm run build && npm run generate
    • Output: .output/public (Nuxt 3) or dist (Nuxt 2 generate)
  • Astro / Docusaurus:
    • Build: npm run build
    • Output: dist for Astro, build for Docusaurus

Custom Domains

  • Add your domain under Site → Custom Domains
  • Follow the DNS instructions to point your domain to Hostless
  • Automatic HTTPS is provisioned

Environment Variables

  • Build-time vars are injected during build
  • Client-side usage should be prefixed according to the framework’s rules (e.g., NEXT_PUBLIC_ for Next.js)

Rollbacks

  • Each successful deploy is versioned — trigger a rollback instantly from the dashboard if needed