# Hosting a headless CMS

> How to host a headless CMS and its front end: where the CMS runs, where the site builds and what each costs.

Source: https://comparehostingonline.com/hosting-for/headless-cms/

## Short answer

A headless setup has two parts: the CMS, which needs a server and a database or a hosted service, and the front end, which can be static or server rendered on a platform. Host them separately, then connect them by API and build hooks.

Last verified Nov 28, 2026 · [How we test](https://comparehostingonline.com/methodology/)

At a glance

-   **The two parts** CMS: Strapi, Directus and similar run on a VPS or cloud server with a database; others are hosted services.
-   **How they connect** Content is saved in the CMS.
-   **What to check** Build minutes and limits on the front-end platform.

## The two parts

-   CMS: Strapi, Directus and similar run on a VPS or cloud server with a database; others are hosted services.
-   Front end: a static build or server rendered app on a platform such as Netlify or Vercel.

## How they connect

How they connect

1.  1
    
    **Editors publish**
    
    Content is saved in the CMS.
    
2.  2
    
    **A webhook fires**
    
    The CMS tells the front end to rebuild.
    
3.  3
    
    **The site updates**
    
    The new build is served from a CDN.
    

## What to check

-   Build minutes and limits on the front-end platform.
-   Where media files are stored.
-   Backups for the CMS database.

## How do the CMS and the site connect?

1.  1
    
    **Editors publish**
    
    Content is saved in the CMS.
    
2.  2
    
    **A webhook fires**
    
    The CMS tells the front end to rebuild or revalidate.
    
3.  3
    
    **The site updates**
    
    The new version is served from a CDN.
    

## What should you check in hosting?

-   CMS: a server and database or a hosted service, with backups.
-   Front end: build minutes, preview support and CDN.
-   Where media files are stored and how they are served.
-   API rate limits and caching.
-   Costs of each part, which add up.

## Self-hosted or SaaS CMS?

A self-hosted CMS on a VPS gives control and flat cost but needs maintenance; see [hosting for Node.js](https://comparehostingonline.com/hosting-for/nodejs/) and [VPS hosting](https://comparehostingonline.com/hosting-types/vps/). A SaaS CMS removes server work for a subscription.

## Sources and further reading

-   [Next.js: deploying](https://nextjs.org/docs/app/getting-started/deploying)
-   [Astro: deploy your site](https://docs.astro.build/en/guides/deploy/)
-   [Node.js learning resources](https://nodejs.org/en/learn)

## Common questions

Do I need two hosts?

Often yes, one for the CMS and one for the front end, but both can share a server.

Is a hosted CMS easier?

Yes, but it adds a subscription and some lock-in.

How does the site update when content changes?

A webhook triggers a rebuild or revalidation.

Where should media be stored?

In object storage behind a CDN, not on the CMS server's disk.

How do I back up a headless CMS?

Back up its database and media, and test a restore.

## Related

[Hosting for Next.js](https://comparehostingonline.com/hosting-for/nextjs/) [Static site hosting](https://comparehostingonline.com/hosting-for/static-sites/) [Hosting for Node.js](https://comparehostingonline.com/hosting-for/nodejs/)

## More hosting by stack

[Best hosting for Astro sites](https://comparehostingonline.com/hosting-for/astro/) [Best hosting for PHP and Laravel](https://comparehostingonline.com/hosting-for/php-laravel/) [Docker hosting](https://comparehostingonline.com/hosting-for/docker/)

MH

**[Muhammad Hamza](https://comparehostingonline.com/team/muhammad-hamza/)** Founder & Editor

Writes and signs off every comparison, and runs the compliance reviews. Has worked on SOC 2 and HIPAA compliance programs for companies.

Our [editorial policy](https://comparehostingonline.com/editorial-policy/) and [testing method](https://comparehostingonline.com/methodology/) are public.
