How to install and setup fail2ban v5 on WordPress VPS?

I’m about to set up a new WordPress VPS, and I’ll have to install and set up fail2ban v5 from scratch, and I’ve been searching online for guides on how to do this, but I have only found guides for version 4.x.
My question is that since there are changes from v4.x to v5, does a guide meant for version 4.x will still apply to set up v5 for a WordPress server?
If not, can someone point me to a tutorial to accomplish this successfully?