[{"data":1,"prerenderedAt":110},["ShallowReactive",2],{"seo-verification":3,"marketplace-app-en-astro-stack":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"slug":7,"slugs":8,"categorySlugs":9,"name":13,"description":14,"phase":15,"unavailableReason":16,"docsUrl":17,"logo":16,"github":16,"tagline":18,"longDescription":19,"features":20,"useCases":27,"steps":37,"faq":53,"specs":69,"compatibleOs":77,"relatedApps":78,"relatedPosts":103,"category":107},"astro-stack",{"fr":7,"en":7,"ar":7},{"fr":10,"en":11,"ar":12},"developpement","development","التطوير","Astro Stack","Node.js LTS, PM2 and Nginx preconfigured for Astro. Deploy your SSR or static Astro sites on your own infrastructure.",1,null,"https:\u002F\u002Fservorbit.com\u002Fblog\u002Fdeploying-an-astro-application-on-a-vps","Astro Stack — Node.js LTS, PM2 and Nginx preconfigured for static or SSR Astro deployments.","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.\n\nAstro 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\u002Fnode`. 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.",[21,22,23,24,25,26],"Node.js LTS from the official NodeSource repository — the current LTS release, not the outdated distro package.","PM2 process manager — zero-downtime reloads, log rotation, startup scripts, and cluster mode for multi-core VPS.","Nginx reverse proxy with gzip compression and long-lived Cache-Control headers for versioned static assets.","Compatible with Astro static output (`output: 'static'`) and server-side rendering (`output: 'server'` with `@astrojs\u002Fnode`).","Minimal memory footprint — a static Astro site served by Nginx uses less than 50 MB. SSR via PM2 adds ~50 MB per worker.","Hybrid rendering support — mark pages with `export const prerender = true` to pre-render them at build time while keeping other routes dynamic.",[28,31,34],{"title":29,"body":30},"Static content site","Build your Astro project with `output: 'static'`, upload the `dist\u002F` folder, and serve it from Nginx. No Node process required at runtime — the server idles at near-zero CPU between requests.",{"title":32,"body":33},"SSR web application","Use the `@astrojs\u002Fnode` adapter in standalone mode to render Astro pages on demand. PM2 supervises the Node process with automatic restart and zero-downtime reloads between deployments.",{"title":35,"body":36},"Frontend for an API","Serve your Astro frontend alongside API routes on the same domain. Nginx routes `\u002Fapi\u002F*` requests to a separate backend while delivering optimized static assets for everything else.",[38,41,44,47,50],{"title":39,"body":40},"Create the VPS","Select the \"Astro Stack\" template. 1 GB RAM is sufficient for a static site; 2 GB if you need SSR with PM2.",{"title":42,"body":43},"Choose your output mode","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.",{"title":45,"body":46},"First access","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.",{"title":48,"body":49},"Build and transfer","Run `npm run build` locally or in CI. For static output, copy the `dist\u002F` folder to `\u002Fvar\u002Fwww\u002Fastro\u002Fdist` on the VPS. For SSR, copy `dist\u002F` and start the server with `pm2 start dist\u002Fserver\u002Fentry.mjs --name astro`.",{"title":51,"body":52},"Configure Nginx","For static: set `root \u002Fvar\u002Fwww\u002Fastro\u002Fdist;` and `try_files $uri $uri\u002F \u002F404.html;`. For SSR: `proxy_pass http:\u002F\u002Flocalhost:4321;` with appropriate headers. Obtain a Let's Encrypt certificate with Certbot.",[54,57,60,63,66],{"q":55,"a":56},"What is the difference between Astro Stack and Next.js Stack?","Astro Stack installs Node.js LTS, PM2, and Nginx — suited for Astro projects in static (SSG) or SSR mode. Next.js Stack adds PostgreSQL for full-stack applications. Astro is often lighter because its static mode requires no Node process at runtime.",{"q":58,"a":59},"Can I host a fully static Astro site?","Yes. Build your project with `output: 'static'`, transfer the `dist\u002F` folder to the VPS, and configure Nginx to serve these files. No Node process is required — only Nginx.",{"q":61,"a":62},"Does Node.js need to be installed on the VPS for a static Astro site?","Not at runtime. In static mode (`output: 'static'`), the build produces pure HTML\u002FCSS\u002FJS files served directly by Nginx. Node.js is only needed for building (which can be done in CI) and for SSR mode.",{"q":64,"a":65},"Can I host multiple Astro projects on the same VPS?","Yes. Nginx handles multiple vhosts, each pointing to its own `dist\u002F` folder or PM2 process on a different port. You share Node.js and Nginx between your projects, optimizing resource usage.",{"q":67,"a":68},"What minimum RAM do you recommend?","1 GB of RAM is sufficient for a fully static Astro site. For SSR mode with PM2 and Node.js, plan for at least 2 GB to handle rendering peaks comfortably.",{"ram":70,"cpu":71,"os":72,"stack":73},"1 Go (2 Go pour SSR)","1 vCPU","Ubuntu 24.04 LTS",[74,75,76],"Node.js LTS","PM2","Nginx",[],[79,86,92,97],{"name":80,"slug":81,"categorySlug":11,"categoryName":82,"categoryColor":83,"logo":16,"tagline":84,"description":85},"Next.js Stack","nextjs-stack","Development","text-warning bg-warning\u002F10","Next.js Stack — Node.js LTS, PM2, Nginx and PostgreSQL preconfigured. Deploy your React SSR app to production without Vercel.","Node.js, PM2, Nginx and PostgreSQL preconfigured for Next.js. Deploy your React SSR apps without Vercel or function quotas.",{"name":87,"slug":88,"categorySlug":11,"categoryName":82,"categoryColor":83,"logo":89,"tagline":90,"description":91},"Nuxt Stack","nuxt-stack","https:\u002F\u002Fcdn.simpleicons.org\u002Fnuxt","Nuxt 3 with SSR, PostgreSQL and a reverse proxy — a production environment for your Vue.js apps.","Nuxt 3 with SSR, PostgreSQL and a reverse proxy. A production environment for your Vue.js applications.",{"name":93,"slug":94,"categorySlug":11,"categoryName":82,"categoryColor":83,"logo":16,"tagline":95,"description":96},"Go (Gin) Stack","golang","Go 1.22+, Gin, Nginx and PostgreSQL 16 preconfigured — production-ready environment for lightweight Go APIs.","Go 1.22+, Gin, Nginx and PostgreSQL 16 preconfigured. Deploy your Go API to production in minutes.",{"name":98,"slug":99,"categorySlug":11,"categoryName":82,"categoryColor":83,"logo":100,"tagline":101,"description":102},"Node.js Stack","nodejs-stack","https:\u002F\u002Fcdn.simpleicons.org\u002Fnodedotjs","Node.js, PM2, Nginx and a database — a production environment for your JavaScript APIs and apps.","Node.js with PM2, an Nginx reverse proxy and a database. Your JavaScript APIs and applications ready to take traffic.",[104,105,106],"deployer-laravel-vps","deployer-nodejs-vps","deployer-django-vps",{"key":10,"slug":11,"name":82,"objective":108,"icon":109,"color":83},"Kick off a software project quickly.","dev",1787581038856]