Skip to content
CMS and web technologies

Astro and Strapi: A Practical Guide for Business Websites

Strapi is a well-known open-source headless CMS that pairs well with Astro. How the setup works, what it costs now the Cloud free plan is gone, and how it compares with Directus.

Harsh PrajapatiFull stack developer
Published
Reading time
10 min

Astro and Strapi: A Practical Guide for Business Websites

Astro and Strapi work well together for a business website: Strapi gives your editors a familiar admin panel and content API, and Astro builds fast pages from that content. The Strapi Community Edition is free and MIT licensed to self-host, while Strapi Cloud no longer has a free plan; its cheapest plan, Starter, is USD 35 a month per project, or USD 29 a month billed annually. The real decision is whether you host Strapi yourself and who keeps it updated.

This guide is for business owners, marketing teams and agencies considering an Astro website with Strapi as the CMS. It covers content types, REST vs GraphQL, the Strapi client, drafts, languages, hosting and licences, major-version upgrades, and how Strapi compares with Directus.

What Strapi is and why it suits Astro

Strapi is a headless CMS written in JavaScript that runs on Node.js. Your developer defines the content model, Strapi generates an admin panel for editors, and the content is available through an API. Astro has no admin screen of its own, so a CMS like Strapi fills that gap.

Strapi stores content in a SQL database. Its database documentation (opens in a new tab) lists PostgreSQL, MySQL, MariaDB and SQLite.

The pairing suits marketing sites, blogs, catalogues and documentation where content is structured and edited by a small team. Our guide to the best headless CMS for Astro puts Strapi next to the other options we use.

Content types: how your content is modelled

Strapi models content with the Content-Type Builder, a screen where the developer defines what each piece of content contains. There are four building blocks:

  • Collection types: repeated items such as blog posts, services, team members or case studies.
  • Single types: one-off content such as the home page, site settings or the footer.
  • Components: reusable groups of fields, such as an SEO block with a title, description and share image.
  • Dynamic zones: a list where editors add and reorder components, which is how Strapi offers flexible page layouts.

A sensible pattern is to give every page an SEO component and keep page sections as a small set of components that match the Astro design, so editors fill in fields rather than fight a blank text box.

REST vs GraphQL

Strapi gives you a REST API out of the box, and GraphQL as an optional plugin. The Strapi GraphQL plugin docs (opens in a new tab) describe installing @strapi/plugin-graphql, which adds a /graphql endpoint with a sandbox for testing queries; the sandbox is switched off in production by default.

RESTGraphQL
SetupBuilt inInstall the plugin
How you ask for dataURL with query parametersOne query describing the exact fields
Best forSimple pages and listingsComplex pages pulling many related items
CachingEasy, plain URLsNeeds more thought

For a straightforward Astro business site, REST is enough. On a static build Astro fetches content at build time, so the choice of API does not change the speed visitors see. GraphQL is worth adding when a team already uses it elsewhere, or when one page pulls many related types at once.

The Strapi client in Astro

The official @strapi/client package wraps the REST API so your Astro code stays short. The Strapi client docs (opens in a new tab) show the pattern:

TypeScript
// src/lib/strapi.ts
import { strapi } from '@strapi/client';

const client = strapi({
  baseURL: import.meta.env.STRAPI_URL + '/api',
  auth: import.meta.env.STRAPI_TOKEN,
});

export async function getArticles(locale = 'en') {
  return client.collection('articles').find({ locale, sort: 'title' });
}

You can also skip the package and use plain fetch, which is what the Astro docs guide to Strapi (opens in a new tab) does. That guide also shows the other half of the setup: a webhook from Strapi tells your host to rebuild the Astro site whenever content is published, so a static site stays current.

Keep the API token read-only and on the server. With a static build, it is only used during the build and never reaches visitors' browsers.

Getting the webhook, tokens, preview and image sizes working together is the fiddly part of the setup. If you would rather not wire it up yourselves, our Astro website development team can build the Strapi connection and hand it over documented.

Draft and publish

