1. Introduction
The /var/cpanel/cpanel.config file is the central configuration file for WHM and cPanel. Every option you modify inside WHM’s Tweak Settings interface is ultimately stored in this file.
If the file is missing, cPanel automatically recreates it using the default template located at:
/usr/local/cpanel/etc/cpanel.config
Important Notes:
- Dynamic values should not be edited manually. Always change them through WHM → Tweak Settings.
- The cache file
/var/cpanel/cpanel.config.cache is regenerated automatically whenever the main file changes.
2. Key Groups and Descriptions
General / System Settings
| Key | Tweak Settings Section | Description / Default Value | Notes |
| engine | — | cpanel | Do not modify. |
| engineroot | — | /usr/local/cpanel | Do not modify. |
| enginepl | — | cpanel.pl | Do not modify. |
| root | — | /usr/local/cpanel | Do not modify. |
| conserve_memory | — | 0 | Dynamic — change only via WHM. |
| maxmem | — | 4096 | Max memory for cPanel processes (MB). |
| maxcpsrvdconnections | — | 200 | Maximum concurrent cpsrvd connections. |
Security / Login & Authentication
| Key | Tweak Settings Section | Description / Default Value | Notes |
| cgihidepass | Security → Hide login password | 0 | Hides login password from CGI scripts. |
| cookieipvalidation | Security → Cookie IP validation | strict | Modes: strict / loose / off. |
| domainowner_mail_pass | Mail → Mail authentication | 0 | Dynamic — domain owner can authenticate mail. |
| resetpass | — | 1 | Allows cPanel password reset. |
| resetpass_sub | — | 1 | Allows sub-account password reset. |
| requiressl | Security → Require SSL | 1 | Forces SSL for WHM/cPanel/Webmail. |
Email / Mail Settings
| Key | Tweak Settings Section | Description / Default Value | Notes |
| exim_retention_days | Stats and Logs | 10 | Retention for Exim stats. |
| exim-retrytime | Mail → Retry time | 15 | Retry interval in minutes. |
| eximmailtrap | Mail → Track email origin | 1 | Enables X-Source header. |
| mailbox_storage_format | Mail → Mailbox format | maildir | maildir or mbox. |
| popbeforesmtp | Mail → POP-before-SMTP | 0 | Allows relay after POP login. |
| smtpmailgidonly | Mail → Restrict outgoing SMTP | 1 | Only root, exim, mailman can send SMTP. |
DNS / Domains
| Key | Tweak Settings Section | Description / Default Value | Notes |
| autocreateaentries | Domains → Auto A entries | 1 | Adds A records for nameservers. |
| autodiscover_host | Domains → SRV host | cpanelemaildiscovery.cpanel.net | Used for autodiscover. |
| proxysubdomains | Domains → Service subdomains | 1 | Dynamic — enables cpanel., webmail., whm. |
| proxysubdomainsoverride | Domains → Override | 1 | Allows overriding A records. |
PHP & Apache
| Key | Tweak Settings Section | Description / Default Value | Notes |
| php_max_execution_time | PHP → Max execution time | 90 | Seconds. |
| php_memory_limit | PHP → Memory limit | 128 | MB. |
| php_post_max_size | PHP → Max POST size | 55 | MB. |
| php_upload_max_filesize | PHP → Max upload size | 50 | MB. |
Stats & Logs
| Key | Tweak Settings Section | Description / Default Value | Notes |
| cycle_hours | Statistics Software | 24 | Rounded to nearest 15 minutes. |
| dumplogs | Stats and Logs | 1 | Deletes access logs after stats processing. |
| keepftplogs | Stats and Logs | 0 | Keeps master FTP log. |
| keeplogs | Stats and Logs | 0 | Keeps monthly logs. |
Notifications & User Alerts
| Key | Tweak Settings Section | Description / Default Value | Notes |
| emailusers_diskusage_critical_percent | Notifications | 90 | Critical disk usage alert. |
| emailusers_diskusage_full_percent | Notifications | 98 | Full disk alert. |
| emailusers_diskusage_warn_percent | Notifications | 80 | Warning threshold. |
| emailusersbandwidthexceed | Notifications | 1 | Bandwidth limit exceeded alert. |
3. Important Notes
- Do NOT manually edit dynamic keys. Always use WHM → Tweak Settings.
- After manual edits, restart cpsrvd:
/scripts/restartsrv_cpsrvd
- If the file is missing, cPanel regenerates it from the default template.
4. Viewing or Editing the File
cat /var/cpanel/cpanel.config
nano /var/cpanel/cpanel.config
Conclusion
The cpanel.config file is the core of WHM’s configuration system. Understanding its structure and key values allows administrators to manage cPanel behavior with precision and avoid misconfigurations. Always modify dynamic values through WHM and allow cPanel to manage caching automatically.
Written & researched by Dr. Shahin Siami