Astro Deployment
Production deployment for Astro 6 across all major platforms — Cloudflare, Vercel, Netlify, and Node.js.
Agent Workflow (MANDATORY)
Before ANY implementation, use TeamCreate to spawn 3 agents:
- fuse-ai-pilot:explore-codebase - Analyze astro.config.mjs, output mode, and existing adapter
- fuse-ai-pilot:research-expert - Verify adapter docs via Context7/Exa for target platform
- mcp__context7__query-docs - Check Astro 6 adapter compatibility and breaking changes
After implementation, run fuse-ai-pilot:sniper for validation.
Overview
When to Use
- Deploying Astro to Cloudflare Workers with D1/KV/R2 bindings
- Configuring Vercel Serverless or Edge runtime with image CDN
- Setting up Netlify Edge Functions
- Running Astro as standalone Node.js server
- Implementing ISR (Incremental Static Regeneration) patterns
- Configuring edge middleware for auth/redirects
Adapter Matrix
| Platform |
Package |
Runtime |
Notes |
| Cloudflare |
@astrojs/cloudflare v13+ |
workerd |
Astro 6: astro dev runs on workerd |
| Vercel |
@astrojs/vercel |
Node/Edge |
Image CDN built-in |
| Netlify |
@astrojs/netlify |
Edge |
Deno-based edge functions |
| Node.js |
@astrojs/node |
Node |
Standalone server mode |
Core Concepts
Output Modes
output: 'static' — Full SSG, no adapter needed
output: 'server' — Full SSR, adapter required
- Per-page: Mix with
export const prerender = true/false
Cloudflare Astro 6
Astro 6 runs astro dev on workerd — same runtime as production. Enables D1, KV, R2 bindings in local dev via platformProxy. No more simulation gaps. Requires @astrojs/cloudflare v13+ and Node.js 22+.
ISR Pattern
Astro has no native ISR. Implement with platform caching: Cloudflare KV as cache layer, or Vercel's Cache-Control with stale-while-revalidate.
Skew Protection
On Vercel, enable skew protection to prevent asset mismatches between old client and new server during deployments.
Reference Guide
Concepts
| Topic |
Reference |
When to Consult |
| Cloudflare |
cloudflare-adapter.md |
Workers, D1, KV, R2, wrangler |
| Vercel |
vercel-adapter.md |
Serverless, Edge, Image CDN |
| Netlify |
netlify-adapter.md |
Edge Functions, forms |
| Node.js |
node-adapter.md |
Standalone, Express integration |
| ISR Patterns |
isr-patterns.md |
Cache strategies, revalidation |
| Edge Middleware |
edge-middleware.md |
Auth, redirects, A/B testing |
Templates
| Template |
When to Use |
| cloudflare-setup.md |
Full Cloudflare config with bindings |
| vercel-setup.md |
Vercel config with Edge/Image CDN |
Best Practices
- Match adapter to platform early - Switching adapters mid-project is painful
- Cloudflare: use v13+ for Astro 6 - Required for workerd local dev
- Node.js 22+ for Astro 6 - Drops Node 18/20 support
- Per-page prerender - Mix static and SSR for optimal performance
- Test bindings locally - Cloudflare platformProxy enables local D1/KV/R2
1---2name: astro-deployment-33description: Deploying Astro 6 apps — @astrojs/cloudflare (Workers, D1, KV, R2), @astrojs/vercel (Serverless/Edge, Image CDN), @astrojs/netlify (Edge Functions), @astrojs/node (standalone), ISR patterns, edge middleware, skew protection. Use for any deployment configuration.4---56# Astro Deployment78Production deployment for Astro 6 across all major platforms — Cloudflare, Vercel, Netlify, and Node.js.910## Agent Workflow (MANDATORY)1112Before ANY implementation, use `TeamCreate` to spawn 3 agents:13141. **fuse-ai-pilot:explore-codebase** - Analyze astro.config.mjs, output mode, and existing adapter152. **fuse-ai-pilot:research-expert** - Verify adapter docs via Context7/Exa for target platform163. **mcp__context7__query-docs** - Check Astro 6 adapter compatibility and breaking changes1718After implementation, run **fuse-ai-pilot:sniper** for validation.1920---2122## Overview2324### When to Use2526- Deploying Astro to Cloudflare Workers with D1/KV/R2 bindings27- Configuring Vercel Serverless or Edge runtime with image CDN28- Setting up Netlify Edge Functions29- Running Astro as standalone Node.js server30- Implementing ISR (Incremental Static Regeneration) patterns31- Configuring edge middleware for auth/redirects3233### Adapter Matrix3435| Platform | Package | Runtime | Notes |36|----------|---------|---------|-------|37| Cloudflare | `@astrojs/cloudflare` v13+ | workerd | Astro 6: `astro dev` runs on workerd |38| Vercel | `@astrojs/vercel` | Node/Edge | Image CDN built-in |39| Netlify | `@astrojs/netlify` | Edge | Deno-based edge functions |40| Node.js | `@astrojs/node` | Node | Standalone server mode |4142---4344## Core Concepts4546### Output Modes4748- `output: 'static'` — Full SSG, no adapter needed49- `output: 'server'` — Full SSR, adapter required50- Per-page: Mix with `export const prerender = true/false`5152### Cloudflare Astro 65354Astro 6 runs `astro dev` on workerd — same runtime as production. Enables D1, KV, R2 bindings in local dev via `platformProxy`. No more simulation gaps. Requires `@astrojs/cloudflare` v13+ and Node.js 22+.5556### ISR Pattern5758Astro has no native ISR. Implement with platform caching: Cloudflare KV as cache layer, or Vercel's `Cache-Control` with `stale-while-revalidate`.5960### Skew Protection6162On Vercel, enable skew protection to prevent asset mismatches between old client and new server during deployments.6364---6566## Reference Guide6768### Concepts6970| Topic | Reference | When to Consult |71|-------|-----------|-----------------|72| **Cloudflare** | [cloudflare-adapter.md](references/cloudflare-adapter.md) | Workers, D1, KV, R2, wrangler |73| **Vercel** | [vercel-adapter.md](references/vercel-adapter.md) | Serverless, Edge, Image CDN |74| **Netlify** | [netlify-adapter.md](references/netlify-adapter.md) | Edge Functions, forms |75| **Node.js** | [node-adapter.md](references/node-adapter.md) | Standalone, Express integration |76| **ISR Patterns** | [isr-patterns.md](references/isr-patterns.md) | Cache strategies, revalidation |77| **Edge Middleware** | [edge-middleware.md](references/edge-middleware.md) | Auth, redirects, A/B testing |7879### Templates8081| Template | When to Use |82|----------|-------------|83| [cloudflare-setup.md](references/templates/cloudflare-setup.md) | Full Cloudflare config with bindings |84| [vercel-setup.md](references/templates/vercel-setup.md) | Vercel config with Edge/Image CDN |8586---8788## Best Practices89901. **Match adapter to platform early** - Switching adapters mid-project is painful912. **Cloudflare: use v13+ for Astro 6** - Required for workerd local dev923. **Node.js 22+ for Astro 6** - Drops Node 18/20 support934. **Per-page prerender** - Mix static and SSR for optimal performance945. **Test bindings locally** - Cloudflare platformProxy enables local D1/KV/R2