Astro Stack provisions your VPS with the complete toolchain an Astro project needs in production: Node.js LTS from the official NodeSource repository, PM2 for zero-downtime process management, and Nginx as the TLS-terminating reverse proxy.
Astro is unique among JavaScript frameworks: it generates a fully static site by default (zero JavaScript shipped to the browser unless you explicitly opt in), but it can also render pages server-side on demand via `@astrojs/node`. Both modes work seamlessly on this stack — static output is served directly by Nginx with no Node process running, while SSR is managed by PM2 behind an Nginx proxy.
output: 'static') and server-side rendering (output: 'server' with @astrojs/node).export const prerender = true to pre-render them at build time while keeping other routes dynamic.Build your Astro project with output: 'static', upload the dist/ folder, and serve it from Nginx. No Node process required at runtime — the server idles at near-zero CPU between requests.
Use the @astrojs/node adapter in standalone mode to render Astro pages on demand. PM2 supervises the Node process with automatic restart and zero-downtime reloads between deployments.
Serve your Astro frontend alongside API routes on the same domain. Nginx routes /api/* requests to a separate backend while delivering optimized static assets for everything else.
Guide optimized for ServOrbit Cloud VPS.
Select the "Astro Stack" template. 1 GB RAM is sufficient for a static site; 2 GB if you need SSR with PM2.
In astro.config.mjs, set output: 'static' for a fully pre-rendered site, or output: 'server' with adapter: node({ mode: 'standalone' }) for SSR. This choice drives the rest of the deployment.
This template installs a toolchain (Node.js LTS, PM2, Nginx). There is no web interface to open — connect via SSH and deploy your own Astro project.
Run npm run build locally or in CI. For static output, copy the dist/ folder to /var/www/astro/dist on the VPS. For SSR, copy dist/ and start the server with pm2 start dist/server/entry.mjs --name astro.
For static: set root /var/www/astro/dist; and try_files $uri $uri/ /404.html;. For SSR: proxy_pass http://localhost:4321; with appropriate headers. Obtain a Let's Encrypt certificate with Certbot.
Maintaining a project that uses Astro Stack? This button lets your readers deploy it on a VPS in one click, without reading Docker documentation.
[](https://servorbit.com/vps-cloud?template=astro-stack&utm_source=deploy-badge&utm_medium=referral&utm_campaign=astro-stack)<a href="https://servorbit.com/vps-cloud?template=astro-stack&utm_source=deploy-badge&utm_medium=referral&utm_campaign=astro-stack"><img src="https://servorbit.com/brand/deploy/button.svg" alt="Deploy Astro Stack on ServOrbit" height="40"></a>The button points to a VPS order with the template preselected. The image is served from servorbit.com — nothing to host on your side.
Node.js, PM2, Nginx and PostgreSQL preconfigured for Next.js. Deploy your React SSR apps without Vercel or function quotas.
DevelopmentNuxt 3 with SSR, PostgreSQL and a reverse proxy. A production environment for your Vue.js applications.
DevelopmentGo 1.22+, Gin, Nginx and PostgreSQL 16 preconfigured. Deploy your Go API to production in minutes.
DevelopmentNode.js with PM2, an Nginx reverse proxy and a database. Your JavaScript APIs and applications ready to take traffic.
Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.