How to install Ghost 5 on Plesk Obsidian

This is an update to the Ghost 4 install guide from March 2021. The instructions are pretty much the same.

UPDATE: 20th December 2022 – This guide has been updated to include instructions on implementing Ghost with MySQL 8.


Yesterday, May 23rd, Ghost released Version 5 to everyone which contains support for new custom premium tiers, multiple newsletters, special offers, detailed audience segmenting, and expanded analytics.

They have also expanded their ‘cards’ feature which is embeddable content native within Ghost. They have support for videos, podcasts, callouts (Which will be demonstrated in this post) and even N /// F /// T's via OpenSea URLs (but that is something that you will probably not see here)

A full look at the changelog for Ghost 5 can be found here:

https://ghost.org/changelog/5


So let’s install Ghost on Plesk.

๐Ÿšจ

Prerequisites

  • Plesk Obsidian – (I am using 18.0.43)
  • Docker extension (This is already preinstalled, but you should check in the ‘Extensions’ menu to make sure)
  • MySQL 8 (MariaDB is not supported) – Ensure that you create a new database and note the details. [If you are on Debian (like me), you will need to install a MySQL 8 Docker container in order to use it]

Installing Ghost

  • Go to “Docker
  • In the search box, type in “Ghost” and press enter.
  • You will see “ghost” with the [OFFICIAL] tag. Click the highlighted arrow and choose the latest version (This may say 5.0.0 or similar. Do not choose latest or 5.x.x-alpine)
  • This will download the image and bring you to the next screen.

Configuring Ghost Docker Container! (๐Ÿ˜จ)

๐Ÿšจ

  • Container Name: Call this whatever you want, ideally something relating to your site. For this example, we’re calling this padraig_is_awesome
  • Check the box for โœ…”Automatic start after system reboot
  • Un-check the box for “Automatic port mapping
    • Manual mapping: 2368 to external 32778
  • Volume mapping:
    • Container“: /var/lib/ghost/content
    • Host“: /var/ghost/padraig_is_awesome/content (replace padraig_is_awesome with your container name from the top of the page!
  • Near the bottom of the page, click on “Add Variable
  • In the blank boxes, type url in the first box and your URL (eg: https://padraig.blog in the second box (Make sure this domain is registered and added to Plesk)
  • Add the database details:
    • Ensure that the database has been created first before proceeding. The information below is just sample data and should not be used!
    • database__clientmysql
    • database__connection__host123.123.123.123 (Your Server IP address)
    • database__connection__userroot
    • database__connection__password**************
    • database__connection__databasedb_name
    • database__connection__port3006

Your screen should look very similar to this:

  • Now click “OK” and let it install.
  • Go back to “Websites & Domains” and find your site, click on “Docker Proxy Rules

  • Click “Add Rule
    • URL: Leave this alone
    • Container: Choose your container
    • Port: This should say 2368 -> 32778
    • Click “OK

  • Give that a couple of minutes for it to work and you can access your site via https://padraig.blog/ghost (Obviously replace padraig.blog with your own domain name)

And you should be good to go!


Frequently Asked Questions!

What if I want to run a 2nd or 3rd Ghost blog on Plesk?

Repeat the steps above, the only thing to change are:

  • The “Container Name
  • The port, change it from 32778 to 32779

โ—

What if I want it at domain.com/blog?

  • Indicate this in the url on the setup page.
  • And when you add it in the rule on the “Docker Proxy Rules” page, add blog where it says “URL

I want to move this to/from a subdomain from/to a naked domain?

  • Go into the “Docker Proxy Rules” and remove the rule from here.
  • Go into “Docker” on the left-hand side.
  • Click on “Settings” beside the container and adjust the url in here. This will more than likely restart the container.
  • Re-add the “Docker Proxy Rules” to the new subdomain or naked domain.

How do I access the files if I want to import themes or other content?

  • Connect via SSH to your server (FTP will not work)
  • Navigate to /var/ghost/$containername/content

If there are any other questions, hit me up on Twitter and I will try to help where possible, but as mentioned, I am not an expert. Do not rely on me to resolve your issue. Try StackOverflow, Plesk’s forums, Ghost’s forums, Google, DuckDuckGo.


Welcome to the new padraig.blog. If things feel off, please let me know on Mastodon
toggle