Every Astro deployment guide starts the same way: connect your repo to Vercel, push, done. That works for a static blog.
But Astro isn’t a static site generator anymore. SSR mode, API routes, server-side auth, database queries – Astro handles real backend work now. And the moment you enable SSR, the “connect repo and push” workflow breaks down. Your server routes become serverless functions with cold starts, timeout limits, and runtime restrictions.
Here are five ways to deploy an Astro site in 2026 – with honest coverage of both static and SSR for each method.
Quick Comparison
| Method | Static Deploy | SSR Support | Cost | Setup Time | Cold Starts |
|---|---|---|---|---|---|
| Vercel | Excellent | Serverless (adapter) | Free / $20/mo pro | 5 min | 200-500ms |
| Netlify | Excellent | Serverless (adapter) | Free / $19/mo pro | 5 min | 800ms-1.5s |
| Cloudflare Pages | Best free option | Workers (limited Node.js) | Free / $5/mo | 5 min | None (static) |
| VPS + nginx | Full control | Native Node.js | $4-5/mo | 30-60 min | None |
| InstaPods CLI | One command | Native Node.js | $3/mo flat | 2 min | None |
1. Vercel – Best for Static, Complicated for SSR
Vercel is the default choice for JavaScript frameworks. The Astro integration works out of the box for static sites.
Static deployment
npm run build
# Connect repo to Vercel — auto-detects Astro, deploys dist/
Vercel handles the build, serves from a global CDN, and gives you preview deployments on every PR. For a static blog or docs site, this is hard to beat.
SSR deployment
SSR on Vercel requires the @astrojs/vercel adapter:
npx astro add vercel
This compiles your server routes into serverless functions. That means:
- Cold starts: 200-500ms on first request after idle
- Timeout limits: 10 seconds on free, 60 seconds on pro
- No persistent connections: WebSockets, SSE, and long-polling don’t work
- No filesystem writes: Serverless functions are stateless
- Vendor lock-in: The adapter ties your code to Vercel’s runtime
Pricing: Free tier is generous for static. Pro ($20/mo per member) adds longer function timeouts and more bandwidth. Watch for usage-based charges on function invocations and bandwidth – hobby projects can hit $30-40/mo after a traffic spike.
When to use: Static Astro sites where you want zero-config deployment. Avoid for SSR unless you’re comfortable with serverless limitations.
2. Netlify – Polished DX, Same SSR Problems
Netlify has been doing static site hosting since before it was trendy. Deploy previews, form handling, and edge functions built in.
Static deployment
Same flow as Vercel – connect repo, Netlify detects Astro, builds and deploys. Free tier gives 100GB bandwidth and 300 build minutes per month.
SSR deployment
Uses the @astrojs/netlify adapter, which converts server routes to Netlify Functions (Lambda-style):
npx astro add netlify
The cold start problem is worse than Vercel. First request after idle: 800ms-1.5s measured. Subsequent requests are fast, but that initial hit is painful for SSR pages where users expect instant loads.
Build minutes add up. 300 free minutes sounds like a lot until you’re deploying 5-10 times per day during active development. Each Astro build takes 1-3 minutes on Netlify.
Pricing: Free tier competes with Vercel. Pro is $19/mo per member. Same usage-based gotchas apply.
When to use: Content sites where you want deploy previews and built-in form handling. SSR is possible but cold starts make it impractical for production pages.
3. Cloudflare Pages – Best Free Static Hosting
For pure static Astro sites, Cloudflare Pages is the best free option. Unlimited bandwidth. Global CDN. No cold starts for static content.
Static deployment
npm run build
npx wrangler pages deploy dist/
Or connect your repo for automatic deploys. Either way, your static site loads fast everywhere with zero bandwidth charges.
SSR deployment
This is where Cloudflare gets difficult. The @astrojs/cloudflare adapter compiles your server code to run on Workers – a V8 isolate, not Node.js.
What breaks:
- No
fsmodule (can’t read files from disk) - No
node:path, nochild_process - Limited
node:cryptosupport - 128MB memory limit on free plan
- Many npm packages that use Node.js APIs fail without polyfills
If your SSR code or any dependency uses Node.js APIs, expect hours of debugging or rewriting. Database access requires Cloudflare D1 or external services through their binding system.
Pricing: Free tier is unmatched for static (unlimited bandwidth). Workers paid plan is $5/mo.
When to use: Static Astro sites where you want $0/mo hosting. Skip for SSR unless you’re experienced with the Workers runtime.
4. VPS + nginx – Full Control, Full Responsibility
Rent a server, install Node.js, configure nginx as a reverse proxy. The traditional approach that works for both static and SSR without any platform restrictions.
Static deployment
# On your local machine
npm run build
scp -r dist/* user@your-server:/var/www/astro-site/
# On the server (one-time nginx config)
cat > /etc/nginx/sites-available/astro << 'EOF'
server {
listen 80;
server_name yourdomain.com;
root /var/www/astro-site;
index index.html;
location / {
try_files $uri $uri/ $uri.html =404;
}
}
EOF
ln -s /etc/nginx/sites-available/astro /etc/nginx/sites-enabled/
certbot --nginx -d yourdomain.com
nginx -s reload
SSR deployment
Use the @astrojs/node adapter – the standard, portable adapter:
npx astro add node
npm run build
Then on your server:
# Upload built files
scp -r dist/* user@your-server:/opt/astro-app/
# Install dependencies and start
cd /opt/astro-app && npm install --production
# Use PM2 to keep it running
pm2 start dist/server/entry.mjs --name astro-app
Configure nginx to reverse-proxy to the Node.js process, set up SSL with certbot, and you’re live.
No cold starts. Your Astro app runs as a persistent Node.js process. No serverless limitations. Full filesystem access. WebSockets work. No adapter lock-in.
The cost: You manage everything. OS updates, nginx configuration, SSL renewal, process management, firewall rules, disk monitoring, and backups. Budget 1-2 hours/month for maintenance.
Pricing: Hetzner CX22 at $4.51/mo gives you 2 vCPU, 4GB RAM – more than enough for Astro SSR.
When to use: You’re comfortable with Linux and want complete control. Best when you’re already managing a VPS for other projects.
5. InstaPods CLI – One Command, No Server Management
InstaPods deploys Astro with a CLI command. You get a real Linux server (not serverless) with SSH access, but without the nginx/SSL/PM2 configuration.
Static deployment
# Install CLI (one time)
curl -fsSL https://instapods.com/install.sh | sh
# Build and deploy
npm run build
cd dist && instapods deploy my-site --preset static
Output: a live URL with HTTPS in about 2 seconds.
SSR deployment
npm run build
instapods deploy my-site --preset nodejs
Same result. Your Astro SSR app runs as a native Node.js process – the @astrojs/node adapter, same as a VPS. No serverless functions, no cold starts, no adapter lock-in.
What you get: SSH access, persistent filesystem, git push deploys, custom domains with auto SSL. Need SQLite for your Astro app? The filesystem is real. Need a cron job? Set one up over SSH.
Pricing: $3/mo flat. No bandwidth charges, no usage-based billing. The same price whether you get 100 or 100,000 pageviews.
When to use: You want SSR without serverless limitations and without managing a VPS. Also works for static sites where you want SSH access and more control than Cloudflare Pages offers.
The SSR Deployment Gap
Most Astro tutorials stop at “connect your repo to Vercel.” That works for static. For SSR, there’s a gap that most guides skip:
Serverless platforms (Vercel, Netlify, Cloudflare) convert your server routes into functions. Cold starts, timeout limits, no persistent connections, no filesystem writes. For SSR pages that need to be fast on first load, this is a problem.
VPS hosting gives you a real server without limitations, but you’re configuring nginx, SSL, PM2, and firewall rules. For a framework that’s supposed to make web development simpler, that’s a lot of infrastructure work.
CLI-based platforms (InstaPods) fill this gap – real Node.js runtime without the server management. Your Astro SSR app runs the same way it does on localhost, with HTTPS and a public URL.
For a deeper comparison of all seven Astro hosting platforms – including Railway, Render, and DigitalOcean App Platform – see this complete Astro hosting comparison with real pricing and tradeoffs.
Which Method Should You Pick?
Static blog or docs site? Cloudflare Pages for $0/mo. Vercel if you want preview deploys. InstaPods ($3/mo) if you want SSH access.
SSR with API routes? InstaPods ($3/mo) or VPS ($4-5/mo). Both give you native Node.js without serverless restrictions. InstaPods saves you the nginx/SSL/PM2 setup. VPS gives you full control.
Moving fast on a side project? InstaPods CLI deploys in 2 seconds. No dashboard to configure, no build pipeline to set up.
Already on Vercel or Netlify? Stay there for static. If you’re adding SSR and hitting cold starts or adapter issues, that’s when platforms with real Node.js runtimes start making sense.
The right choice depends on whether you need serverless or a real server. For static Astro, serverless platforms work well. For SSR, a real server saves you from workarounds.
