✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

Can I self-host Sanity and use a static site builder to host the content myself?

4 replies
Last updated: Dec 7, 2021
hello all 👋I'd like to ask some pretty basic questions about how sanity works..
see, I have a sysadmin profile, I am not a developer and I am trying to understand how to self host sanity.
I've read the docs and tested the studio on my laptop, but as far as I can tell, when I upload content to my site, that content goes to some sanity server and is served from there.
is there a way for me to write a static site and just build all the static files and host that myself in like an s3 bucket or something like that ?
Nov 26, 2021, 9:18 PM
I understand I am lacking some basics on how this product works, so if there is some documentation that explains what I want to do, please refer me there 🙂
Nov 26, 2021, 9:19 PM
Hi User, The short version is that by design, you can't self-host your data -- it is indeed managed by Sanity in the cloud -- but you have total control over the shape and content of the data. The studio is the principal client to your data set, and one way it gets configured, but you can also read, write, patch from other clients, or raw http.
And, if I understand the second part of your question correctly, it's a very common use case to use a static site builder that pulls data from your Sanity datastore, and then renders it to static html, wether it's on S3 or any other hosting provider.

And all that said, if you are a sysadmin and configuring AWS stuff directly is in your comfort zone, then that's awesome
😎. However, you may already know this, but there are tons of services out there that abstract all that stuff away and make the build/deploy process extremely easy. A lot of that is in the starters below:
Nov 26, 2021, 9:46 PM
Also, the guides and starters sections have information about static builds, and this is a great video intro to building with Sanity https://www.youtube.com/playlist?list=PLRzQpWc3zNPnmQgTZdTR-sCvYfj5Uil6s
Nov 26, 2021, 10:13 PM
damn I never got a slack notification.. I thought noone answered me.thank you so much User for your time explaining this
🙏
Dec 7, 2021, 1:23 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?