Servers, Hosting & DevOps

Linux server management

Most sites that go down do not go down because of a clever attack. They go down because a disk filled with logs, a certificate expired, MySQL was killed by the out-of-memory killer, or a backup that nobody had tested turned out to be empty.

Server management is largely the discipline of removing those failure modes ahead of time, and then being reachable when something happens anyway.

What is included

The work itself

Provisioning

A new server built from a repeatable checklist: users and SSH keys, no root password login, firewall, timezone, unattended security updates, swap sizing and monitoring agent.

Web stack

nginx or Apache with PHP-FPM pools tuned to the actual memory available, HTTP/2, gzip and Brotli, and sane client body and timeout limits.

Databases

MySQL, MariaDB or PostgreSQL configured for the box it is on, buffer pool sizing, slow query logging, and connection limits that match the application pool.

TLS certificates

Let's Encrypt with automated renewal, tested renewal rather than assumed, plus a modern cipher configuration.

Backups

Off-server backups on a schedule, with retention, and a restore actually performed once so we know it works.

Monitoring and alerting

Disk, memory, load, certificate expiry and HTTP uptime, alerting to somewhere a human will see it.

Troubleshooting

Diagnosing high load, memory exhaustion, mail delivery problems, 502s and slow queries, reading the logs rather than guessing.

How I work on it

Process

Adjusted to the job, but this is the shape it usually takes.

  1. Audit before touching

    What is installed, what is listening, what is in cron, what the update situation is. Undocumented servers get documented first.

  2. Fix the dangerous things

    Exposed services, missing updates, absent or unverified backups.

  3. Tune to the workload

    Configuration follows measurement. Copy-pasted my.cnf settings from a blog post are how servers end up swapping.

  4. Leave a runbook

    Where things live, how to restart them, how to restore a backup, who to call.

Questions

Things people ask

Most often PHP-FPM children multiplied by their memory limit exceeds RAM, or MySQL's InnoDB buffer pool was set as if the box had more memory than it does. Both are configuration, not hardware, and both are cheap to fix once measured.

If someone on your side is comfortable with SSH, reads alerts and applies updates, self-managing is fine. If nobody is, an unmanaged VPS is a liability that will eventually cost more than managed hosting would have.

At least quarterly, and after any significant change to the stack. An untested backup is a hypothesis, not a backup.

Need help with linux server management?

Tell me the situation and what you have already tried. I read the code and the server before quoting anything.

Get in touch