NPM remediation component can't reach LAPI due to certificate error
proxy-host-6_error.log:2025/09/06 04:41:52 [error] 241#241: *1782 [lua] live.lua:39: live_query(): failed to query LAPI https://crowdsec.local.rxample.net/v1/decisions?ip=192.168.1.52: 20: unable to get local issuer certificate, client: 192.168.1.52, server: homeassistant.example.net, request: "POST /api/webhook/wow HTTP/1.1", host: "homeassistant.example.net"
The crowdsec log processor and curl etc. in the same machine can reach the LAPI just fine.
My LAPI runs in a separate machine reachable through https://crowdsec.local.example.net inside the local network.
Other log processors running in home assistant and it's bouncer can also connect with the LAPI without issues.
I also changed to lua_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt; inside the container non persistent file but that didn't help either.
So, 1. NPM container should give the option to change certificate path in persistent storage, and 2. Even after that, it seems to be unable to connect.
I have since exposed 8080, and connecting in a non secure manner
9 Replies
Important Information
This post has been marked as resolved. If this is a mistake please press the red button below or type
/unresolve
© Created By WhyAydan for CrowdSec ❤️
Looks similar to this
https://discourse.crowdsec.net/t/unable-to-get-local-issuer-certificate/1687/2
CrowdSec
Unable to get local issuer certificate
It well may be that my configuration is dumb or i didn´t get something correctly. All domains and subdomains are proxied via NPM. In crowdsec console i can see bouncer just okay. I can see alerts in console as well. LAPI endpoint is publicly accessible via https:// domain2.com and its subdomains are behind cloudflare proxy
API calls from inside the nginxproxymanager container also works fine:
OK folks I found the issue and submitted a pull request - https://github.com/LePresidente/docker-nginx-proxy-manager/pull/20
Would appreciate a quick review/feedback please. Thanks!
GitHub
Point to correct certificate for NPM by priyankub · Pull Request #...
Current build fails to reach out to LAPI at a remote location if LAPI is accessible through a URL eg. https://crowdsec.local.example.com. It works only if LAPI is reached through its IP with 8080 p...
btw LePresidente announced couple months back that he will be deprecating that NPM image hence why we dont promote it anymore, if you want to stay updated and want to use NPM the only alternative with CrowdSec is NPMPlus.
OK. I created another patch - https://github.com/LePresidente/docker-nginx-full/pull/1
Do you know if NPMPLus also has this same issue?
NPMPlus is quite good! Just got it up. Handles cert correctly as well
awesome to hear, yeah were sad to see LePresidente image go, but they have moved on to using Pangolin so all the power to them as we are talking to the founders and they are pretty great guys 😄
Resolving NPM remediation component can't reach LAPI due to certificate error
This has now been resolved. If you think this is a mistake please run
/unresolve