No '/ghost' in Gatsby Ghost Starter

I wanted to try Ghost with Gatsby & Netlify, so I used gatsby-starter-ghost to deploy to netlify, which deployed successfully at https://wonderful-lamarr-24f1f5.netlify.com.

If I understand correctly, the admin panel and editor should be accessible at https://wonderful-lamarr-24f1f5.netlify.com/ghost, but it is not the case. What am I missing?

Hey there :wave:

You might find this thread useful, it explains how you should set up your site so you can access Ghost Admin :slight_smile:

1 Like

Hey @vikaspotluri123, thanks for the quick reply! From what I understand from that thread, this would require changing the links in .ghost.json to https://wonderful-lamarr-24f1f5.netlify.com. So I did that, and now Netlify fails to compile:

12:22:52 AM: Verify run directory
12:22:52 AM: Executing user command: gatsby build
12:22:55 AM: success open and validate gatsby-configs — 0.101 s
12:22:55 AM: success load plugins — 0.366 s
12:22:56 AM: success onPreInit — 0.753 s
12:22:56 AM: success delete html and css files from previous builds — 0.131 s
12:22:56 AM: success initialize cache — 0.008 s
12:22:56 AM: success copy gatsby files — 0.022 s
12:22:56 AM: success onPreBootstrap — 0.011 s
12:22:56 AM: error Plugin gatsby-source-ghost returned an error
12:22:56 AM: 
12:22:56 AM:   Error: Request failed with status code 404
12:22:56 AM:   
12:22:56 AM:   - createError.js:16 createError
12:22:56 AM:     [repo]/[axios]/lib/core/createError.js:16:15
12:22:56 AM:   
12:22:56 AM:   - settle.js:18 settle
12:22:56 AM:     [repo]/[axios]/lib/core/settle.js:18:12
12:22:56 AM:   
12:22:56 AM:   - http.js:201 IncomingMessage.handleStreamEnd
12:22:56 AM:     [repo]/[axios]/lib/adapters/http.js:201:11
12:22:56 AM:   
12:22:56 AM:   - next_tick.js:139 _combinedTickCallback
12:22:57 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
12:22:56 AM:     internal/process/next_tick.js:139:11
12:22:56 AM:   
12:22:56 AM:   - next_tick.js:181 process._tickCallback
12:22:56 AM:     internal/process/next_tick.js:181:9
12:22:56 AM:   
12:22:56 AM: 
12:22:58 AM: Shutting down logging, 19 messages pending

You don’t need to change the .ghost.json data, rather you need to make sure you have one domain for Ghost and one domain for Gatsby

I’m not quite sure I understand. Doesn’t hosting this on Netlify mean both Gatsby & Ghost are on the domain provided by Netlify? Do I still need to host Ghost along with Gatsby? If so, is there a way to use Netlify for Ghost too?

Nope, Ghost is a node-js based application, so it’s hosted separately from your static site. What Gatsby does is use the Ghost API to create a static site, and this is done using Netlify.

Netlify is hosting designed for static sites, so you can’t host Ghost using them. Your best bet for pain-free Ghost hosting is Ghost’s Pro offering since it’s run by the creators of Ghost.

Oh, that clears it, thanks! Actually I was hoping to use Ghost in place of Netlify CMS, as I wanted better editor features. Unfortunately I can’t afford to pay for hosting at this point. Thanks again for your help :slightly_smiling_face:

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