Draft and publish lets editors save work without it appearing on the site. According to the Strapi draft and publish docs (opens in a new tab), it is a free feature that you enable per content type, and each entry then has a draft version and a published version. Entries show as Draft, Modified (changes waiting) or Published.

The Strapi REST status docs (opens in a new tab) confirm that the API returns published content by default, so your live Astro site never shows drafts by accident. A preview route can ask for status=draft with a token to show unpublished changes.

Two related features are paid. Scheduling is done through Releases, and Strapi's built-in Live Preview is also a paid feature; the Strapi self-hosted pricing page (opens in a new tab) lists both under Growth, at USD 45 a month with three users included and USD 15 a month for each extra user. On the free Community Edition, a developer can still build a simple preview route in Astro.

Languages with internationalisation

Internationalisation (i18n) is free in Strapi 5 but off by default. The Strapi internationalisation docs (opens in a new tab) explain that you enable it per content type, then choose which fields are translated. Fields you leave untranslated, such as a product code or a date, are shared across all languages.

Astro then asks for content by locale (the client snippet above passes locale) and builds a route per language.

Self-hosting vs Strapi Cloud after the free plan

Strapi removed its Cloud free plan in 2026. The Strapi announcement (opens in a new tab), dated 21 July 2026, says the free plan closed to new signups on 1 July 2026 and existing free projects were deleted on 1 September 2026 unless upgraded or exported. It names Starter as the cheapest paid plan, at USD 29 a month billed annually.

OptionPrice (USD, November 2026)Who runs the server
Self-hosted Community EditionFree software, you pay for hostingYou or your developer
Self-hosted Growth45 a month, 3 users, then 15 per extra userYou or your developer
Strapi Cloud Starter35 a month per project, or 29 billed annuallyStrapi
Strapi Cloud Pro90 a month per projectStrapi
Strapi Cloud Business450 a month per projectStrapi

The Cloud prices are from the Strapi Cloud pricing page (opens in a new tab), which offers up to 17 percent off for yearly billing. Check both pages on the day you budget, because plans and prices can change.

Self-hosting on a small VPS can be the cheapest route for a business site, because Strapi only serves the API and the Astro site carries the public traffic. The trade is upkeep: security updates, Node.js versions, database backups and monitoring. Our Linux VPS security checklist lists the basics, and our VPS and cloud server management service handles them for you if you prefer.

Community Edition vs enterprise code

Strapi's licence has two parts, and it is worth reading before you rely on a feature. The Strapi licence file (opens in a new tab) says code outside the ee/ folders is under the MIT Expat licence, while code inside any ee/ folder is under the Strapi Enterprise licence and needs a paid plan or another agreement.

The free Community Edition covers the core of a business site: content types, the admin panel, REST, GraphQL, draft and publish, i18n and media. On the self-hosted pricing page, single sign-on is a paid add-on on Growth, and review workflows and audit logs are Enterprise features. If a project depends on one of those, budget for it from day one rather than discovering it at launch.

Upgrades between major versions

Minor Strapi updates are routine, but major versions need a planned project. Strapi stopped bug fixes for Strapi 4 at the end of October 2025 and security fixes at the end of April 2026, according to its Strapi 4 support notice (opens in a new tab). Any site still on Strapi 4 is running unsupported software.

The Strapi upgrade tool (opens in a new tab) helps: npx @strapi/upgrade major updates packages and runs codemods that rewrite code for breaking changes. It has limits. Your app must already be on the latest release of its current major, the tool does not move files, and it does not migrate data, which Strapi's own database migrations handle. Strapi tells you to back up the codebase and database first.

  1. Back up code and database
  2. Update to latest minor
  3. Run upgrade tool on staging
  4. Fix Astro queries and test
  5. Release

On the Astro side, a major Strapi upgrade can change the shape of API responses, so every page that reads Strapi needs testing before the live switch. If you are moving away from an older CMS entirely, our WordPress to Astro migration guide covers the URL and SEO side.

Strapi vs Directus for an Astro site

Both are self-hostable headless CMS platforms on SQL databases, and both work well with Astro. The differences are in licence, data model and what is free.

