If you own a Linux server, you’re probably already doing some of these maintenance tasks. Our checklist will help you keep track of all the tasks you should do on your Linux server to properly maintain it.
All tasks can be changed to suit your preferences. Especially the daily tasks. You don’t need to do all tasks, they can differ depending on your setup, but generally, this checklist is a good starting point.
Daily Linux Server Maintenance Tasks
- Check your monitoring tools. You should technically be checking these tools as often as possible (and set up instant alerts)
- Check for errors in all logs. Check all your /var/log/ logs for errors. You can use a variation of this command to help
grep -i -e fail -e error -e corrupt /var/log/syslog"
- Update with critical security patches. You should run security updates often. Especially when there’s a critical security patch.
Weekly Linux Server Maintenance Tasks
- Take backups. You probably already have a tool that takes automatic backups. Having multiple backups stored in different places helps.
- Check if backups are working. You must verify the backups yourself. Test a backup and see if it’s working correctly.
- Update the server and packages. It’s always smart to update your system, but make sure to take a backup before, and test the system after the updates.
- Check RAM, CPU, and Network usage. If you notice anything out of the ordinary, look into it. Check the “culprit’s” logs. If there’s a higher usage in anything and it’s expected and not out of the ordinary, look into upgrading your server. If these usage checks are part of your monitoring tools, you might not need to do it manually.
- Check if all shell scripts and cron jobs are working correctly. You can also check if everything starts correctly after a reboot.
- Check if the monitoring tools are working correctly. Whatever tool you’re using, check if it’s actually monitoring the resources.
- Check if load balancers are working correctly. If you have them set up.
Weekly Linux Server Maintenance Tasks
- Review disk usage. If there’s an increase somewhere, inspect the culprit. If you’re near the limit, upgrade your disks.
- Remove old unneeded logs. Logs can pile up sometimes, so if they are old and you don’t need them anymore, you can remove them from the server. Just to be safe, you can back them up somewhere and review the logs before removing them.
- Remove old software and old kernels. You can use commands like autoremove or autoclean to remove unneeded software, but you can also check and remove manually.
- Check the storage device’s health. Use a tool like smartctl to do this. If your monitoring tool already does this, you might not need to do it manually.
- Review the users list and remove unneeded users. People often remove users as soon as they leave a company/server, but sometimes one might forget to do it, so some unknown or unneeded users might need to be deleted.
- Review the permissions. Check if there have been any changes to the permissions of important files and directories.
Intermittent Linux Server Maintenance Tasks
There’s no recommended specific time period for these tasks, so you can do them as you prefer, on your own schedule.
- Change passwords for all users. All users on the server should change their password at least twice per year.
- Renew SSL certificates.
- Review the server’s security.
- Run a malware scan. This is debatable if you should do it at all, but better be safe than sorry. Even if you don’t have malware that works on your Linux server, you might have malware that works on Windows machines and transfer that file over to someone with a Windows machine.
- Reboot and check if everything works correctly after. Is everything up and running? Did all the services that are enabled to run on startup actually run? Did anything break? Check the logs and monitoring tools after rebooting.
- Review firewall rules. Are there any new rules added or removed? Were there any changes to existing rules? You might need to allow or deny specific traffic for newly installed services.
There are a lot more tasks you need to do when managing and maintaining a Linux server (or a lot less, depending on your server and use case) – this checklist is just a starting point that you should update to your preferences.
If you have any suggestions for tasks that we missed, please leave a comment below.
If you buy a managed server, you don’t need to do most of these tasks, the managed server hosting provider will do them for you, although you can always check and ask them what of these tasks they’re doing.