How to Setup a Netlify Studio Locally
Good news - you can absolutely set this up to avoid burning through your Netlify build minutes! The key is understanding that Sanity starters with a monorepo structure (like the Gridsome blog) have separate studio and web folders, and you only need to deploy the built website to Netlify.
Deploy Studio Separately to Sanity's Hosting
First, deploy your Studio to Sanity's free managed hosting instead of Netlify. From your studio directory, run:
cd studio
sanity deployThis deploys your Studio to a free yourproject.sanity.studio URL and doesn't count against your Netlify build minutes at all. This is the recommended approach for hosting Studio.
Configure Netlify to Only Build and Deploy the Web Folder
For your Gridsome site on Netlify, you need to tell Netlify to only work with the web folder. Create a netlify.toml file in your project root:
[build] base = "web" publish = "web/dist" command = "npm run build"
Or configure these settings in the Netlify UI:
- Base directory:
web - Build command:
npm run build(orgridsome build) - Publish directory:
web/dist
Local Development
For local development, you can run them separately:
# Terminal 1 - Studio
cd studio
npm run dev
# Terminal 2 - Gridsome site
cd web
npm run developThis way, the Studio runs locally on one port, and your Gridsome site on another. You only deploy the compiled static files from web/dist to Netlify, which should be a simple, fast static file upload with no build process eating up your minutes.
The beauty of this setup is that your Studio is completely separate from your frontend deployment, so content editors can use the Studio at yourproject.sanity.studio without triggering any Netlify builds at all. You'll only use Netlify builds when you actually update your frontend code!
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.