Ghost CMS on Debian 10

Install

Create user for Ghost

adduser [GHOSTUSER]
usermod -aG sudo [GHOSTUSER]

Requirements

Nginx

Install nginx:

apt install nginx -y

MariaDB

Install MariaDB

apt install mariadb-server mariadb-client -y

Initialize MariaDB:

mysql_secure_installation

Create database for Ghost:

mysql -u root -p
CREATE USER [GHOSTUSER]@localhost IDENTIFIED BY "Str0ngP4ss";
CREATE DATABASE  [GHOSTDB]; 
GRANT ALL ON [GHOSTDB].* TO [GHOSTUSER]@localhost;
FLUSH PRIVILEGES;
QUIT;

NodeJS 12.x

Install NodeJS 12.x:

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash
apt install nodejs -y

Create directory

mkdir -p /var/www/ghost
chown [GHOSTUSER]:[GHOSTUSER] /var/www/ghost
chmod 775 /var/www/ghost

Ghost CLI

npm install ghost-cli@latest -g

Ghost

Change user to [GHOSTUSER]:

su - [GHOSTUSER]

Install our Ghost:

cd /var/www/ghost
ghost install