This guide is a checklist of all the things that need to be done to configure a server on Debian 9.
Digital Ocean - how to set up SSH Keys
- create SSH keys by running
ssh-keygen
on client machine (or use the ones that I already have) - copy public key (
cat ~/.ssh/id_rsa.pub
) to./~ssh/authorized_keys
file on the server
^^ That article does not go over how to add SSH keys to Git, so...
- run
ssh-keygen
on the server and copy the pub key (cat ~/.ssh/id_rsa.pub
) over to GitHub
- run updates (
sudo apt-get update && sudo apt-get upgrade
- pretty simple) - set hostname
- update hosts file
- set timezone
Linode - How to Secure Your Server
- disallow root login
Digital Ocean - Add a firewall
- configure a firewall with UFW (Steps located here)
- be sure to remember to both activate the firewall and allow port 22 SSH
Digital Ocean - Setting up Nginx with server blocks
Digital Ocean - Secure Nginx w/ Let's Encrpyt
This will create a cron job in /etc/cron.d/certbot
.
Replace the existing cron job with this script
Linode - Guide here - this will allow for email to be sent from your personal Gmail account
Please note: You'll also need to install sudo apt-get install mailutils
- Install Node.js
- Install Git -
sudo apt-get install -y git
- Install Yarn
These are things that I ran into that had to be solved in the past
Postfix main.cf
permission denied
Write permissions inside of public_html
domain.com
not working in URL bar
Also when in doubt, try running sudo
Happy configuring!