Hosting & Domains News

Dedicated Hosting: Tips For Managing A Dedicated Server Yourself 

Managing a Dedicated Server

Managing your own dedicated server can seem like a daunting prospect. But it’s not as hard as you think if you’re already computer savvy. If you can run a WordPress website, you can probably manage a server as long as you’re using a graphical control panel interface. There are lots of reasons to do it yourself – chief among them to save money, but you can also pay someone like Blacknight to manage it for you.

When I moved my own online operations to a Blacknight dedicated server earlier this year, I decided that I wanted to manage it myself – mostly because I wanted to learn as much as I could about running servers, but I also wanted complete control. My previous host was a dedicated WordPress host, and I didn’t have much control, so the prospect of being able to do whatever I wanted with my server had a ton of appeal.

I’ve learned a lot in 6 months. So, I thought I would put together a list of tips that will be handy if you decided to get a dedicated server and want to manage it yourself.

Watch cPanel/Plesk Tutorials

When you buy your server, you should get it installed with a control panel. Your control panel will allow you to access your server from almost anywhere and help you manage your server (if you don’t have a control panel, your access would be all command-line driven, and that’s no fun). These days the two most popular control panels are WHM/cPanel and Plesk. I use cPanel, and I quite like it. It’s a very powerful tool. WHM is the part of the software that manages the server itself. The cPanel part is the bit that runs in your production environment. They’re very separate things but also work together. I’m still learning my way around WHM. I’ve used cPanel for years, as it’s usually the default with most shared hosting setups. Thankfully there are plenty of free resources and documentation for learning how to use them.

Official cPanel Tutorials

Official Plesk Tutorials

Setup uptime monitoring

One thing you’ll absolutely need to know when running your dedicated server is the simple fact of whether or not your websites are online. Your server isn’t a reliable source of uptime because it can’t tell you it’s not online. So, you need someone else to monitor your uptime. There are many services out there. Jetpack, the plugin by WordPress, has free uptime monitoring, and they’ll email you if your WP sites go down. Lately, I’ve been using Updown.io, which can monitor any kind of website, and it doesn’t cost a lot to use – it’s free at first, and it only costs if you want more robust monitoring.

Have a Backup strategy

If you’re managing your own server, you need a backup strategy. Things happen, and you don’t want all your resources in one place in case the server goes down or corrupted. While it’s rare, hard drives can fail. You need to have your data in more than one location. Blacknight provides Acronis backups that store everything in the cloud and basically keep a copy of your server off-site. cPanel and Plesk also have backup solutions built-in to automate backups, but be careful when setting them up as they can swallow your hard drive space rather quickly. I recommend keeping a constant whole server backup in an off-site location like Amazon S3. Since most of my websites are WordPress, I use WP Time Capsule to keep an incrementally backed-up copy of my sites in Amazon S3.

Keep Track of the Stats That Matter

When running a dedicated server, while it may seem like your server resources are unlimited, they are not. Hard drive space is limited, so keep an eye on your hard drive space usage. Manage your usage so that you don’t use it all – if you do – your websites will go down (yes, I did this). Keep an eye on bandwidth. While most contracts with hosts and data centres like Blacknight are generous, you will have a limit, and it’s just a good practice to use as little bandwidth as possible. Check your logs occasionally to make sure nothing is eating your bandwidth. For example, I was looking at my logs in cPanel recently and found a bot that was consuming 100gb of bandwidth a month that didn’t need to (I banned the bot). Keep an eye on your server load average. Check your stats and logs in cPanel/Plesk for errant scripts hogging server resources.

Keep Software Updated

Any software that you use – whether it’s production or backend – keep it updated. Bugs and security holes are found all the time. There are bots crawling the web looking for out of date software to try and hijack your server. Your server security is only as good as the software you use, and if you rely on open-source software, keep it updated. If you’re paying for software – keep it updated. This also includes the server itself – keep the OS and cPanel/Plesk updated to the latest versions.

Control Access and Setup Two-Factor Authentication

While turning on a web server, in a sense, opens it up to the world, it’s controlled access. It’s important to maintain that control. Do not give anyone access to your server backend that doesn’t need it. Don’t hand out FTP accounts to just anyone, in fact, don’t use FTP at all. Use SSH/SFTP to keep transfers secure. Require passwords to be strong. Limit access to the ‘root’ user of the server. Only allow trusted people keys to your personal kingdom. I’m lucky that it’s just me and my server, I rarely need to give anyone access other than Blacknight to help fix it when I’ve broken it.

You also really need to protect access by turning on Two-Factor Authentication so that you have to enter a unique code every time you log in to your server’s control panel. It’s a pain – personally, I hate it – but as someone who’s been hacked in the past (a long time ago) because I didn’t have TFA turned on – turn it on anyway. The extra seconds you spend logging in with it can end up saving you tens of thousands of dollars in the future.

Use SSH instead of FTP

Mentioned above – try to avoid using FTP for file transfers. It’s the least secure way to transfer files. It’s also a very insecure way to give people access to your server. You should be using SFTP instead, which is basically FTP, but with the added security of using a secure socket layer (SSL) to create a secure and encrypted connection. SSH keys are unique and difficult to hack and create the most secure environment for file transfers possible.  You will need a ‘Private’ key and a ‘Public’ get to use SSH, your server will have the information and then you use software like Transmit by Panic to login (and it will save the keys).

Create a New Instance for Each Production Environment

I learned this one after I’d already set up my main hosting account with WHM/cPanel. You should set up a separate account/instance for every ‘production’ thing that you’re doing on your server. This isolates each account and install – and thus the software you’re using. It’s like a little corral. So, if something goes wrong, it will be less likely to take down the rest of your server or production environments. Before I knew this fact, I’d put several of my production websites in the same install. I would not do this again. Moving them is a pain, so do it from the get-go instead.

Compress those bloody images!

Unless you’re working with a lot of video, the thing most likely taking up the most space on your server will be images. I have a 480gb SSD hard drive on my server. When you have a 15-year content archive with thousands of articles and thousands of images, that will take up a lot of space very quickly. There’s an easy solution, though; most images can be easily compressed. Server-side, you can use run scripts that will compress your images. Before you upload your images, you can use a tool like Tinypng to compress your images. If you’re command-line savvy, you can use the ‘Morgify’ command to resize entire folders of images in the background (though this is a risky thing to do!). When I launched a heavy image website earlier this year, there were almost 20gb of images that I was able to reduce down to 10gb using Morgify.

Learn the basics of the terminal/command line

I’m old enough to remember DOS and doing things by typing them out rather than having a shiny graphical interface. But it’s been a LONG time since I’ve done much at the command-line level. This is something you should probably change if you’re managing a dedicated server. Most servers these days are Linux based, and while cPanel/Plesk make it easy to manage a server without having to use the command-line interface, sometimes it’s easy to just run a command. Careful, though, it’s very easy to break things at the command line level if you don’t know what you’re doing (I speak from experience…).

You’re usually a system reboot away from fixing most problems

You will crash your server. You will break something. That’s OK. Usually, you’re usually just a system reboot away from fixing most problems. Trust me, I know. Though don’t take restarting the server lightly, it can take 15-20 minutes, and while it’s happening, all your websites and production environments will be completely offline (including email!). If you really bork things, well, your web host can help you out, often quicker than you finding the solution.

Interested in getting set up with a dedicated server? Then get in touch with Blacknight!

Do you have experience managing a dedicated server and have some tips? Let us know in the comments below! 

Exit mobile version