[How-to] CSF Support in Hestia CP

CSF is actually a firewall which includes a brute force protection daemon, very similar to fail2ban.

It’s up to you whether you stick with firewallD & fail2ban or switch to CSF.

I personally prefer CSF over fail2ban due to multiple reasons:

  1. Complexity
  2. Web GUI + Hestia (Vesta) integration
  3. Can be used in conjunction with fail2ban (if needed) as a complement

@donko & @jorgepala - Updated tutorial for Hestia CP v1.1.0+

Please let me know whether the update is working for you.

1 Like

if setting up a new server would you exclude fail2ban and iptables from the install script or just fail2ban?

Plan to do a new install in deb 10


@bubblecatcher - you can just comment out firewallD & Fail2ban if you gonna use CSF as an alternative.


just a quick note, i just did an install on fresh debian 10 HestiaCP install and did not need to make the edits to:
For Hestia CP v1.1.0+ it is also required to edit the following file:

They were already there and can see menu item in hestiacp

@bubblecatcher - Thanks. The given step is applicable only when upgrading from older versions. How-to fixed.

Thanks for this How-to. I’m running a clean image of Ubuntu 18.04. I followed the steps and got it working with the following additions:

  • apt install rename
  • apt install libwww-perl
  • cd /etc/csf
  • vim csf.conf
  • Update line SYSTEMCTL = "/bin/systemctl"

Have you followed steps from the tutorial prior upgrading to Hestia CP 1.2.0?

CSF does not officially support Hestia CP if I am not mistaken.

Seems like the rename command did the trick, not new version of CSF.


I’m sure it does, did you see the last line ?

sh install.hestia.sh

That file doesn’t actually exist in the standard csf.tgz download. Its created by running the following command

find . -type f -exec sed -i 's/VESTA/HESTIA/g' {} + && \
find . -type f -exec sed -i 's/Vesta/Hestia/g' {} + && \
find . -type f -exec sed -i 's/vesta/hestia/g' {} + && \
rename 's/VESTA/HESTIA/' * && \
rename 's/vesta/hestia/' *

@pluto - Yup. Thanks for confirmation.

@Active8 - I will keep the install tuto as is. Have you downloaded different CSF version elsewhere?

Feel free to check also CSF changelog - there is no mention of Hestia CP.

Also guys, if you really enjoy CSF integration (as do I) with Hestia CP – kindly please raise your hand @ CSF FORUM so that we have official integration available without any hacks.

Thanks :grinning:

@martineliascz Thanks for sharing,

To All, I tried it on my production server with Ubuntu 20.04 and Hestia 1.2.0 RC 2.
Everything works find and great.

Go ahead and try it yourself.


1 Like

Aagh you are right :frowning:
Because i had used before the file was created in that directory , so I assumed that came with a fresh download of CSF
Sorry for the confusion…

Hi, i upgraded to 1.2 and now no csf in hestia?

Is it just a case of following install guide again?


Currently all changes are made in the template code are lost on update / upgrade. For a futher version we are considering changing the system so the changes are kept.

Again this is not a official supported package.

@bubblecatcher - Yep, please perform the aforementioned steps once again.

@eris - That would be cool! If you haven’t tried CSF, considering giving it a shot - you won’t regret it for sure! :wink:

Do I really have to bug you to make it official, again? :stuck_out_tongue:
It would help that other guy, in the other thread, that’s getting bombarded by attack etc. :wink:
Gonna try to install on my freshly installed Hestia…

Debian 10

find . -type f -exec sed -i ‘s/VESTA/HESTIA/g’ {} + &&
find . -type f -exec sed -i ‘s/Vesta/Hestia/g’ {} + &&
find . -type f -exec sed -i ‘s/vesta/hestia/g’ {} + &&
rename ‘s/VESTA/HESTIA/’ * &&
rename ‘s/vesta/hestia/’ *
-bash: rename: command not found

Installed now.

@AlwaysSkint - Aha. Pls try “apt install rename -y” in terminal…