Community Blog How to Run a Ghost Blog using Alibaba Cloud Simple Application Server

How to Run a Ghost Blog using Alibaba Cloud Simple Application Server

This article describes how to run a ghost blog using Alibaba Cloud Simple Application Server.

By Kelvin Galabuzi

What Is a Ghost Blog?

Ghost is a popular, free, open-source blogging platform used to create and publish content to users worldwide. The platform is written in Node.js and is well-known for being a fast Content Management System (CMS), which is a key attraction for many businesses developing web content.

Connect to a Simple Application Server (SAS)

The following steps describe how to connect to a Simple Application Server instance on the Alibaba Cloud platform:

Note: This article assumes that you already have a running Simple Application Service instance with a domain name associated with it.

  • Step 1: Log in to your Alibaba Cloud account and go to the Simple Application Service console. Access the Connect section under the Server Maintenance blade and click Set Password:


  • Step 2: Set the root user's password and click OK:


  • Step 3: Select Yes, restart the server immediately and click OK:


  • Step 4: Connect to your Simple Application Server instance via SSH using the root user:


Install Ghost on the Simple Application Server Instance

The following steps describe how to install Ghost to the Simple Application Server on Alibaba Cloud.

  • Step 1: Add a new user running the following command:
adduser ghostuser


  • Step 2: Add administrative permissions to the new user:
usermod -aG sudo ghostuser
  • Step 3: Log in as the new user:
su – ghostuser


-Step 4: Update the packages on your system running the following commands:

sudo apt-get update


sudo apt-get upgrade


  • Step 5: Install NGINX:
sudo apt-get install nginx


-Step 6: Open up the firewall to allow NGINX:

sudo ufw allow 'Nginx Full'
  • Step 7: Install the MySQL server:
sudo apt-get install mysql-server


  • Step 8: Access your MySQL database server and change the MySQL root user password:
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'ghostpass22';


  • Step 9: Install Node.js:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash


sudo apt-get install -y nodejs


  • Step 10: Install the Ghost CLI:
sudo npm install ghost-cli@latest -g


  • Step 11: Create a directory for your Ghost installation:
sudo mkdir -p /var/www/buzzyshirts


  • Step 12: Change the directory owner to the previously created user and set the directory permissions:
sudo chown ghostuser:ghostuser /var/www/buzzyshirts
sudo chmod 775 /var/www/buzzyshirts/


  • Step 13: Navigate to the newly created directory and run the ghost install command:
ghost install


  • Step 14: Insert the following parameters:

    • Blog URL: Insert the URL of your blog
    • MySQL hostname
    • MySQL username
    • MySQL password
    • Ghost database name
    • Ghost MySQL user: Insert yes
    • Set up NGINX: Insert yes
    • Set up SSL: Insert yes
    • Email for SSL Certificate


  • Step 15: Access the Ghost admin panel using the URL provided after Ghost has started from the command line:


  • Step 16: Continue to the next step:


  • Step 17: After inviting some users (if you wish to), you will be directed to the administrator dashboard, where you can add some pages and posts to your blog:


  • Step 18: Now, visitors can access the blog via the public facing blog URL:


0 0 0
Share on

Alibaba Cloud Community

564 posts | 54 followers

You may also like