Crowdsec and Immich #1241
-
Hi, I recently migrated from a working nginx-proxy-manager + crowdsec (+ cloudflare) install to NPMplus + crowdsec. I thought everything was working nicely but it turns out that local backups to Immich are now failing, which I'm pretty sure is due to Crowdsec, even when uploading on the LAN. Stupidly, I deleted the old stack with all its config so I'm not entirely sure what I'm missing (and I didn't take any notes!) but I think that when it was working it was thanks to the suggestions in this thread: immich-app/immich#3243 Alas it doesn't seem to help with npmplus and now I'm at a bit of a loss. Before I get too far into the weeds trying to bodge something together, has anybody got a working example that I can crib from? Thanks in advance... |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 21 replies
-
any docker logs? |
Beta Was this translation helpful? Give feedback.
-
If you open a console in portainer/use docker exec on the crowdsec container, what does If you're sure crowdsec is causing it you can always whitelist the local IP (something I recommend you always do to prevent embarassing lock-out situations or strange APIs that work over intranet anyway), should it disappear then it's confirmed, you might wanna see in the decisions list what rule got tripped and remove it from the crowdsec list. https://doc.crowdsec.net/u/getting_started/post_installation/whitelists/ |
Beta Was this translation helpful? Give feedback.
-
My apologies, I am seeing these comments but it's been one of those days and I've not found a moment to investigate further. Thanks for your replies, I'll get back to you as soon as I can! |
Beta Was this translation helpful? Give feedback.
-
OK, here we go:
Yes, I'm using a very non-standard local subnet but it falls within the 10.0.0.0/8 range that's (supposed to be) whitelisted in Crowdsec by default. As mentioned above I added the suggested whitelistings from this post (immich-app/immich#3243 (reply in thread)) which are like so:
Though looking at the logs, maybe the API endpoint has changed from Thanks for your help, both. It's massively appreciated. |
Beta Was this translation helpful? Give feedback.
-
To conclude the current state:
If you have any further useful information you can also leave it here: crowdsecurity/lua-cs-bouncer#77 |
Beta Was this translation helpful? Give feedback.
-
@Zoey2936 That image is based on official npm, and adds crowdsec-openresty-bouncer and appsec. Immich works perfectly fine with it, even with appsec enabled. |
Beta Was this translation helpful? Give feedback.
-
Will appreciate so much if Zoey or anyone else can provide a solution for this. Just switched to NPMplus and this issue is preventing me directly from editing my backend blog post, super frustrating already |
Beta Was this translation helpful? Give feedback.
-
Ok, so i have a theory as to why lepresidente/nginx-proxy-manager works, and npm-plus doesn't work. Here are my most recent nginx logs from my immich instance. This is the default appsec configs for that image:
So, i think if we manage to find out why the communication issue between nginx and appsec is failing, we will have solved this issue. |
Beta Was this translation helpful? Give feedback.
To conclude the current state:
APPSEC_FAILURE_ACTION
topassthrough
(both are bad solutions) in/opt/npm/etc/crowdsec/crowdsec.conf
If you have any further useful information you can also leave it here: crowdsecurity/lua-cs-bouncer#77