Keystatic is a free, Git-based CMS that gives an Astro site an admin screen without a database: your content is saved as Markdown, Markdoc, MDX, YAML or JSON files inside the project's own repository. It is one of the cheapest ways to let a small team edit an Astro website, because there is no CMS server to host and, in GitHub mode, no CMS subscription. It stops working well when you have many editors, a lot of content, complex relationships between content, or editors who should not need a GitHub account.
This article is for small business owners, founders and agencies who want a low-cost Astro website that non-developers can still update. It covers how Keystatic stores content, its three storage modes, what your hosting needs, and an honest list of where it fits and where it does not. For the wider comparison, see our guide to the best headless CMS for Astro.
What Keystatic is
Keystatic describes itself on its homepage (opens in a new tab) as content management for your codebase: a tool that makes Markdown, JSON and YAML content in your project editable by people who do not write code. It lists "no database" as a feature and is a Thinkmill project.
The idea is simple. A developer defines the content types in a keystatic.config.ts file: a blog post has a title, a date, a cover image and a body; the home page has a headline, three service cards and a call to action. Keystatic then generates a clean admin screen with a field for each one. When an editor saves, Keystatic writes plain files into the project folder, and Astro builds the site from those files.
How content is stored
Keystatic's format options (opens in a new tab) store data in YAML by default or JSON if you prefer, with long-form content in Markdoc (.mdoc) or MDX (.mdx) files. A blog post might look like this in the repository:
src/content/posts/astro-launch/index.yaml
src/content/posts/astro-launch/content.mdoc
public/images/posts/astro-launch/cover.jpgBecause the content is just files, it lives in Git with the rest of the code. Every change has a history, any version can be restored, and a backup of the repository is a backup of the whole site. Your Astro pages read the files at build time, either through Keystatic's Reader API (opens in a new tab) or, because they are plain files, through Astro's own content collections.
Markdoc or MDX
Both formats let editors write rich text with headings, lists and links, plus custom blocks your developer defines, such as a call-out box or a pricing table. Keystatic's Astro install adds the Markdoc integration, and Markdoc only allows the tags the developer defines, which keeps editors from breaking the layout. MDX is closer to code and familiar to React developers, which makes it more flexible but easier to misuse. For a business site edited by non-developers, we lean towards Markdoc.
The three storage modes
Keystatic's configuration docs (opens in a new tab) list three storage kinds. Which one you choose decides who can edit, from where, and what it costs.
| Mode | Where edits are saved | Who can edit | Running cost |
|---|---|---|---|
| Local | Files on the computer running the site | Whoever runs the project locally, usually a developer | None |
| GitHub | Files in your GitHub repository | Anyone with a GitHub account and write access to the repo | None beyond GitHub and hosting |
| Keystatic Cloud | Your GitHub repository, with sign-in and image hosting run by Keystatic | Team members, with no GitHub account needed | Free for up to 3 users per team, then a paid Pro plan |
Local mode
Local mode stores content directly on your file system. It is ideal while a developer builds the site, but it is not a way for a client to edit the live site. The Astro docs' Keystatic guide (opens in a new tab) suggests connecting Keystatic to GitHub so you can manage content on the deployed site.
GitHub mode
In GitHub mode (opens in a new tab), the admin screen on your live site signs editors in with GitHub and saves their changes to the repository. The first visit to /keystatic walks you through creating a GitHub App and storing its keys as environment variables. Keystatic's docs say collaborators need write access to the repository, so each editor needs their own GitHub account.
You can set up your host to rebuild the site automatically when the repository changes, so an editor's save goes live once the build finishes. Our guide to CI/CD with GitHub for website deployment explains how that automatic rebuild works.
Keystatic Cloud
Keystatic Cloud (opens in a new tab) handles authentication for you, so there is no custom GitHub App or environment variables to manage, and team members can edit content without a GitHub account. Keystatic's docs say creating an account is free and the free plan allows up to three users per team, with a paid Pro plan for larger teams. Pro also adds Cloud Images, an opt-in service that stores and optimises your images outside the repository. Check Keystatic's own site for current Pro pricing before you budget.
The admin needs a server route
Keystatic's admin is not static. Keystatic's Astro installation guide (opens in a new tab) says you need to add an Astro adapter to deploy, because Keystatic runs server-side code and Node.js APIs, and the GitHub mode docs ask for a host that can run Node.js for Keystatic's API routes.
This does not mean the whole site becomes server-rendered. Astro prerenders pages as static HTML by default, and the Astro on-demand rendering docs (opens in a new tab) explain that with an adapter you can render only selected routes on request. So the public pages stay fast static files, and only the /keystatic admin and its API routes run on the server.
- Editor saves in /keystatic
- Change is committed to GitHub
- Host rebuilds the Astro site
- Static pages go live
Cloudflare, Vercel, Netlify and Node.js servers all have official Astro adapters, so on those hosts this is not a blocker. It does rule out the cheapest "upload a folder of HTML" hosting if you want editing on the live site. If you would like the adapter, GitHub App and rebuild hook set up for you, our Astro development team can do it as part of the build.
Who Keystatic suits
Keystatic is a good fit when the site is small, the editors are few, and keeping running costs near zero matters.
- Small business websites with a handful of pages, services and a blog, updated a few times a month.
- Blogs and content sites written by one to a few people, where Markdown-style editing is natural.
- Documentation sites where developers and writers already work in Git.
- Agency builds where the client wants to change text and images, not build new page layouts.
There is also a real ownership benefit. The content sits in your repository, in open formats, next to the code. If you ever change CMS, there is no export step and no proprietary query language to unpick, which is a contrast with hosted options such as Astro with Sanity.
Where Keystatic stops working
Keystatic's simplicity is also its limit. These are the situations where we would suggest something else.
| Situation | Why Keystatic struggles | Better fit |
|---|---|---|
| Many editors | GitHub mode needs a GitHub account and repo access for each person; Cloud is free only for small teams | Directus, Strapi or Sanity |
| Non-technical editors | Signing in with GitHub can feel unfamiliar to marketing teams | Keystatic Cloud, Directus or WordPress |
| Large content sets | Every entry is a file in Git, and every change triggers a site rebuild | A database-backed CMS |
| Complex relationships | The relationship field stores only a slug, and it breaks if that slug changes | Directus or Strapi |
| Fine-grained roles and workflows | Access follows repository permissions rather than detailed editor roles | Directus, Strapi or Sanity |
| Content used by apps and other channels | Content lives in one site's repository, not behind a shared API | A headless CMS with an API |
The relationship point is worth explaining. Keystatic's relationship field (opens in a new tab) references another entry by its slug, and the docs warn that if that entry's slug changes the stored value is not updated, so the link breaks. That is manageable for "related posts" on a blog, and fragile for a product catalogue with many linked records.
If your needs sit in that table, our posts on Astro with Directus and the Astro vs WordPress decision cover the more capable alternatives.
What Keystatic costs
Keystatic itself is free to use, and in local or GitHub mode there is no CMS bill at all. Your costs are the Astro build, hosting that can run the admin route, and a GitHub account.
The main cost is the developer's time to define the content types and fields. That can be less than setting up and maintaining a self-hosted CMS server, which is why Keystatic can be the cheapest way to get an editable Astro site. Our guide to Astro website development cost puts those numbers in context.
Where to start
List who will edit the site, how many of them there are, and whether they are comfortable with a GitHub account. If it is one to three people updating pages and posts, Keystatic in GitHub mode or Keystatic Cloud is likely all you need. If it is a larger team, a big catalogue, or content shared with an app, start with a database-backed CMS instead.
Our headless CMS development team can help you choose, and our Astro website development service builds the site and the Keystatic admin with fields that match your real content.
Frequently asked questions
Is Keystatic free?
Yes. Keystatic is free to use in local and GitHub mode, with no subscription. Keystatic Cloud is free for up to three users per team, and a paid Pro plan covers larger teams. You still pay for hosting and any developer time.
Do editors need a GitHub account to use Keystatic?
In GitHub mode, yes: each editor signs in with GitHub and needs write access to the repository. With Keystatic Cloud, team members can edit without a GitHub account. In local mode, editing only happens on the computer running the project.
Can Keystatic work on a fully static Astro site?
The public pages can stay fully static, but the /keystatic admin needs server-side routes. That means adding an Astro adapter and using a host that can run Node.js for those routes.
Is Keystatic good for a large website?
It is not the best fit. Every entry is a file in Git and every change triggers a rebuild, and relationships between entries are simple slug references. For large catalogues, many editors or detailed roles, a database-backed CMS such as Directus or Strapi fits better.
Sources
The facts in this article were checked against these pages, last reviewed 26 November 2026.
- Keystatic: Content Management for your Codebase, Keystatickeystatic.com/
- Installing Keystatic in Astro, Keystatic Docskeystatic.com/docs/installation-astro
- Configuration, Keystatic Docskeystatic.com/docs/configuration
- GitHub mode, Keystatic Docskeystatic.com/docs/github-mode
- Keystatic Cloud, Keystatic Docskeystatic.com/docs/cloud
- Relationship field, Keystatic Docskeystatic.com/docs/fields/relationship
- Keystatic and Astro, Astro Docsdocs.astro.build/en/guides/cms/keystatic/
- On-demand rendering, Astro Docsdocs.astro.build/en/guides/on-demand-rendering/




