How to install Ghost on Ubuntu 18.04 LTS?

So we meet again! Long time, no see.

I’m here just to let you guys know that I have my own Ghost instance up and running now, on my own server, using a really cool .io domain name that I own, so you know there is no stupid double slash // breaking my URL, and since my site is no longer wrapped in a frame set by the hosting provider I no longer run into the “X-Frame-Options Policy” problem (it’s one of the first things I fixed).

Also, since I can set my own DNS records now I have been able to set up SSL with Let’s Encrypt so that I can sign in to my admin panel securely. I even took time to configure my mail settings so that I can send real e-mails for verifying new accounts rather than hacktivating them in the back-end.

Yeah, you can use a fake e-mail address, not a problem. But it’s not recommended! A valid e-mail address has the benefit of you getting notified in case auto-renewal fails for some reason, for example. The address is not published publicly in any registry that I’ve been able to find, if anyone it’s Let’s Encrypt alone that has the e-mail address on record and it’s usually used for sending you important notifications regarding your SSL certificate. So use a valid e-mail address or a fake one, it’s up to you.

No need to do any such thing! At least not in my case. I have tried and tested many things to get this working, but I am pretty sure that the solution lies in removing the default configuration files for Nginx, so that only the newly generated configuration files for Ghost are in their respective location. I did not remove my default configuration files, I just moved them up the folder tree, just in case I need to review them or restore them later (the kind of thinking everyone needs to develop).

mv /etc/nginx/sites-available/default ..
mv /etc/nginx/sites-enabled/default.enabled ..

These are the files I now have in each folder.

/etc/nginx/sites-available/mycoolsite.io.conf
/etc/nginx/sites-available/mycoolsite.io-ssl.conf
/etc/nginx/sites-enabled/mycoolsite.io.conf
/etc/nginx/sites-enabled/mycoolsite.io-ssl.conf

This I think is the missing piece of information from the Ghost installation guide.

It’s also needless to say that you have to clear the cache from your web browser. I failed to do that the first few rounds.

Happy ghosting!