Read this for setting up a new website domain on DigitalOcean's Droplet running Nginx server.
This post is written as a personal reference. Detailed guides are linked across this article.
Add custom nodesource instead of installing from apt-get:
sudo apt update cd ~ curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh sudo bash nodesource_setup.sh sudo apt install nodejs
The above would install the latest version, 10.x around the time of this post. npm package manager is also installed along with this.
Ghost CLI application
Make sure NPM is installed:
sudo npm i -g ghost-cli
Create a new directory for your ghost blog:
sudo mkdir /var/www/ghost
Make sure ownership and permissions are in order:
sudo chown $USER:$USER /var/www/ghost sudo chmod 775 /var/www/ghost
Installing and Configuring Ghost
Switch to the /ghost folder and run:
Make sure domain name has been configured through the DigitalOcean dashboard or SSL certificate creation will fail.
Spent 3 hours debugging SSL and all I had to do was refresh Chrome's cache and allow cookies from my domain as initial incorrect SSL had blocked all [*].thisnameless.com cookies.