Where to Go Next with your Freshly Installed Ghost Server

Sam Julien
InstructorSam Julien

Share this video with your friends

Send Tweet
Published a year ago
Updated a year ago

Now that you have Ghost running the steps from here are very dependent on what you specifically want to do with the database.

I'll walk you through some common areas you might find yourself when you need to troubleshoot errors that are happening as you integrate and deploy Ghost in your applications.

Instructor: [0:00] We made it to the Ghost Setup Wizard. That means we've successfully installed Ghost on our server and it's connecting to our database. If we wanted to, we could go ahead and walk through the account creation process and get our Ghost site up and running.

[0:15] I'm going to let you do that since this is your Ghost instance, but I want to leave you with some resources on where to go next and some places that you might need to troubleshoot down the road. The two most common things that you're going to want to do in order to get this out into production is change the database information to be more secure and also change over to a custom domain.

[0:36] To do this, your best option is to use the Ghost CLI. The Ghost CLI will let you do all this kind of thing just by using commands. You can configure NGINX. You can update your database information. There's a whole reference here that you can use.

[0:51] There's a Ghost setup command that is what got run during the installation process. You can tap into that and run it anytime you want to do things like update the database information to a more secure password or update NGINX for setting up a custom domain. Always go to the Ghost-CLI docs first before you try to do anything because Ghost will almost certainly have something in the CLI that will make your life easier.

[1:17] Sometimes, you do need to get into the actual underlying file structure and tinker around with things. I do want to show you two things before we go. Let's hop back over to the terminal. The first thing that you're going to want to look at sometimes is the configuration file.

[1:33] If I do a list of this directory here, you can see we have this config.production.json. If I look in that config.production with Vim, we can see we have our URL. We also have all of our database information. You could just manually change this information here.

[1:52] You might not want to do that. You might want to use the Ghost-CLI to update that for you. If things are going wrong, you may need to tap into this file and mess around with some things. That's the first go-to spot for troubleshooting.

[2:06] The other one is the NGINX configuration. I want to show you that. If I cd over to /etc/nginx and list that out, you can see a number of different folders here. The one that we're concerned about is sites-enabled. Let's change directory into sites-enabled and list that out. You can see that we have a configuration file that matches our IP address.

[2:29] If I read that one out with Vim, you can see here that we've got our server name, which is our public IP address for our EC2 instance, and some configuration for Ghost here that's going to basically hand off port 2368 over to port 80.

[2:47] Again, Ghost should be able to modify this kind of thing for you but notice that we've got our IP address for our EC2 instance tied to all of our configuration for the rest of Ghost.

[2:57] If we were ever to stop our EC2 instance and reboot it, it might break our configuration here since we're depending on this hard-coded IP address. In order to take this to production, you're going to want to set up a custom domain and use the Ghost-CLI to configure everything accordingly.

[3:17] I just wanted to leave you with that because I didn't want you to get super frustrated as soon as your IP address changed. I didn't want you to get mad at this tutorial and think that everything was broken. It is possible to change this. You're going to use the CLI and these couple of files, and you'll be good to go.

[3:32] Thanks again for watching this course. I hope you learned a lot and had a great time.

Rendall Koski
Rendall Koski
~ a year ago

This was great! Clear, straight-forward and erred on the side of over-communicating rather than under-communicating which is also great! One of egghead's best.

A future course I for one would be interested in seeing would be how to connect a domain to an EC2 instance in as generic a way as possible (i.e. not dependent on a particular registrar), and in particular, how to set up a TLS certificate for https (perhaps with Let's Encrypt as the certificate authority.

Super minor feedback (I mean, the course was basically flawless) would be to add the end result to the intro: "This is what we will be building in this course: here is Ghost, open source blogging software running on an AWS EC2 instance on the free tier."

I look forward to more courses from Sam Julien!

Sam Julien
Sam Julieninstructor
~ a year ago

Hey Rendall, thank you so much for the kind words and helpful feedback!

blainewishart
blainewishart
~ 11 months ago

This looks like a useful introduction to both Ghost and AWS. I watched the last segment — where do we go from here. It would be useful I'm sure. But, what I need is somewhat different. For me, Ghost is great as a user, but expensive to run unless running serverless. I think a great follow on course would be: "How to convert your AWS Ghost site to a serverless sight using Lambda and serverless RDS or Aurora." That would, I think, result in a very economical Ghost installation. I realise, that many could simply run the free tier, but many can't and in any case, it would ve a great case study as the Ghost system is clearly defined and widely used.