Also covers output-mode selection (static/server, per-page prerender), ISR patterns implemented via platform caching (Cloudflare KV or Vercel stale-while-revalidate, since Astro has no native ISR), and edge middleware for auth/redirects/A-B testing. Does not cover Astro DB setup itself (astro-db) or Islands hydration directives (astro-islands) beyond what's needed to pick a server adapter.
Astro Deployment
Production deployment for Astro 7 across all major platforms — Cloudflare, Vercel, Netlify, and Node.js.
Agent Workflow (MANDATORY)
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
- 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 7 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
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 7 - Required for workerd local dev
- Node.js 22+ for Astro 7 - 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-deployment3description: Use when deploying an Astro 7 app to Cloudflare, Vercel, Netlify, or Node.js — adapter setup, ISR patterns, edge middleware.4---56<objective>7Configures Astro 7 deployment across the four major adapters: `@astrojs/cloudflare` (Workers runtime, D1/KV/R2 bindings, workerd local dev via `platformProxy`, v13+ required), `@astrojs/vercel` (Serverless/Edge, built-in Image CDN, skew protection), `@astrojs/netlify` (Deno-based Edge Functions), and `@astrojs/node` (standalone server).89Also covers output-mode selection (`static`/`server`, per-page `prerender`), ISR patterns implemented via platform caching (Cloudflare KV or Vercel `stale-while-revalidate`, since Astro has no native ISR), and edge middleware for auth/redirects/A-B testing. Does not cover Astro DB setup itself (astro-db) or Islands hydration directives (astro-islands) beyond what's needed to pick a server adapter.10</objective>1112# Astro Deployment1314Production deployment for Astro 7 across all major platforms — Cloudflare, Vercel, Netlify, and Node.js.1516## Agent Workflow (MANDATORY)1718Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`:19201. **fuse-ai-pilot:explore-codebase** - Analyze astro.config.mjs, output mode, and existing adapter212. **fuse-ai-pilot:research-expert** - Verify adapter docs via Context7/Exa for target platform223. **mcp__context7__query-docs** - Check Astro 7 adapter compatibility and breaking changes2324After implementation, run **fuse-ai-pilot:sniper** for validation.2526---2728## Overview2930### When to Use3132- Deploying Astro to Cloudflare Workers with D1/KV/R2 bindings33- Configuring Vercel Serverless or Edge runtime with image CDN34- Setting up Netlify Edge Functions35- Running Astro as standalone Node.js server36- Implementing ISR (Incremental Static Regeneration) patterns37- Configuring edge middleware for auth/redirects3839### Adapter Matrix4041| Platform | Package | Runtime | Notes |42|----------|---------|---------|-------|43| Cloudflare | `@astrojs/cloudflare` v13+ | workerd | Astro 6: `astro dev` runs on workerd |44| Vercel | `@astrojs/vercel` | Node/Edge | Image CDN built-in |45| Netlify | `@astrojs/netlify` | Edge | Deno-based edge functions |46| Node.js | `@astrojs/node` | Node | Standalone server mode |4748---4950## Core Concepts5152### Output Modes5354- `output: 'static'` — Full SSG, no adapter needed55- `output: 'server'` — Full SSR, adapter required56- Per-page: Mix with `export const prerender = true/false`5758### Cloudflare Astro5960Astro 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+.6162### ISR Pattern6364Astro has no native ISR. Implement with platform caching: Cloudflare KV as cache layer, or Vercel's `Cache-Control` with `stale-while-revalidate`.6566### Skew Protection6768On Vercel, enable skew protection to prevent asset mismatches between old client and new server during deployments.6970---7172## Reference Guide7374### Concepts7576| Topic | Reference | When to Consult |77|-------|-----------|-----------------|78| **Cloudflare** | [cloudflare-adapter.md](references/cloudflare-adapter.md) | Workers, D1, KV, R2, wrangler |79| **Vercel** | [vercel-adapter.md](references/vercel-adapter.md) | Serverless, Edge, Image CDN |80| **Netlify** | [netlify-adapter.md](references/netlify-adapter.md) | Edge Functions, forms |81| **Node.js** | [node-adapter.md](references/node-adapter.md) | Standalone, Express integration |82| **ISR Patterns** | [isr-patterns.md](references/isr-patterns.md) | Cache strategies, revalidation |83| **Edge Middleware** | [edge-middleware.md](references/edge-middleware.md) | Auth, redirects, A/B testing |8485### Templates8687| Template | When to Use |88|----------|-------------|89| [cloudflare-setup.md](references/templates/cloudflare-setup.md) | Full Cloudflare config with bindings |90| [vercel-setup.md](references/templates/vercel-setup.md) | Vercel config with Edge/Image CDN |9192---9394## Best Practices95961. **Match adapter to platform early** - Switching adapters mid-project is painful972. **Cloudflare: use v13+ for Astro 7** - Required for workerd local dev983. **Node.js 22+ for Astro 7** - Drops Node 18/20 support994. **Per-page prerender** - Mix static and SSR for optimal performance1005. **Test bindings locally** - Cloudflare platformProxy enables local D1/KV/R2