One place for hosting & domains

      Putting the ‘A’ in JAMStack with Headless CMS


      Video

      The way we build web apps continues to change – with an increasing number of web apps using a static front end, powered by a dynamic backend. The moniker for this movement is JAMStack – for Javascript, APIs, and Markup.

      In this tech talk, Chris on Code, the founder of Scotch.io, will discuss JAMStack best practices, and some of the ways that you can set up your API layer by running a headless CMS on DigitalOcean Droplets. Chris will zoom into three of the most popular free, open source CMS platforms – WordPress, Ghost, and Strapi – and how to use them for your backend APIs.

      Resources

      In the Jamstack, the A symbolizes where we get our data from. Our data will come from APIs and this is very beneficial to us because we are allowed to separate our data from our frontend.

      Separating our frontend from our data allows us to focus on one at a time. We can use a Headless CMS that comes packaged with database connections, an admin dashboard, and more so that we can create an API quickly.

      Here’s a list of good Headless CMSs: headlesscms.org

      There are hosted Headless CMS solutions like:

      There are also solutions that we can host on DigitalOcean on our own servers so that we control all of the data and keep our pricing under control.

      DigitalOcean 1-Click Apps

      DigitalOcean makes it easy to self-host these Headless CMSs with a single click. You can find the 1-click apps on the DigitalOcean Marketplace:

      Once we have our Headless CMS in place, we can work on our frontends using a frontend technology like React, Gatsby, Next.js, Vue, Nuxt.js, Hugo, and many more.

      About the Presenter

      Chris on Code is the founder of Scotch.io, a popular JavaScript tutorial site. He is also the Web Community Manager at DigitalOcean. Chris has a strong focus on JAMstack since it is the fastest and most productive way we can create our sites and applications.





      Source link

      How to Install Ghost CMS on Ubuntu 18.04 LTS


      Updated by Linode

      Written by Linode

      Ghost is an open source blogging platform that helps you easily create a professional-looking online blog. Ghost is a robust content management system (CMS) with a Markdown editor, an easy-to-use user interface, and beautiful themes. It is easy to install and update with Ghost-CLI.

      In This Guide

      In this guide, you’ll set up, deploy, and secure a Ghost v3.5.1 blog on a Linode running Ubuntu 18.04 LTS, using NGINX, MySQL, Node.js, NPM, Ghost-CLI, and Let’s Encrypt. For installation instructions for other distributions, click here.

      Note

      This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, consult our Users and Groups guide.

      Replace each instance of example.com in this guide with your site’s domain name.

      Before you Begin

      1. This guide assumes that you’ve followed the steps in our Getting Started and Securing Your Server guides and have created a new user for Ghost with elevated sudo privileges. The example username used in this guide is ghostexample.

      2. Ensure that you have a valid domain name and properly configured DNS records for your domain.

      3. Ensure that your system is up to date:

        sudo apt update && sudo apt upgrade
        
      4. Install build-essential:

        sudo apt install build-essential
        

      Install Prerequisites

      Install NGINX

      NGINX will be used as a reverse proxy for your Ghost application:

      sudo apt install nginx
      

      Install MySQL

      1. Download and install MySQL:

        sudo apt install mysql-server
        
      2. Log into MySQL:

        sudo mysql
        
      3. Set a password for the root user with this command, replacing password with a strong password:

        ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
        
      4. Exit MySQL:

        quit
        

      Install Node.js and NPM

      Ghost is built on Node.js and follows Node’s Long Term Support (LTS) plan. Ghost only supports LTS versions of Node.js.

      Download and install Node.js:

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

      Install and Configure Ghost

      Install Ghost-CLI

      Ghost-CLI is a command line interface (CLI) tool that makes installing and updating Ghost easy. It sets up the database, configures NGINX as a reverse proxy, enables TLS/SSL security using Let’s Encrypt CA, automatically renews your SSL, and initializes Ghost as a systemd service.

      Install Ghost-CLI:

      sudo npm install -g [email protected]
      

      Install Ghost

      Install Ghost using the Ghost-CLI tool.

      1. Create the document root directory:

        sudo mkdir -p /var/www/ghost
        
      2. Change ownership of the /var/www/ghost directory to the non-root user with sudo privileges that you created. In this example, ghostexample is our username:

        sudo chown ghostexample:ghostexample /var/www/ghost
        sudo chmod 775 /var/www/ghost
        
      3. Navigate to the Ghost root directory:

        cd /var/www/ghost
        

        Note

        Installing Ghost in the /root or /home/{user} folder won’t work and results in a broken setup. Only use /var/www/{folder} because it has the correct permissions.

      4. Ensure that the directory is empty to avoid file conflicts:

        ls -a
        
      5. Install Ghost in production mode:

        ghost install
        
      6. Answer each question as prompted. For more information about each question, visit the Ghost documentation:

          
        ? Enter your blog URL: https://example.com
        ? Enter your MySQL hostname: localhost
        ? Enter your MySQL username: root
        ? Enter your MySQL password: thePasswordYouEnteredForRoot
        ? Enter your Ghost database name: exampleGhost
        Configuring Ghost
        Setting up instance
        
        Setting up "ghost" system user
        ? Do you wish to set up "ghost" mysql user? yes
        ? Do you wish to set up Nginx? yes
        ? Do you wish to set up SSL? yes
        ? Enter your email (used for Let's Encrypt notifications) [email protected]
        ? Do you wish to set up Systemd? yes
        ? Do you want to start Ghost? yes
        
        
      7. After installation is complete, run ghost ls to view running Ghost processes:

        ghost ls
        

      In the future when a newer version of Ghost is released, run ghost update from the /var/www/ghost directory to update to the newest version.

      Complete the Setup

      To complete the setup process, navigate to the Ghost configuration page by appending /ghost to the end of your blog’s URL or IP. This example uses https://example.com/ghost.

      1. On the welcome screen, click Create your account:

        Ghost Welcome Screen

      2. Enter your email, create a user, password, and blog title:

        Create Your Account Screen

      3. Invite additional members to your team. If you’d prefer to skip this step, click I’ll do this later, take me to my blog! at the bottom of the page.

        Invite Your Team Screen

      4. Navigate the Ghost admin area to create your first post, change your site’s theme, or configure additional settings:

        Ghost Admin Area

      Troubleshooting

      1. Troubleshoot the system for any potential issues when installing or updating Ghost:

        ghost doctor
        
      2. Get help about Ghost:

        ghost --help
        

      More Information

      You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

      This guide is published under a CC BY-ND 4.0 license.



      Source link

      How to Install Ghost CMS on Debian 10


      Updated by Linode

      Written by Linode

      Ghost is an open source blogging platform that helps you easily create a professional-looking online blog. Ghost is a robust content management system (CMS) with a Markdown editor, an easy-to-use user interface, and beautiful themes. It is easy to install and update with Ghost-CLI.

      In This Guide

      In this guide, you’ll set up, deploy, and secure a Ghost v3.5.1 blog on a Linode running Debian 10, using NGINX, MySQL, Node.js, NPM, Ghost-CLI, and Let’s Encrypt. For installation instructions for other distributions, click here.

      Note

      This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, consult our Users and Groups guide.

      Replace each instance of example.com in this guide with your site’s domain name.

      Before you Begin

      1. This guide assumes that you’ve followed the steps in our Getting Started and Securing Your Server guides and have created a new user for Ghost with elevated sudo privileges. The example username used in this guide is ghostexample.

      2. Ensure that you have a valid domain name and properly configured DNS records for your domain.

      3. Ensure that your system is up to date:

        sudo apt update && sudo apt upgrade
        
      4. Install build-essential:

        sudo apt install build-essential
        

      Install Prerequisites

      Install NGINX

      NGINX will be used as a reverse proxy for your Ghost application:

      sudo apt install nginx
      

      Install MariaDB Server

      1. Download and install MariaDB Server:

        sudo apt install mariadb-server
        
      2. Log into MariaDB Server:

        sudo mysql
        

        Note

        MariaDB is a fork of the popular MySQL database software, and is meant to be functionally alike, meaning that it can be accessed with the ‘mysql’ command.

      3. Set a password for the root user with this command, replacing password with a strong password:

        SET old_passwords=0;
        ALTER USER [email protected] IDENTIFIED BY 'password';
        
      4. Exit MariaDB:

        quit
        

      Install Node.js and NPM

      Ghost is built on Node.js and follows Node’s Long Term Support (LTS) plan. Ghost only supports LTS versions of Node.js.

      Download and install Node.js:

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

      Install and Configure Ghost

      Install Ghost-CLI

      Ghost-CLI is a command line interface (CLI) tool that makes installing and updating Ghost easy. It sets up the database, configures NGINX as a reverse proxy, enables TLS/SSL security using Let’s Encrypt CA, automatically renews your SSL, and initializes Ghost as a systemd service.

      Install Ghost-CLI:

      sudo npm install -g [email protected]
      

      Install Ghost

      Install Ghost using the Ghost-CLI tool.

      1. Create the document root directory:

        sudo mkdir -p /var/www/ghost
        

        Note

        Installing Ghost in the /root or /home/{user} folder won’t work and results in a broken setup. Only use /var/www/{folder} because it has the correct permissions.

      2. Change ownership of the /var/www/ghost directory to the non-root user with sudo privileges that you created. In this example, ghostexample is our username:

        sudo chown ghostexample:ghostexample /var/www/ghost
        sudo chmod 775 /var/www/ghost
        
      3. Navigate to the Ghost root directory:

        cd /var/www/ghost
        
      4. Ensure that the directory is empty to avoid file conflicts:

        ls -a
        
      5. Install Ghost in production mode:

        ghost install
        

        Note

        By default Ghost looks for Ubuntu and will display this warning if it detects a different operating system.

          
        System checks failed with message: 'Linux version is not Ubuntu 16 or 18'
        Some features of Ghost-CLI may not work without additional configuration.
        For local installs we recommend using `ghost install local` instead.
        
        

        It will ask you if you would like to continue anyway, answer yes.

      6. Answer each question as prompted. For more information about each question, visit the Ghost documentation:

          
        ? Enter your blog URL: https://example.com
        ? Enter your MySQL hostname: localhost
        ? Enter your MySQL username: root
        ? Enter your MySQL password: thePasswordYouEnteredForRoot
        ? Enter your Ghost database name: exampleGhost
        Configuring Ghost
        Setting up instance
        
        Setting up "ghost" system user
        ? Do you wish to set up "ghost" mysql user? yes
        ? Do you wish to set up Nginx? yes
        ? Do you wish to set up SSL? yes
        ? Enter your email (used for Let's Encrypt notifications) [email protected]
        ? Do you wish to set up Systemd? yes
        ? Do you want to start Ghost? yes
        
        
      7. After installation is complete, run ghost ls to view running Ghost processes:

        ghost ls
        

      In the future when a newer version of Ghost is released, run ghost update from the /var/www/ghost directory to update to the newest version.

      Complete the Setup

      To complete the setup process, navigate to the Ghost configuration page by appending /ghost to the end of your blog’s URL or IP. This example uses https://example.com/ghost.

      1. On the welcome screen, click Create your account:

        Ghost Welcome Screen

      2. Enter your email, create a user, password, and blog title:

        Create Your Account Screen

      3. Invite additional members to your team. If you’d prefer to skip this step, click I’ll do this later, take me to my blog! at the bottom of the page.

        Invite Your Team Screen

      4. Navigate the Ghost admin area to create your first post, change your site’s theme, or configure additional settings:

        Ghost Admin Area

      Troubleshooting

      1. Troubleshoot the system for any potential issues when installing or updating Ghost:

        ghost doctor
        
      2. Get help about Ghost:

        ghost --help
        

      More Information

      You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

      This guide is published under a CC BY-ND 4.0 license.



      Source link