Deploy Astro on Light Cloud - static output on the CDN by default, or the Node adapter as a container under the SSR policy.
Deploy Astro
Astro is detected from its dependency and astro.config.mjs. By default Astro builds static output - and that is how it deploys here: npm run build fills dist/, and dist/ is served from the CDN with free bandwidth. No server, no region, no cold starts.
Static (the default)#
- Output directory:
dist- change it in Build settings if your config moves it. - Environment variables: static builds run with the environment's variables set, so
PUBLIC_*values inline as usual. Never put secrets behind the public prefix. - Islands, view transitions, and client scripts are all just files in the output - nothing special to configure.
Server mode#
With output: 'server' and the Node adapter, Astro renders per request and runs as a Node.js container. Server-rendered frontends run under the SSR policy: pinned to the Micro size, scaling 0-3, behind the edge CDN.
- The Node adapter respects
PORT, which is set for you. - Server code reads environment variables at runtime; the image build itself runs without them.
Which to pick#
Content sites, blogs, docs, marketing: static. Per-request rendering, form actions, sessions: server. Astro's hybrid rendering counts as server mode - it needs the origin.