How Sanity Studio works
A Studio is usually configured in a sanity.config.ts file at the project root, which exports the result of the defineConfig function. Only projectId and dataset are required. Developers define the content models as JavaScript objects, and the Studio builds the forms and inputs for editors from those definitions.
Editors browse, create, and edit documents in the built-in Structure tool, the most common tool in a Studio. Several people can edit one document at the same time, because the Studio sends each change as a mutation that the server passes to the other editors. The Sanity vs Strapi comparison sets this co-editing next to how the Strapi admin panel handles editing.
One Studio can hold several workspaces, which give teams, datasets, or regions their own editing environment without separate Studios to maintain. In that setup, defineConfig takes an array of configurations, each with a unique name and basePath. Pagepro's guide on how to manage multiple websites from one Sanity instance weighs workspaces against a shared dataset and separate projects.
Where Sanity Studio runs: hosting, version and license
Sanity's Studio deployment documentation names two primary ways to host a Studio, and embedding is a third option.
Sanity hosting. The
sanity deploycommand builds the Studio and publishes it on a*.sanity.studioURL.Self-hosting. The Studio can go on any hosting platform that supports single-page application (SPA) routing. This route suits teams that need platform-specific features Sanity hosting lacks, or the Studio on their own domain. That domain must be added to the project's CORS origins with authenticated requests enabled.
Embedding. The Studio ships as a single npm dependency, so it can run as a route in an application that controls its own routing. For Next.js there is the official
next-sanitylibrary. Sanity still recommends deploying to Sanity directly, and warns that an embedded Studio might lose features tied to the CLI build tooling.
The built files of a Sanity-hosted Studio are served without authentication, although login and private data stay protected. Tokens and other secrets therefore do not belong in the Studio configuration.
The current major version is v6, installed with npm install sanity@latest, and local development and builds require Node.js 22.12 or later. Auto-updates are a configuration option for a Studio deployed with Sanity's build tools. They apply patch and minor releases, plus major releases with no runtime effect, such as a change to the required Node.js version. A major release that changes how Studio code behaves is left for the team to install. The code is released under the MIT License. For a Studio build with an agency, Pagepro's Sanity CMS development page lists the engagement models and the migration process.
Sources
- StudioSanity · sanity.io
- Hosting and deploymentSanity · sanity.io
- ConfigurationSanity · sanity.io
- From input components to real-time safe patchesSanity · sanity.io
- sanity-io/sanity (GitHub repository and README)Sanity · github.com
- Schemas and formsSanity · sanity.io
- Studio toolsSanity · sanity.io
- WorkspacesSanity · sanity.io
- Embedding Sanity StudioSanity · sanity.io
- Upgrading Sanity StudioSanity · sanity.io
- System requirementsSanity · sanity.io