Full Fledged Interface for CSF

Can you add a full fledged dashboard for CSF like that in WHM or Webmin?


  • Guys you have to understand that the interface like in whm and webmin is made by the devs of csf, you guys have to convince them to create a plugin for cyberpanel.
  • we should be able to easily port that. The main issue is that the CSF cli doesn't allow you to add permanent port openings via command-line arguments yet.

    Suggested they port the --tempallow -ta port openings support to the main -a --allow functions. this would be ideal and make the webui wrapper much easier and less error prone for any control panel to integrate.

    This would allow us to reuse the existing interface setup for firewalld but just switch to the CSF version commands when CSF is installed.

    Option two:
    This could also be done via reading/writing to the /etc/csf/csf.allow file to load which current stuff is opened. This is already done to manage the globally open ports this option we could do right now without needing to wait on CSF to officially code anything.

    I'm still learning python but I have already written a PHP version of these port creation tools for CSF in PHP.
  • Well, I was able to export all the config variables names and then bulk generated the python code via a loop to be able to fetch the settings from the config based off the current examples. Going to need some more work to clean it up and probably structure it out under different subtabs. If anyone wants to give it a go:
  • I pushed a commit to repo with better integration of the log files and LFD which sets it up by default all good.

    I will start working on adding new features like checking blocked IP's and why it was blocked etc as I have time in the future.
  • the native CSF Web UI is now possible via the CSF installer for Cyberpanel in the latest patch committed and will use your Hostname SSL for signed SSL if available.

    So can do the simple stuff via the Cyberpanel UI for add remove ports/block/unblock IP's. Anything complex you can hop over to the CSF full UI on port:1025 and set it through that. More about that is in the link below.

  • If you are running the Cyberpanel upgrade script to 1.9.1 then you will need to do the work yourself.

    Well, that was my experience running the upgrade today.

    Edit /etc/csf/csf.conf




    I also had to add my local IP to the ui.allow even though the conf is setup to allow all IPs

    echo "your local IP" >> /etc/csf/ui/ui.allow

    The rest of the install needs to be carried out

    yum install bind-utils perl-libwww-perl net-tools perl-LWP-Protocol-https -y

    and the SSL certificate

    ln -s /usr/local/lscp/conf/cert.pem /etc/csf/ui/server.crt
    ln -s /usr/local/lscp/conf/key.pem /etc/csf/ui/server.key

    restart both lfd and csf for the changes to be put into action.

    service csf restart
    service lfd restart

    If you are now wondering where your admin login details are. You just saw them in the csf.conf :smile:

    Run csf -u whilst you are there to get the latest CSF version as you cannot run upgrades in the UI

    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
  • yeah the upgrade does not run this for you. Probably for the best as some people might have customizations that would get lost.

    For anyone else who wants to rapidly do this post upgrade see the below link

    Backup conf
    cp /etc/csf/csf.conf /root/csf.conf

    You could also use the below commands to modify the different things manually vs uninstalling.

    Mv the default ssl keys out of the way and create the symlinks.
    mv /etc/csf/ui/server.crt /etc/csf/ui/server.crt-bak; ln -s /usr/local/lscp/conf/cert.pem /etc/csf/ui/server.crt;
    mv /etc/csf/ui/server.key /etc/csf/ui/server.key-bak; ln -s /usr/local/lscp/conf/key.pem /etc/csf/ui/server.key;

    Specify your username and password in the below you want it to use
    sed -i 's/^UI_USER =.*/UI_USER = "username"/g' /etc/csf/csf.conf
    sed -i 's/^UI_PASS =.*/UI_PASS = "password"/g' /etc/csf/csf.conf

    Enable UI UI port and disable
    sed -i 's/^UI =.*/UI = "1"/g' /etc/csf/csf.conf
    sed -i 's/^UI_PORT =.*/UI_PORT = "1025"/g' /etc/csf/csf.conf
    sed -i 's/^UI_ALLOW =.*/UI_ALLOW = "0"/g' /etc/csf/csf.conf

    To restart both lfd/csf via -ra aka --restart-all
    csf -ra
  • edited October 2019
    If you are updating

    Username will have been set as: csfadmin

    Password as per the password you inputted at the point of Cyberpanel installation.

    Its a great addition to the full install so good job everyone.
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
  • edited November 2019
    I just update to CP 1.9.2. How do I access the CSF GUI? @whattheserver @hennaboy
  • If the menu is not present in the left menu above Plugins then install again. If you already have CSF installed run csf -uf
    Cyberpanel Managed & Unmanaged Shared & VPS Hosting by Cyberpanel Experts.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!