10 bad server habits you need to fix

Bad server habits

We all make mistakes or take shortcuts from time to time, but if you’re dealing with servers on a regular basis, cleaning up your act has the potential to save a lot of money and headache down the line. Based on our own experiences, and that of our users, we’ve put together a pretty comprehensive list of bad server habits that you might find familiar. Take it from someone who does many of them himself.

While many of these bad habits might seem applicable only to sysadmins working on complex, high-traffic systems with many users, there’s almost always a takeaway even if you’re just a single person hosting a personal Ghost blog, or self-hosting a few simple services.

Whether it’s one user or a million, a sysadmin is always a sysadmin. Always trust in XKCD to remind us of that.

You’ve forgotten the ‘golden rule’

In answering a question over at Server Fault, user pehrs offers a valuable “golden rule” that sysadmins and general server users should keep in mind:

A sysadmin is there to support the users, not the other way around.

If you’ve strayed from this rule, it’s the first server habit you need to fix. Every other bad habit and subsequent fix percolates down from this single golden rule. Working on servers isn’t about making your own life more comfortable—it’s about keeping services running, which in turn keeps users happy.

You work under root… ever

Unless it’s your very first login, and you aren’t using any configuration management tool like Ansible. Only in that case is it acceptable to SSH in as root, make a new user, set up sudo privileges, SSH out, and work under a safer, un-escalated user account.

To take this even further, you should disable root SSH sessions, and can also clear the root password to make doubly sure no one can log in.

You sacrifice security for convenience

It doesn’t matter if it’s your convenience or that of your users.

We all know that long, complex passwords can be a pain to write, especially if you need to use them often enough, but the difference between a passphrase-less SSH key and one with even a moderately-secure passphrase is someone accessing your server instantly and someone having to spend years cracking the key’s encryption.

Plus, you can use an SSH keyring tool to make this easier on you.

But that’s just one example. If you’re managing servers for a business, it’s a good idea to write down security policies. Be sure to document times when you or others overrule these policies so that everyone stays on the same page about when, how, and why that convenience brought the server to its digital knees.

Saying to yourself, “I’ll document this later”

Speaking of documentation—putting off the sometimes-tedious work of documenting your scripts or processes usually means you’ll never do it. And even if you do, writing documentation from memory is nowhere as useful as doing it simultaneously.

With documentation, you’ll be able to recreate workflows smoothly and quickly onboard anyone else who might be helping you keep your server online.

And not documenting the changes you’ve made

If you change a system configuration file, you should also document that change somewhere. With that note in hand, you’ll be able to backtrace what change made things go wrong.

And, with any luck, you’ll be able to fix it. Or end up like this:


You don’t have backups

Perhaps the most tragic of terrible server habits, because you never need a backup until you need it.

Depending on your situation, your backup plan can be anything from super rudimentary (See: VPS backups are really simple, you’re just thinking too hard) to sophisticated and fully automated.

Just make sure it’s something.

You have a habit of testing on production

There’s nothing quite like saying to yourself, “It’s just a small fix. Nothing bad could happen,” and then watching your server and its services wind down entirely.

You should test any new code before pushing it into production anyway, so this is a doubly terrible server habit.

And now, let’s take a step back from the terminal for a moment.

You’re not exercising!

Maybe you are. If so, great!

This bad habit might seem unrelated to complex passwords and documentation, but IT and server administration work tend to be extremely sedentary. Combine that with the typical office diet, and you’ve set yourself up for any number of branching bad habits.

The CDC recommends at least 150 minutes of moderate-intensity aerobic activity, like brisk walking, and two days of muscle-strengthening exercises every week. The benefits, unsurprisingly, are varied and unilaterally positive.

Your posture is deteriorating

Bad server habit: your posture!

Humans just aren’t built to sit at a desk for a majority of the day. Evolution has optimized our anatomy for walking, and the more time we hover over keyboards, with our chests tight and our shoulders slack, the more we start to hunch over.

There are tons of exercises and stretches you can do to keep your mobility high and your posture upright.

That dark IDE theme isn’t enough

We weren’t meant to sit all day, and we certainly weren’t meant to stare at screens all day. Dark themes and black terminal backgrounds might help, but a computer screen’s blue light isn’t good for you. From eye strain to mangled circadian rhythm, it’s best to minimize exposure.

Software like f.lux, which changes the color temperature of your screen at different times of day, can help. In the evening, and especially at night, your screen will give off an orange-y glow, rather than the bright blue glare, to soften the blow on your eyes.

Fixing bad server habits doesn’t happen all at once

You’d waste an entire week of work trying to fix these terrible server habits simultaneously, so I’d recommend taking them on one at a time. It might feel overwhelming, but the results will pay off in the long haul.

Did I miss some truly bad server habits that you do yourself or see from others? Let me know at [email protected].