Hey fellow devs! š
If you've just provisioned a new bare-metal dedicated server (or even a high-end VPS), the default OS installation is not ready for production.
Within minutes of coming online, bots will start hammering port 22. Furthermore, default Nginx and MariaDB configurations leave massive amounts of performance on the table.
We've put together a massive 10-step tutorial over at FitServers that takes you from a blank Ubuntu 22.04 / CentOS 9 installation to a fully hardened, production-ready machine.
What we cover in the guide:
The Basics: Safe user creation and disabling password-based root SSH.
The Defense: UFW configurations, Fail2Ban setup, and sysctl kernel hardening (disabling source routing, enabling SYN cookies).
The Stack: Compiling a production-tuned nginx.conf and securing Let's Encrypt SSLs.
The Database: Tuning the InnoDB buffer pool in MariaDB for servers with 8GB+ RAM.
The Automation: A complete bash script for automated database/web file backups via rsync and cron.
If you manage your own infrastructure, you'll want to bookmark this one.
š Read the full tutorial with all the code snippets here: Dedicated Server Setup, Security & Optimization Guide (2026)
Top comments (0)