Hardening nextcloud with cloudflare

Hi, I have installed nextcloud with cloudflare in front of it, I would like to know if it is possible with snap to install also the mod for apache “remoteip” to see the original ip and not those of cloudflare and a WAF as modsecurity. I don’t know if having used snap it’s possible to do this.