This is just a cheatsheet for quickly setting up an Ubuntu server on DigitalOcean

1: Create a droplet and setup DNS

Create a standard Ubuntu 18.04 droplet with IPv6 support and add an SSH key before creating. Use DigitalOcean's DNS to setup two domains: 1stdomain.com and 2nddomain.com. For each create  A and AAAA records for domain and www.domain and direct them to the droplet.

2: Setup User

Login as root:

ssh root@SERVER-IP

Create a user:

adduser USERNAME

Grant user sudo privileges:

usermod -aG sudo USERNAME

Copy SSH public key to the user directory:

rsync --archive --chown=USERNAME:USERNAME ~/.ssh /home/user-name

Open a new separate terminal to test login, make sure the user login works before closing the root user's terminal:

ssh USERNAME@SERVER-IP

2: Setup UFW Firewall

Allow SSH access:

sudo ufw allow OpenSSH

Enable the firewall:

sudo ufw enable

Check firewall status:

sudo ufw status

Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere                  
OpenSSH (v6)               ALLOW       Anywhere (v6)