Gatsby without Netlify

Good evening,
congratulations about all the new updates and optimizations for Ghost.
I want to use gatsby for my front end.
I started working on gatsby-starter-ghost but I had a doubt after reading some information on github and this on your official documentation:

Deploying to production
Like all Gatsby sites, you can easily deploy a static front end using Netlify. Additionally, Ghost can trigger a site.changed event and corresponding webhook every time content is added or updated in order to trigger a rebuild of the front-end.

It’s not totally clear to me, can I use gatsby without having to use a service like Netlify?
I want to use Ghost CMS + Gatsby as front-end as I have always done, totally on my VPS.

If it’s possible, are there any drawbacks if I do not use a service like Netlify? Thank you

Netlify is a large proponent of JAMstack and has done a lot of work towards pushing it forward. It’s just a service that makes static site deployment simple and easy. The downside for not using Netlify is you have to add some logic to handle the stuff Netlify abstracts from you.

With a basic usecase, you might have your frontend source managed with git, via a service like Github, and your content managed through Ghost. Every time you make a change to your production Github branch (as an example), Netlify will rebuild your site, and every time you make changes in your ghost publication (i.e. when the site.changed webhook is triggered) Netlify will rebuild your site as well.

All of this happens through webhooks. Netlify manages all of the logic related to the incoming webhooks (e.g. authenticating the request and triggering a new deply), as well as keeping your site live and working (e.g. a build fails). If you were to do this by yourself, you would have to implement the logic that Netlify abstracts yourself

Thanks for the reply, I would like some other clarification.

It is clear to me what Netlify is for, I will try it, but I would like to understand more:

Can not I manage my frontend source normally via SFTP as I’ve always done with handlebars? Why do I have to use Github or similar for gatsby?

Simply editing the files of my frontend (template) and reloading it via the GHOST backend

You could, but every time you make changes to your site (e.g. create or edit a post) you would have to manually rebuild and reupload

When I say frontend I refer to the template, if I have to do rebuild and update even when I edit or create a post it becomes complicated and boring.
From what you told me, Netlify seems like the best solution.
I’ll try it hoping that the free plan is enough to handle everything.
thanks a lot

It sounds like you’re thinking of dynamic frontends rather than static sites. Static sites are a subset of dynamic frontends; gatsby pulls in all of the backend (Ghost) data at build time, and uses it to generate html which is not meant to change. An example of a dynamic frontend is something like the London theme - It uses Ghost’s handlebars rendering engine, but uses javascript to change the page content when you navigate

Well explained @vikaspotluri123!

1 Like

Perfect, thank you very much for the clarifications

To upload the site on Netlify do I have to create a github repository or upload the gatsby-starter-ghost folder? There are no other ways?

Part of what makes the logic behind Netlify possible is it’s integration with version control. You wouldn’t be uploading your site to Netlify, rather you would be making netlify generate the files on-the-fly

So you do need to create a repo on Github (and it can be private AFAIK)

Good evening,
Currently my blog is on domainA
The domain of netlify is domainA.netlify.com

I want to move the domainA on netlify so as to use domainA through netlify

But if I move the domainA on netlify, how do I access the ghost CMS?

If I go on domainA/ghost it tells me “the file ghost.js does not exist …”

You would need to configure your admin panel to be on a different domain (i.e. content.domainA)

1 Like

Thanks for the confirmation, I’m trying to configure the domain and nginx just this way

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.