Notes on Setting Up Cloud Hosting with DigitalOcean

When a reader recommended that I should look into moving my sites from the terrible share hosting HostPapa to the cloud hosting DigitalOcean, I hesitated. Setting up the Droplets seemed to be overwhelming. Fortunately, DigitalOcean has excellent tutorials to guide me through the entire process.

The command line is still daunting to me, yet it is so awesome at the same time. I moved six static (somewhat dynamic) sites into one Droplet and this blog, which powered by WordPress into a separate Droplet. Setting up WordPress is a bit more complicated. Although DigitalOcean offers a one-click install for WordPress, I did the long way to have more control of the environment.

Here are the tutorials I used to setup my Droplets:

  1. Initial Server Setup with Ubuntu 20.04
  2. How To Install the Apache Web Server on Ubuntu 20.04 and Setting Up Virtual Hosts
  3. How to Set Up SSH Keys on Ubuntu 20.04
  4. How To Create a New Sudo-enabled User on Ubuntu 20.04
  5. How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 20.04
  6. How To Install WordPress on Ubuntu 20.04 with a LAMP Stack
  7. How To Secure Apache with Let’s Encrypt on Ubuntu 20.04

How to Upgrade Ubuntu

Once SSH in, look for the number of updates can be applied immediately. If updates are available, shut off the Droplet power:

sudo poweroff

or

sudo shutdown -h now

Then take a snapshot of the Droplet through the control panel on DigitalOcean. Once the snapshot is taken, turn the power back on, SSH back in, and follow this tutorial: “How To Upgrade to Ubuntu 20.04 Focal Fossa.”

Here are the steps to update:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

To check for a new Ubuntu release:

sudo do-release-upgrade

Remove unused packages (Don’t run this on the WordPress Droplet):

sudo apt autoremove

AutomaticSecurityUpdates

To automatically install security updates, the “unattended-upgrades” package was installed:

sudo apt-get install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades