When you spin up a fresh public Linux instance, automated scanners start knocking on your doors within milliseconds.
It doesn’t take much to get locked down properly, but missing a few basics can leave you exposed.
I’ve put together a straightforward guide covering the essential hardening steps from UFW and SSH key-only auth to secure Docker bindings and automated maintenance.
Original content by The Unknown Universe, written by a human and not AI generated!



Editor’s Note & Update
Following some comments on this guide, a couple of key clarifications are worth adding:
Docker Permissions & Rootless Containers: A few eagle-eyed readers rightly pointed out that adding your user to the docker group is functionally equivalent to giving yourself root-level access to the host machine (since container runtimes run with root privileges).
I have updated to remove that shortcut. While container security can go much deeper (such as setting up rootless Docker or Podman), this guide focuses on keeping things simple as a solid quick-start baseline for security.
System Updates, while fully automated background upgrades have their place, many admins including myself prefer a hands-on approach. Running a script manually and using needrestart gives you deliberate control over when services are recycled and ensures you aren’t caught off guard by unexpected reboots.
Thanks you all for reading and I always welcome any feedback on my work.