Add Cyberpanel Control Panel Support

7 posts Page 1 of 1
whattheserver
Junior Member
Posts: 6
Joined: 03 Oct 2019, 04:40


Cyberpanel is a new and amazing opensource Control panel that supports Ubuntu and Centos.
https://cyberpanel.net/

Github:
https://github.com/usmannasir/cyberpanel

It uses Postfix/dovecot for email.

Openlitespeed/Litespeed for the webserver.

Overview of log files and differences.

Cyberpanel Control Panel Accesslog
/usr/local/lscp/cyberpanel/logs/access.log

Cyberpanel Control Panel errorlog
/usr/local/lscp/cyberpanel/logs/error.log

Cyberpanel Control Panel stderr.log
/usr/local/lscp/cyberpanel/logs/stderr.log

Cyberpanel Control Panel logs and rotated logs.
/usr/local/lscp/logs/


csf.logfiles csf.syslogs
# CyberPanel
/home/cyberpanel/error-logs.txt
/usr/local/lscp/cyberpanel/logs/error.log
/usr/local/lscp/cyberpanel/logs/access.log
/usr/local/lscp/cyberpanel/logs/stderr.log

csf.syslogs
# Litespeed/Openlitespeed
/usr/local/lsws/logs/error.log
/usr/local/lsws/logs/access.log
/usr/local/lsws/logs/auditmodsec.log


Ubuntu
This file contain email logs for postfix/dovecot
/var/log/mail.err
/var/log/mail.log

Auth
/var/log/syslog
/var/log/auth.log

Iptables log
/var/log/kern.log


Centos 7

sshd
/var/log/secure

FTP
/var/log/messages
tail -f /var/log/messages

Maillog
/var/log/maillog


Right now it has very minimal support. I have been working to try to add support via Python code but it would be nice to have an official plugin.

Github pages for the current code.
https://github.com/usmannasir/cyberpane ... cal/csf.py
ForumAdmin
Moderator
Posts: 1444
Joined: 01 Oct 2008, 09:24


We're working on incorporating the csf UI into CyberPanel as a plugin. It's proving tricky with python/django but we seem to be getting there. Hopefully we'll have something available soon.
whattheserver
Junior Member
Posts: 6
Joined: 03 Oct 2019, 04:40


You should try the native one I modded or check it out as a reference. It works nicely in both centos & Ubuntu for setting defaults. I have not added all the options to toggle the 300+ settings in the UI but all the important stuff is all set up during install now unlike it was before.

View
https://github.com/usmannasir/cyberpane ... cal/csf.py


cd /usr/local/CyberCP/plogical/
mv /usr/local/CyberCP/plogical/csf.py /usr/local/CyberCP/plogical/csf.py-bak
wget -O /usr/local/CyberCP/plogical/csf.py https://github.com/usmannasir/cyberpane ... cal/csf.py

Then to refresh the static files

See code here
https://github.com/usmannasir/cyberpane ... upgrade.sh

Use code:
wget -O /usr/local/CyberCP/upgrade.sh https://github.com/usmannasir/cyberpane ... upgrade.sh
chmod +x /usr/local/CyberCP/upgrade.sh

Then run this and give it a few minutes to clear cache and restart cyber panel daemon
bash /usr/local/CyberCP/upgrade.sh

Looking forward to seeing your plugin either way that will be sweet.
ForumAdmin
Moderator
Posts: 1444
Joined: 01 Oct 2008, 09:24


Thank you for that. I had decided to using the native UI as I've been finding the plugin functionally unreliable and twice ended up with corrupt cyberpanel installs. I've found a way to use the complete ConfigServer csf UI as found on other control panels, so it would be a complete replacement, though within a install option which would need to be done from shell.
whattheserver
Junior Member
Posts: 6
Joined: 03 Oct 2019, 04:40


lol yeah, we both came to the same conclusion.. it seemed a lot easier than reinventing the wheel.

See this code which I added to the cyberpanel CSF installer which will do this for you going forward.
https://github.com/usmannasir/cyberpane ... py#L62-L72
https://github.com/usmannasir/cyberpane ... #L286-L296

More about it in:
https://forums.cyberpanel.net/discussio ... mment_6546
ForumAdmin
Moderator
Posts: 1444
Joined: 01 Oct 2008, 09:24


I've found a way to do it within django/python without needing the csf UI by using an iframe in a template and a perl interface script to the csf UI perl module. This is done by utilising ProcessUtilities.outputExecutioner and a temp file for passing POST and GET data. This is a technique we've used successfully with other control panels and programming languages.
whattheserver
Junior Member
Posts: 6
Joined: 03 Oct 2019, 04:40


badass if you don't mind sharing id be happy to try to add that mod into the core functions.
7 posts Page 1 of 1