Install multiple Ghost blogs on one DigitalOcean server and save up to $500 a year in hosting costs!

Last updated: March 2020

I'm a huge fan of Ghost 2.0. It feels like Medium, but it's hosted on your own server, so you own the content and the ability to market it (and you can still import it to Medium for the audience).

Ghost also costs pennies to run... I have three websites on one server that costs $5 a month. That's less than $2/month/server. Such a setup could easily serve 20-50,000 page views a month (currently close to 10,000 in early 2019).

And it’s not hard, but it’s not for the non-technical.

Why write this guide? I kept having to piece together bits of information around the internet, most of which was irrelevant/semi out-of-date. There were random bits of information in some places, and in general it was time for an up-to-date piece.

How can you save $500 a year? A basic virtual server is $5 a month and lets you host multiple websites. A web hosting company is $10 a month per site. If you're paying a web hosting company for five websites, you're paying $600 a year, and could afford to be paying a lot less.

Conclusion: Host your own!

The following assumes you know what a server is and how to set up the first Ghost instance. It also assumes you know what Ghost is and why someone would use it over Wordpress, etc. C’mon, Google a little. If you have no idea, check out how easy DigitalOcean makes it for you with their one-click server setups that only cost $5 a month! Consider this to be Step Zero.

If this seems way too technical for you, try it anyway and see what happens. It’s how I learned everything.

Step 1: Buy the domain and point it at your Ghost server

Buy your domain at hover.com. Why there? Because they have the best customer support in the industry. They have a policy of a human picking up within one ring, and it works! Or use GoDaddy or whatever you like.

From Hover.com. But it’s the same everywhere.

Once you’ve bought your domain, you need to point it at your DigitalOcean server using two A parameters for @ (the whole domain) and www (for people who like to type www when going to a website). Do this now! Without them both set up, you won’t be able to finish the SSL installation at the end.

Step 2: Create a user with the right permissions on your virtual server (if you haven't)

You need to create a super user with root permissions. This is one of the first things you should do when running a server anyway. Here’s the guide from DO on how to do it. Once you’ve done that, use your terminal of choice to log in to your new super user account.

You need to set up the Ghost blog instance as the user, not the superuser (root)

Step 3: Create a new folder

You have to go to where Ghost runs and create a new folder, then change ownership to your username. It needs to be owned by you for the blog setup.

In this example, I'm setting up this very blog on a server I already had.

cd /var/www
sudo mkdir hooshmand.net
sudo chown dana:dana ./hooshmand.net
cd hooshmand.net

Step 4: Run the one-click Ghost install (in many keypresses and clicks!)

This might sound easy but you get asked so many questions I thought it worth documenting.

The core things to understand are that you’re creating a new website, which means new data files and new database, but using the same root user for your server.

Before you start, you need to find the root password that exists for your mysql server. Go find it.

sudo cat /root/.digitalocean_password
[sudo] password for dana: (enter your root password)

root_mysql_pass="someseriesofrandomcharsandnumbers"
ghost_mysql_pass="anotherseriesofrandomcharsandnumbers"

You need the first one called root_mysql_pass, between quotes. Copy that.

Then, ensuring you're in the folder (hooshmand.net or whatever your website is), start the installation process for Ghost.

ghost install

It’s off!

Now, you have to answer the questions it gives. Pay attention here. The instructions are different to how they are for when you set up your first blog!

It starts off the same.

Enter your blog name: http://hooshmand.net
Enter your mysql hostname: (localhost) hit enter for default

Now for the MySQL questions. Here’s where it’s different. Because you already have a Ghost blog on your server, you already have a mySQL username and password. It's the one you got above.

Enter your MySQL username: root
Enter your MySQL password: password for root

Finally, it goes back to the standard flow: You can just hit enter for default in most of this, except where you have to enter a password and an email (boldfaced)

Enter your Ghost database name: (hooshmand_net_prod) hit enter for default
Sudo Password: [enter your password, what you use to log in to this server]
Do you wish to set up a "ghost" mysql user? [hit enter for default]
Do you wish to set up Nginx? [hit enter for default]
Do you wish to set up SSL? [hit enter for default]
Enter your email (used for Let's Encrypt notifications): [[email protected]]
Do you wish to set up SystemD? [hit enter for default]
Do you wish to start Ghost? [hit enter for default]

Done! You should see a series of tick marks.

Final step: Set up your blog

Go to your domain. You should see the standard Ghost template, Casper, and it should be secured with SSL (so you see the padlock sign). Success!

Go to your domain and create your first user. Don't be alarmed that the admin interface is marked as 'not secure'.

Oh man that's an old profile pic. Should update it. I look the same though, c'mon.

Now you can make your first post. In fact, that's where I'm making this post!

Screwed up? Go back to zero!

You can always delete the Ghost instance and start again. Do this in two commands so you remove the one hidden file.

Do this inside your ghost website folder, in my case /var/www/hooshmand.net

sudo rm -r *
rm .ghost-cli

After this, you should have a clean install.

What's next?

There are a few things that are mandatory in setting up any new website if you want to do anything useful with it, before even adding content. For me, these are

  • Set up Google Analytics on a Ghost blog, so I can see who's going to the website and when
  • Submit the sitemap to be crawled by Google
  • Install a theme
  • Install some core images, like header images, a site icon

See the first five things to customise on the Casper Ghost Theme for some ideas.