Jamstack originally stood for JavaScript, APIs and Markup: build pages ahead of time as static HTML, serve them from a CDN, and add dynamic features through JavaScript and APIs. The term has blurred as frameworks added server rendering, but the core idea, pre-render what you can and serve it cheaply, is more popular than ever. Here’s what it means in practice, and how it fits with VPS hosting.

The core ideas

  1. Pre-rendering: pages are generated at build time (or cached after first render), not on every request.
  2. Static delivery: HTML, CSS and JS are served by a web server or CDN, with no database query per visit.
  3. APIs for dynamic parts: search, forms, comments, payments and logins are handled by APIs (your own, or third-party services).
  4. Git-based workflow: a push triggers a build and deploy.

Benefits

  • Speed: static files are fast, and easy to cache at the edge. See CDN for websites.
  • Security: no PHP or database on the request path for most pages, so there’s less to attack.
  • Scalability and cost: a small server (or CDN) handles huge traffic for static pages.
  • Developer experience: modern frameworks, previews, version control.

Trade-offs

  • Build times grow with the number of pages (incremental builds help).
  • Dynamic, personalised content needs APIs or server rendering.
  • Content editors need a CMS that triggers rebuilds. See headless CMS options.
  • Many small third-party services (forms, search, comments) can add cost and vendor lock-in.

Comparison: static vs dynamic websites.

Tools

Type Examples
Static site generators Astro, Hugo, Eleventy, Jekyll. See static site generators compared
Hybrid frameworks (static + server) Next.js, Nuxt, SvelteKit, Astro (server islands/SSR)
Headless CMS Strapi, Directus, Ghost, WordPress (headless), Decap/Git-based CMS
Search Pagefind (static), Meilisearch. See Meilisearch
Forms/comments Your own small API, or self-hosted tools

Hosting a Jamstack site on your own VPS

You don’t need a special platform. A VPS with Nginx serves static sites extremely well:

server {
    server_name www.example.com;
    root /var/www/example.com/dist;
    location / { try_files $uri $uri/ $uri.html =404; }
    location ~* \.(css|js|woff2|png|jpg|webp|avif|svg)$ { expires 1y; add_header Cache-Control "public, immutable"; }
}

Build in CI, and upload the output with rsync:

npm ci && npm run build
rsync -az --delete dist/ deploy@your-vps:/var/www/example.com/dist/

See deploy a static Astro site, Hugo static site, and GitHub Actions deploy to VPS.

Why a VPS instead of a static hosting platform? Full control, predictable cost, no build-minute limits, the same server for your APIs and CMS, and data location choice. Add a CDN in front for global audiences.

Rebuilds when content changes

  • Webhook from the CMS → CI job → build → rsync. Most headless CMSs can call a webhook on publish.
  • Scheduled rebuilds (cron) for time-based content.
  • Incremental/on-demand rendering (Next.js ISR, Astro server mode) when full rebuilds get slow.

Hybrid is the norm now

Modern sites mix approaches per page: static marketing pages, server-rendered dashboards, API routes for forms. Frameworks like Astro, Next.js and Nuxt run as a Node.js server on a VPS when you need that. See deploy Next.js on a VPS and deploy Nuxt.

Quick reference

Question Answer
Core idea Pre-render, serve static, use APIs for dynamic parts
Best for Content sites, docs, marketing, blogs
Hosting Nginx on a VPS (+ CDN), or static hosts
Content updates CMS webhook → CI build → deploy
Dynamic needs APIs, or hybrid SSR frameworks

Related: headless WordPress and website speed optimization.

  • Web Development
  • Static Sites
  • Architecture