Xunnamius / supreme

⚡ CyberPanel fork leveraging both OpenLiteSpeed to deliver PHP at the speed of light and open source Nginx to unlock "enterprise" features for free.
GNU General Public License v3.0
3 stars 0 forks source link

Ability to easily edit all CP configuration parameters in one place #43

Open Xunnamius opened 1 year ago

Xunnamius commented 1 year ago

So there's the stuff in /etc/cyberpanel and the stuff in /home/cyberpanel and the stuff in the mysql configs and the stuff spread all over /usr/local/X and a whole buncha of stuff everywhere else.

Everything needs to be co-located under one directory. How about /home/cyberpanel. Everything else... everything will be stored inside this directory. Everything. That includes all the new user home dirs, all the related configs in /etc including for un-vendored externals and their configuration files (e.g. phpMyAdmin; this is likely achieved via bind mount) if they are installed by CP itself, all of the stuff that normally gets dumped into /usr/local, everything. I like Snappymail/Rainloop's approach to configuration files and source code: keep it close, keep it simple. The snappymail approach even allows for relatively simple updates (i.e. just extract the zip over the old directory and everything will be ok) with built-in backup of previous versions.

Also, new users that are created and managed by CP should have some common prefix. Perhaps supreme-X or supreme_X.

Also: it should not be hard to, for instance, change the user and password that CP uses to access MariaDB/MySql. Right now, it's painful.

Xunnamius commented 1 year ago

Also, why are the MariaDB login credentials stored in multiple places... or anywhere at all? Why not just use UDS authentication instead of this outdated username/password business?

Update: grepping through the source shows many references to /etc/cyberpanel/mysqlPassword. This is unfortunate, and perhaps something to address.

Xunnamius commented 1 year ago

Similarly, /root/.acme.sh and all that should be replaced by normal certbot, no? If not, centralize in /home/cyberpanel. Otherwise, delete it entirely if use chooses to use certbot No, acme.sh is the superior option. Also necessary for multi-dns single-cert renewal configurations. And I changed my mind again. After playing with acme.sh for a little while... back to using certbot.

Xunnamius commented 1 year ago

Corollary: all logs related to CP, OLS, should be centralized into one top-level directory (under the apex); perhaps /home/cyberpanel/logs by default (and then separated into subdirectories like nginx, litespeed, lscp, etc), and it should be possible to send logs to syslog/journald as well. There should also be an option to hardlink to /var/log (perhaps with periodic permissions fixes).

Also, easy debug-level logging output from CP itself should be toggleable.