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.4versions:5 astro: "7"6user-invocable: true7references: references/cloudflare-adapter.md, references/vercel-adapter.md, references/netlify-adapter.md, references/node-adapter.md, references/isr-patterns.md, references/edge-middleware.md, references/templates/cloudflare-setup.md, references/templates/vercel-setup.md8related-skills: astro-7, astro-db, astro-islands9metadata:10 source: https://skillmd.com/skills/fusengine/astro-deployment11---1213<objective>14Configures 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).1516Also 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.17</objective>1819# Astro Deployment2021Production deployment for Astro 7 across all major platforms — Cloudflare, Vercel, Netlify, and Node.js.2223## Agent Workflow (MANDATORY)2425Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`:26271. **fuse-ai-pilot:explore-codebase** - Analyze astro.config.mjs, output mode, and existing adapter282. **fuse-ai-pilot:research-expert** - Verify adapter docs via Context7/Exa for target platform293. **mcp__context7__query-docs** - Check Astro 7 adapter compatibility and breaking changes3031After implementation, run **fuse-ai-pilot:sniper** for validation.3233---3435## Overview3637### When to Use3839- Deploying Astro to Cloudflare Workers with D1/KV/R2 bindings40- Configuring Vercel Serverless or Edge runtime with image CDN41- Setting up Netlify Edge Functions42- Running Astro as standalone Node.js server43- Implementing ISR (Incremental Static Regeneration) patterns44- Configuring edge middleware for auth/redirects4546### Adapter Matrix4748| Platform | Package | Runtime | Notes |49|----------|---------|---------|-------|50| Cloudflare | `@astrojs/cloudflare` v13+ | workerd | Astro 6: `astro dev` runs on workerd |51| Vercel | `@astrojs/vercel` | Node/Edge | Image CDN built-in |52| Netlify | `@astrojs/netlify` | Edge | Deno-based edge functions |53| Node.js | `@astrojs/node` | Node | Standalone server mode |5455---5657## Core Concepts5859### Output Modes6061- `output: 'static'` — Full SSG, no adapter needed62- `output: 'server'` — Full SSR, adapter required63- Per-page: Mix with `export const prerender = true/false`6465### Cloudflare Astro6667Astro 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+.6869### ISR Pattern7071Astro has no native ISR. Implement with platform caching: Cloudflare KV as cache layer, or Vercel's `Cache-Control` with `stale-while-revalidate`.7273### Skew Protection7475On Vercel, enable skew protection to prevent asset mismatches between old client and new server during deployments.7677---7879## Reference Guide8081### Concepts8283| Topic | Reference | When to Consult |84|-------|-----------|-----------------|85| **Cloudflare** | [cloudflare-adapter.md](references/cloudflare-adapter.md) | Workers, D1, KV, R2, wrangler |86| **Vercel** | [vercel-adapter.md](references/vercel-adapter.md) | Serverless, Edge, Image CDN |87| **Netlify** | [netlify-adapter.md](references/netlify-adapter.md) | Edge Functions, forms |88| **Node.js** | [node-adapter.md](references/node-adapter.md) | Standalone, Express integration |89| **ISR Patterns** | [isr-patterns.md](references/isr-patterns.md) | Cache strategies, revalidation |90| **Edge Middleware** | [edge-middleware.md](references/edge-middleware.md) | Auth, redirects, A/B testing |9192### Templates9394| Template | When to Use |95|----------|-------------|96| [cloudflare-setup.md](references/templates/cloudflare-setup.md) | Full Cloudflare config with bindings |97| [vercel-setup.md](references/templates/vercel-setup.md) | Vercel config with Edge/Image CDN |9899---100101## Best Practices1021031. **Match adapter to platform early** - Switching adapters mid-project is painful1042. **Cloudflare: use v13+ for Astro 7** - Required for workerd local dev1053. **Node.js 22+ for Astro 7** - Drops Node 18/20 support1064. **Per-page prerender** - Mix static and SSR for optimal performance1075. **Test bindings locally** - Cloudflare platformProxy enables local D1/KV/R2