Self-hosted alternatives to Sanity

Squidex is a free, open-source Sanity alternative for structured content: content types, publishing workflows, translations and assets in one editor, delivered over REST and GraphQL. Sanity stores your content in its hosted Content Lake and sells plans for it; Squidex keeps it in your own database, though its editor is fixed rather than a studio you customise in code.

3 alternatives Free apps Our pick: Squidex

At a glance

App Good for Code Ease of use
Squidex Content teams and agencies feeding several websites and apps from one place Code Open source Some setup
Cockpit Small teams and agencies that want a light content back end for a website or app Code Open source Some setup
Enonic XP Teams with a developer or agency running several websites or languages from one place, with a visual page editor Code Partly open source Some setup

Why look for an alternative to Sanity?

Sanity is a hosted content platform: content lives in its Content Lake, and teams edit it in Sanity Studio, an open-source React editor that developers customise in code. Websites and apps read the content through its query language, GROQ, or GraphQL, and the hosted service is sold by plan.

Teams look for a Sanity alternative when they want their content in a database they run rather than a hosted service, or a ready-made editor that needs no code to set up. Squidex gives editors a finished web app for structured content, with REST and GraphQL APIs, on your own server. Cockpit does the same on a much smaller server, and Enonic XP keeps Sanity's content-as-code approach and adds a visual page editor.

The alternatives, compared

Squidex

Our pick

A self-hosted headless CMS that feeds your websites and apps.

Gives your team structured content with content types, references, components, assets, translations, workflows and version history, delivered over REST and GraphQL with real-time GraphQL subscriptions. Sanity's studio is a React app you customise in code and supports editing the same document together in real time; Squidex's editor is a fixed web app that you extend with custom editors and sidebars, and it stores content in your own database.

Some setup Open source

A lightweight headless CMS with no separate database to run.

A light content back end with content models built in forms rather than code: lists, single pages and nested trees, translations, an asset manager, revisions and REST and GraphQL APIs, in one PHP app that keeps content in SQLite files on your server. It has no workflow or scheduled publishing in its free Core, webhooks are a paid Pro add-on, and its editor is fixed rather than customised in code like Sanity Studio.

Some setup Open source

A self-hosted headless CMS with a drag-and-drop page editor.

Like Sanity, its content types are defined in code by a developer, but content lives on your own server, organised in a tree, with workflow, scheduled publishing, version history, a drag-and-drop page editor and a GraphQL API. Its Content Studio editor is source-available with some paid features, it needs at least 4 GB of memory, and it has no real-time co-editing like Sanity's.

Some setup Partly open source

Moving from Sanity

None of these apps imports from Sanity. Rebuild your Sanity schemas as content types in the app you choose: in the browser for Squidex and Cockpit, or in code for Enonic XP. A developer then exports your documents from Sanity, converts them and brings them in through the new app's API, or the Squidex command-line tool's CSV import, and uploads your images. Rich text written in Sanity's Portable Text needs converting to the new app's rich text or Markdown fields. Change your website's queries to the new GraphQL or REST API, then switch over. In Cockpit, create the admin account on the install page right after setup; in Enonic XP, sign in as su with the password Cloudgate shows.

Questions

What is the best self-hosted alternative to Sanity?

Start with Squidex. All 3 are free to self-host. Squidex and Cockpit are open source; Enonic XP (partly open source) keeps part of its code under a licence with conditions an open-source licence does not have.

Can I customise the editor like Sanity Studio?

Partly. Squidex lets you add custom field editors and sidebars, and Enonic XP's content types and page components are written in code, but none of these editors is a framework you build in React like Sanity Studio. Cockpit's admin is fixed, with models built in forms.

Can several editors work on the same entry at once?

Not in the way Sanity does. We found no real-time co-editing of a single entry in Squidex, Cockpit or Enonic XP, so plan for one person editing an entry at a time.

Where do these apps store my content?

In a database on your own server. The Squidex template uses MongoDB, and Squidex also supports PostgreSQL, MySQL and SQL Server. Cockpit keeps content in SQLite files, and Enonic XP in its own built-in content store.

Which one should I choose?

Start with Squidex for a ready-made editor with workflows, open source with every feature included. Choose Cockpit for a small project on a small server, and Enonic XP if your developers want to define content in code, as in Sanity, and editors want a visual page editor.

Are these Sanity alternatives really free?

Squidex is free and open source with every feature included. Cockpit's Core is free under the MIT licence, and its maker sells paid Pro add-ons such as webhooks and visual layouts. Enonic XP is free to run, but its Content Studio editor is source-available and a few features, such as AI translation and content variants, need a paid licence. To run any of them you need Cloudgate and a server: use hosted Cloudgate, which can also provide the server, or install Cloudgate on a server of your own for free. Cloudgate's plans and prices are at cloudgate.octabyte.io/pricing.

Do I need a developer to replace Sanity?

Yes, for the website or app. Cloudgate installs the app on your server and editors can sign in straight away, but a developer builds the website or app that reads content from its API, and in Enonic XP also the content types and page components. That is the same work a hosted headless CMS needs.