Setting up crowdsec (native on host) with nginx proxy manager (running in docker)

Yes i know i know, there are some tutorials and even youtube videos about this topic. Also a tutorial from the crowdsec team itself.
BUT all those tutorials are about the lepresidente/nginx-proxy-manager docker image. Sadly, one of the biggest issues is: the nginx web ui isn’t working anymore (which is also confirmed from several users). So i still wanrt to use the good old NginxProxyManager/nginx-proxy-manager.

This is my nginx proxy manager docker compose file:

services:
app:
container_name: nginx_proxy_manager
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
networks:
- proxy_network
environment:
TZ: "Europe/Berlin"

networks:
proxy_network:

Which is working flawlessly. The web ui is reachable and about the last couple of month i can add hosts and managed those wiuth this reverse proxy. So far so good.

But now i want to secure the proxy with crowdsec. Is there a tutorial or a good documentation how to do this with NginxProxyManager/nginx-proxy-manager one INSTEAD the lepresidente image? All nginx log files are mounted from the nginx docker container on my host at ~/docker/nginxproxymanager/data/log/*.log . Basically what i want: running npm in docker container. Running crowdsec native on my host (WITHOUT docker).

So you can use the jc21 image with CrowdSec the only thing that is missing is the remediation which if you are not using cloudflare this is fine as you can use the firewall remediation and block IP’s on the firewall level before it passed to docker and into NPM.

If you are using cloudflare with proxy enabled then your pretty stuck since on layer 4 all the firewall can see if cloudflare IP and not the IP that is being proxied in headers. So for that you either have to switch to other image such as npmPlus or lepresidente one.