Management Guides Getting started

VPS Maintenance Checklist: Daily, Weekly and Monthly Tasks

What to automate and what to check by hand on a Linux VPS, with the command for every item and a small read-only health-check script.

A VPS rarely fails without warning. The disk fills over weeks, a security update waits for a reboot that never comes, a backup job stops and nobody notices. A short routine catches all three. This checklist splits the work into what should run by itself and what needs a person, with the command for each item.

Commands are given for Ubuntu 26.04/24.04 and Debian 13 (apt) and for AlmaLinux and Rocky Linux 9 and 10 (dnf). They are standard tools from each distribution; this guide is a reference and was not run on a test server for this article.

Automatic: set up once

TaskHowCheck that it works
Security updatesunattended-upgrades (Ubuntu, Debian) or dnf-automatic (AlmaLinux, Rocky)systemctl list-timers | grep -E "apt|dnf"
BackupsA daily job that sends an encrypted copy off the serverThe newest backup is less than 24 hours old
Uptime checkAn external service that requests your site every minuteStop the web server for a minute on purpose and wait for the alert
Disk alertMonitoring agent, or the script below from cronAlert threshold at 80%
Certificate renewalThe certbot or acme.sh timersudo certbot renew --dry-run
Log rotationlogrotate and journal size limitsjournalctl --disk-usage

Test every alert once. An alert that has never fired may be going to an address nobody reads.

Weekly: five minutes

systemctl --failed          # services that crashed
df -h && df -i              # disk space and inodes
free -h                     # memory: read the "available" column
uptime                      # load compared with the number of cores
sudo journalctl -p err --since "7 days ago" | tail -50
  • Confirm that last night's backup finished and has a plausible size.
  • Check whether a reboot is pending (see the monthly section).
  • Look at login attempts if you do not use a tool that does it for you: sudo journalctl -u ssh --since "7 days ago" | grep -c "Failed" (the unit is sshd on AlmaLinux and Rocky Linux). A count that suddenly jumps is worth a look; a steady background level is normal on any public server.

Monthly: twenty minutes

Apply remaining updates and reboot if needed. Automatic updates usually cover security fixes only, and none of them restarts the server.

# Ubuntu, Debian
sudo apt update && sudo apt full-upgrade
cat /var/run/reboot-required 2>/dev/null

# AlmaLinux, Rocky Linux
sudo dnf upgrade
sudo needs-restarting -r

Review what is exposed.

sudo ss -tulpn                     # listening ports
sudo ufw status verbose            # or: sudo firewall-cmd --list-all
getent passwd | awk -F: '$3 >= 1000 && $3 < 65000 {print $1}'   # human accounts
sudo grep -R "" /etc/sudoers.d/ 2>/dev/null | head

Every listening port should be one you can name. Every account should belong to someone who still needs it.

Clean up.

sudo apt autoremove --purge        # Ubuntu, Debian: old kernels and unused packages
sudo dnf autoremove                # AlmaLinux, Rocky Linux
sudo journalctl --vacuum-time=30d
docker system df                   # if you use Docker

Update applications. The operating system's updater does not touch WordPress, its plugins, Composer or npm dependencies, or container images. Update them on their own schedule.

Every three to six months

  • Restore test. Restore the latest backup to a fresh VPS and load the site. Note how long it took: that is your real recovery time.
  • Check the operating system's support date and plan the next release upgrade a few months before it ends.
  • Rotate credentials that have been shared or that belonged to people who left: SSH keys, database passwords, API tokens.
  • Review the plan. If memory or disk has been above 80% for most of the period, upgrade before it becomes an outage. If usage is far below the plan, downgrade.
  • Check billing and domain renewal dates. An expired card or domain takes a site down as reliably as a crash.

A health-check script

Save this as /usr/local/bin/vps-health, make it executable with chmod +x, and run it weekly by hand or from cron with the output mailed to you.

#!/usr/bin/env bash
echo "== $(hostname)  $(date -Is)"
echo "-- uptime";            uptime
echo "-- failed services";   systemctl --failed --no-legend
echo "-- filesystems at 80% or more"
df -hP -x tmpfs -x devtmpfs | awk 'NR>1 && $5+0 >= 80'
echo "-- inodes at 80% or more"
df -iP -x tmpfs -x devtmpfs | awk 'NR>1 && $5+0 >= 80'
echo "-- memory";            free -h | sed -n '1,3p'
echo "-- reboot pending"
if [ -f /var/run/reboot-required ]; then echo "yes"
elif command -v needs-restarting >/dev/null; then needs-restarting -r | tail -1
else echo "no flag found"; fi
echo "-- last logins";       last -n 5 -a | head -5

Empty sections are good news. The script only reads information; it changes nothing.

What not to do

  • Do not postpone reboots for months. A patched kernel that is not running protects nothing.
  • Do not keep the only backup on the server it protects.
  • Do not run "optimisation" or "cleaner" scripts from the internet without reading them. Most of what they do is harmless or harmful, rarely useful.
  • Do not clear the memory cache on a schedule. Linux uses spare memory as cache on purpose and releases it when needed.

For the reasoning behind each task, see VPS Management: A Practical Guide. When a check turns up a slow server, continue with the triage guide.

Frequently asked questions

How often should I update a VPS?

Security updates daily and automatically; everything else at least monthly, followed by a reboot when the system asks for one.

Does a VPS need to be restarted regularly?

Only to load updated kernels and core libraries. There is no benefit in rebooting a healthy server on a timer.

How much time does maintaining one VPS take?

With the automatic tasks in place, about five minutes a week and twenty minutes a month, plus an hour or two twice a year for the restore test. Incidents come on top and cannot be scheduled.

Share story:

Continue reading other guides on How VPS.