Paper Lantern for cPanel accounts is being retired this year. Find out more »
cPanel & WHM Version 102 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Create a better structure in cpanel.config

David Majchrzak shared this idea 7 years ago
Open Discussion


Currently /var/cpanel/cpanel.config contains:




which makes it difficult to parse using Augeas or other tools.

It would make sense to switch to a key=value structure for those with empty values or those with only keys for easier management with devops.

Replies (3)


Given the sheer amount of working pieces of the product that rely upon this config and its current deployment, the concept of re-designing it would potentially be very complicated. It is unlikely that this would be done simply to address the nuances of a 3rd party config editor program for a file we do not expect users to have to edit manually.

On face value, it would simpler to write a regular express or two to correctly interpret the configuration within the config editor parser. I'd love to hear the use cases on why an external configuration tool is being utilized. While we do support manually editing this config file, it's not anticipated that users will need to do so frequent -- much less so with a 3rd party config editor.

What is necessitating the extra power of the external editor? Perhaps we can tackle any UI inefficiencies and problems.


Our recommended methods of changing the cpanel.config file are:

1. Via the Tweak Settings UI in WHM; or

2. Via the get and set tweak settings API calls.

The cpanel.config is intended to be managed by cPanel & WHM itself, not by external applications. At least not directly.


Is there any way to close old requests? I'm satisfied with Ken's answer :)

Leave a Comment
Attach a file