Skip to content

Inheriting an undocumented cPanel server: a week-one runbook

The first week of a takeover decides whether you control the server or it controls you. Here is the ordered checklist that turns surprises into known state.

The first week with an undocumented cPanel server is a foot race between you and the next incident. Without a baseline, you cannot tell if a thing is broken or always was that way; you cannot tell if a process is legitimate or a previous admin’s experiment left behind; you cannot tell which users matter. A focused week-one runbook gets the baseline before the first ticket arrives.

What’s happening

You inherited the host but not the context. The previous admin’s knowledge — which customer matters most, which scripts are load-bearing, which monitoring alerts are real and which are noise — is gone. Whatever is on disk and in the WHM configuration is what you have. The runbook captures that state before drift starts, so future changes can be measured against a known baseline.

How to verify

The week-one captures, day by day:

Day 1 (inventory):

whmapi1 listaccts | grep -E "user|partition|owner|email|disklimit|maindomain" > /root/inventory-day1.txt
whmapi1 listpkgs > /root/packages-day1.txt
whmapi1 listresellers > /root/resellers-day1.txt
whmapi1 get_license_info
df -h ; free -h ; uptime

Day 2 (state):

crontab -l > /root/root-crontab-day1.txt
for u in /var/spool/cron/*; do echo "==> $u" >> /root/user-crontabs.txt; cat $u >> /root/user-crontabs.txt; done
whmapi1 get_autossl_problems > /root/autossl-day1.txt
exim -bp | wc -l ; exim -bpc

Day 3 (security):

cat /root/.ssh/authorized_keys > /root/ssh-keys-day1.txt
ls /etc/sudoers.d/ > /root/sudoers-day1.txt
csf -l > /root/csf-rules-day1.txt
whmapi1 get_root_login_status

Day 4 (monitoring):

journalctl -p 3 --since "7 days ago" | grep -iE "error|fail" | sort | uniq -c | sort -rn | head -50
# Apache top consumers in the last week
goaccess /usr/local/apache/domlogs/*.log -o /tmp/goaccess.html

The fix

  1. Capture before you change — make every Day 1–4 capture above before touching configuration. The baseline is your reference forever.
  2. Identify the load-bearing accounts — the top 10 by disk, by traffic (goaccess), by mailbox count, by AutoSSL last-renew date. These are the customers who notice first when something breaks.
  3. Find undocumented automation — root crontab entries, scripts in /root/, systemd units installed by hand. Discuss before deleting; they may be load-bearing in ways the new owner does not know.
  4. Update licenses and OS — /usr/local/cpanel/cpkeyclt, yum/dnf update --security. Schedule the full update for week two, after baseline.
  5. Document at the end of the week — write a 1-page handover with: account count, packages, license state, AutoSSL state, top users, known surprises. This is what you ship if you have to hand off to someone else.

The runbook is more valuable as an artifact than as a one-time exercise. Stack Harbor packages takeover runbooks under WHM server management — start a conversation before the inheritance starts.