Snap installation fail2ban

If anyone can direct me or have instructions on how to configure fail2ban on a snap installation of NC 12

Not snap, but you can use NextCloudPi that comes with fail2ban preconfigured.

Or you can study the source code and do it yourself.