I spent some time looking for an efficient way to create multiple blogs for all the side projects I manage and finally found a bearable solution that allows me to set up a new blog pretty fast. In this post, I'll take you through the process of creating a new blog. Hopefully, it will save you bunch of time in future.
Ghost offers a robust solution of hosting 3 blogs for a monthly payment of 39$, but it seems too much for my needs as most of my project doesn't have enough traffic and still are at the stage of idea validation.
Here are some criterias of what I was looking for.
- The quick and painless setup process for every new blog.
- Lightweight and flexible.
- Markdown editing.
Armed up with those criterias I went out to hunt for a solution. My booty was several Ghost instances running on DigitalOcean droplet for 10$ a month.
DigitalOcean is host provider that gives you a Linux machine for 10$ and you are allowed to do anything you want with it. I also already have a DigitalOcean account with running RoR application, so it was a painless choice.
The rest of the post I'll explain how to setup Droplet for multiple hostings. I assume that you know how to use Linux command line, and understand the basics of Networking. Let's get our hands dirty!
I assume that you have already bought a domain (or two) using the domain register of your choice. Later on this tutorial we will have to login into our domain management dashboard in order to create a new A record. There shouldn't be much difference in how to do this between services.
Ok let's start...
Step 1. First - go ahead and create DigitalOcean account.
Step 2. Hit the 'Create' button on the top and create a new droplet.
You will see a new droplet creation dialog.
Click one-click apps and find "Ghost on 16.04". complete the rest of the steps according to your preferences.
Step 3. Add a domain and point it to your new droplet.
Open a context menu on the right next to your droplet name. Select "add domain" option.
Now you can add your domain simply by typing
yourdomain.com or you can type something like
blog.yourdomain.com the last especially helpful when you want to separate the hostings of your landing page and the blog.
I host all my landing pages on firebase for free, and I only want to host my blog here.
Step 4. Edit an A Record of your domain provider dashboard.
You can see an IP address next to your domain name in a DigitalOcean domain. You have to edit an A Record from your domain provider dashboard so it will point to this IP address.
Step 5. Connect to your Droplet via SSH.
After you've created your domain, you should get an email from the service with credentials of your new droplet. Open a terminal and SSH to your remote machine using
Next, you will be asked for a password, use the temporary password that you've got by email. It will ask you to change your password, make sure you write down your new password somewhere.
Step 6. Setup a database for your new blog.
We need to create a new database for each blog. first type
/root/.digitalocean_password - You should see MySQL passwords for both
ghost users. We will need those passwords lately.
root user used to create MySQL databases and provide privileges to other users.
Let's log in to MySQL and create a new database.
MySQL -u root -p
show databases;- see all databases you currently have.
mysql> CREATE DATABASE your_domain_name_production;- create a new database.
Query OK, 1 row affected (0.00 sec)- if everything ok you'll see this message.
GRANT ALL PRIVILEGES ONyour_domain_name_production
.* TO 'ghost'@'localhost'
GRANT USAGE ON *.* TO 'ghost'@'localhost';- no rows should be affected by those two lines
Step 7. Create a dir for your new blog.
By default, a droplet installs a single instance of your blog in
/var/www directory. You can navigate there with
ls to see what in this dir, you will see
We want to create a separate folder for each blog.
To do so follow these steps:
mkdir yourblog.com- create a new dir.
yourblog.com- step into the new dir.
ghost install- install a fresh instance of Ghost.
✔ Checking system Node.js version ✔ Checking current folder permissions ✔ Checking operating system ✔ Checking MySQL is installed ✔ Checking for latest Ghost version ✔ Setting up install directory ✔ Downloading and installing Ghost v1.18.0 ✔ Finishing install process
It will ask you several setup questions:
? Enter your blog URL: https://talkingbots.net
? Enter your MySQL hostname: localhost
? Enter your MySQL username: ghost - use ghost user
? Enter your MySQL password: [hidden] - enter your password for ghost user
? Enter your Ghost database name: production_talkingbots - use database name from the previous step.
Do you wish to set up Nginx? - type
Do you wish to set up SSL? - type
? Do you wish to set up "ghost" MySQL user? - type
n because the user exists already
Do you wish to set up Systemd? - type
Do you want to start Ghost? - type
That's it! Now you should see your blog on
https://yourdomain.com if not - try
ghost start or
ghost stop & ghost start
https://yourdomain.com/ghost to do an initial setup and create a user.
After walking through those steps once it will take 15 minutes for you to set up a blog for your new project.
Those days I'm working on several projects and learning a bunch of new things in a field of idea validation and marketing. If you are interested in marketing and idea validation for micropreneurs, then follow me on Twitter @libinpage.
Want to make sure that you never miss any piece of content signup for this mail list and get new posts to your email.