StrapiDirectus
LicenceMIT Community Edition, enterprise code separateSource-available MSCL; full platform free under USD 5M revenue and under 50 employees
Data modelStrapi manages its own schemaSits on a supported SQL database, including existing ones
Built-in live previewPaid (Growth and up)Included
Paid extrasReleases and Live Preview (Growth), review workflows and audit logs (Enterprise)Seats, collections and flows set by plan
Cheapest hosted optionCloud Starter, USD 35 a month or USD 29 billed annuallyCore plan listed at USD 89 a month billed yearly
Best fitNode.js teams, agencies already using StrapiTeams that want to own and reuse their data

Directus figures are from the plan cards on the Directus pricing page (opens in a new tab); ask Directus for a written quote, as the FAQ on that page showed different figures for some plans. We go deeper in our Astro and Directus guide, and our Astro and Sanity guide covers the hosted alternative. For the wider headless picture beyond Astro, see our headless CMS comparison.

A simple next step

List your content types, the languages you need, who edits and who publishes, and whether you can host a Node.js server. If the answers point to self-hosted Strapi, budget for a small VPS and regular upkeep; if they point to Cloud, start from Starter and check the limits. Our Astro website cost guide helps with the full budget.

We plan the content model, build the Astro front end and set up Strapi hosting, backups and upgrades as one job. Tell us about your project on our Astro website development page, or see our wider headless CMS development service.

Frequently asked questions

Is Strapi free to use with Astro?

Yes, if you self-host. The Strapi Community Edition is MIT licensed and free, and Astro is MIT licensed too, so you pay only for hosting and development. Strapi Cloud has no free plan any more, and paid features such as Releases and Live Preview need a Growth or higher plan.

Should we use REST or GraphQL with Strapi and Astro?

REST is a sensible default for a business site. It is built in, easy to cache and simple to read in Astro. GraphQL is worth installing when your team already uses it or a page needs many related content types in one request.

What happened to the Strapi Cloud free plan?

Strapi closed the free plan to new signups on 1 July 2026 and deleted remaining free projects on 1 September 2026, unless their owners upgraded or exported their data. The cheapest Cloud plan is now Starter, at USD 35 a month per project or USD 29 billed annually.

Is Strapi or Directus better for an Astro website?

Both work well, so the choice depends on your team. Strapi suits Node.js teams and agencies who already know it, with a fully MIT Community Edition. Directus suits businesses that want their content in a plain SQL database they own, with live preview included.

How hard is it to upgrade Strapi to a new major version?

It is a planned project rather than a click. Strapi's upgrade tool updates packages and rewrites code for breaking changes, but it does not move files or migrate data, so you back up first, upgrade on a staging copy and test every Astro page that reads Strapi.

Sources

The facts in this article were checked against these pages, last reviewed 26 November 2026.

  1. We are removing the free plan from Strapi Cloud, Strapistrapi.io/blog/we-re-removing-the-free-plan-from-strapi-cloud
  2. Strapi Cloud pricing, Strapistrapi.io/pricing-cloud
  3. Strapi self-hosted pricing, Strapistrapi.io/pricing-self-hosted
  4. Database configuration, Strapi docsdocs.strapi.io/cms/configurations/database
  5. Internationalisation, Strapi docsdocs.strapi.io/cms/features/internationalization
  6. Strapi 4 support notice, Strapifeedback.strapi.io/changelog/notice-strapi-v4-bug-support-coverage-is-ending-in-october
  7. Strapi licence, GitHubgithub.com/strapi/strapi/blob/develop/LICENSE
  8. Strapi client, Strapi docsdocs.strapi.io/cms/api/client
  9. Draft and publish, Strapi docsdocs.strapi.io/cms/features/draft-and-publish
  10. Upgrade tool, Strapi docsdocs.strapi.io/cms/upgrade-tool
  11. Strapi and Astro, Astro docsdocs.astro.build/en/guides/cms/strapi/
Harsh Prajapati, the author

Written by

Harsh Prajapati

Freelance full stack developer, founder of Worklancio

Web developer since 2018, freelancing since 2022. Builds WordPress sites and plugins, web apps and CRMs from Ahmedabad.

You may also like