Start here
The essentials
Every guide in this topic
-

How to turn on automatic security updates
Have the server install security patches by itself every day, on Ubuntu with unattended-upgrades and on RHEL-based systems with dnf-automatic.
-

How to set up a firewall on Linux
Block everything except SSH and the web with UFW on Ubuntu or firewalld on RHEL-based systems, without locking yourself out.

