Intelligent, interactive doctor that diagnoses, applies and removes fixes (patches) for known cPanel/WHM problems.
Project description
cPanel Doctor
Diagnose and fix known cPanel/WHM problems — intelligently, interactively, reversibly.
cPanel Doctor models each fix as a patch made of independent components. It knows whether a patch is applicable, fully applied, not applied, or drifted (partly reset — e.g. by a cPanel update), and it can apply, re-apply only the drifted bits, or cleanly remove a patch. There's a colourful Textual TUI and a scriptable CLI.
┌ cPanel Doctor v0.2.0 ──────────────────────────────────────────────┐
│ ID Status Patch │
│ account-startdate APPLIED New accounts' creation date (past) │
│ https-redirect-date APPLIED Force HTTPS Redirect (past date) │
│ pg-cpses APPLIED phpPgAdmin / PostgreSQL cpses login │
│ post-upcp self-heal hook: installed (System::upcp post) │
└─────────────────────────────────────────────────────────────────────┘
Install
pipx install cpanel-doctor # recommended
# or
pip install cpanel-doctor
Requires Python 3.8+ (cPanel's system Python may be older — use pipx,
a venv, or your distro's newer Python). Most actions modify system files and
need root.
Use
cpanel-doctor # interactive TUI (default)
cpanel-doctor list # one-line status per patch
cpanel-doctor status pg-cpses # detailed, per-component status
sudo cpanel-doctor apply pg-cpses
sudo cpanel-doctor apply pg-cpses --dry-run # preview, change nothing
sudo cpanel-doctor remove pg-cpses
cpanel-doctor test pg-cpses # functional self-test
sudo cpanel-doctor hook install # self-heal after cPanel updates
TUI keys
a apply · r remove · h re-apply drift · t self-test · k toggle hook ·
d refresh · q quit.
Self-healing after upcp
cPanel updates overwrite vendor-managed files (for pg-cpses, phpPgAdmin's
config.inc.php/intro.php), which drifts a patch. Install the hook once:
sudo cpanel-doctor hook install
It registers a cPanel Standardized Hook on System::upcp (post stage) that runs
cpanel-doctor reapply after every update, healing only the drifted components.
Patches
Three patches ship today — see PATCHES.md for full descriptions, security notes and a guide to writing your own.
| ID | Fixes |
|---|---|
account-startdate |
new accounts recorded with a creation date in the past |
https-redirect-date |
greyed-out Force HTTPS Redirect toggle |
pg-cpses |
phpPgAdmin "Authentication failed" (broken pam_cpses.so) |
New patches are auto-discovered — drop a Patch subclass in
cpanel_doctor/patches/ (see PATCHES.md).
Safety
--dry-runpreviews every action without touching the system.removereverses each component (restoring.origbackups where taken).- Read-only
status/list/testnever change anything and don't need root.
License
MIT © crocky.host
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cpanel_doctor-0.2.0.tar.gz.
File metadata
- Download URL: cpanel_doctor-0.2.0.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0bea99419fcfb7bb5d055a8d64c5213afc43cdfaabe0b8e45aa07b99930aa3b
|
|
| MD5 |
d7b73c7b1c8b79c7317e6cf48c5dbad0
|
|
| BLAKE2b-256 |
227b3eeb6b938f79a55d4972aa2805bc94eafe6c94c419b7aad9c0f365952d31
|
Provenance
The following attestation bundles were made for cpanel_doctor-0.2.0.tar.gz:
Publisher:
release.yml on CrockyHost/cpanel-doctor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpanel_doctor-0.2.0.tar.gz -
Subject digest:
f0bea99419fcfb7bb5d055a8d64c5213afc43cdfaabe0b8e45aa07b99930aa3b - Sigstore transparency entry: 1959424058
- Sigstore integration time:
-
Permalink:
CrockyHost/cpanel-doctor@45c5fadd2e9fbd224c5fdb6389f56c7b30350e8b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/CrockyHost
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@45c5fadd2e9fbd224c5fdb6389f56c7b30350e8b -
Trigger Event:
push
-
Statement type:
File details
Details for the file cpanel_doctor-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cpanel_doctor-0.2.0-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f3a7533af03ca15a0a8d6e9521c96fa714b162ae50184c18306517dca3c2563
|
|
| MD5 |
90e83355479e796315eac54ed1fc84dd
|
|
| BLAKE2b-256 |
f091c957b5290e87cdcda31e3e116b61387551949c0d0d6653a4d12e53dc3d18
|
Provenance
The following attestation bundles were made for cpanel_doctor-0.2.0-py3-none-any.whl:
Publisher:
release.yml on CrockyHost/cpanel-doctor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpanel_doctor-0.2.0-py3-none-any.whl -
Subject digest:
8f3a7533af03ca15a0a8d6e9521c96fa714b162ae50184c18306517dca3c2563 - Sigstore transparency entry: 1959424537
- Sigstore integration time:
-
Permalink:
CrockyHost/cpanel-doctor@45c5fadd2e9fbd224c5fdb6389f56c7b30350e8b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/CrockyHost
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@45c5fadd2e9fbd224c5fdb6389f56c7b30350e8b -
Trigger Event:
push
-
Statement type: