Cloudflare CERT_LOCALLY

Describe the problem/error/question

Recently we have added Cloudflare as our Zero Trust provider, I´m running n8n locally via npm. Since than I get this error: UNABLE_TO_GET_ISSUER_CERT_LOCALLY when using the groq node.

I found this:

Issue: UNABLE_TO_GET_ISSUER_CERT_LOCALLY with Node JS when calling endpoints

Reason: System certificates being ignored by Node JS on Mac M1 Sonoma

Solution:

  1. From launchpad type keychain then open up KeyChain Access

  2. Find the Cloudflare for Teams ECC Certificate Authority and export it to a .pem file with the name CloudflareTeams.pem (will be saved to your Documents folder)

  3. At the top of your .bash_profile (or choose the profile for the shell you are using), add the following line:

  4. export NODE_EXTRA_CA_CERTS=$HOME/Documents/CloudflareTeams.pem

  5. Open a new shell, node should be able to connect to endpoints giving issues previously

But seems not to work.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:1.54.0
  • **Database (default: SQLite):Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):npm
  • **Operating system:macOS
1 Like

Looks like a good solution thanks for sharing @Kool_Baudrillard.

:smiley: But seems not to work - at least for me.

I missed that bit, the solution you have should work. It could be that the env option isn’t picking up correctly or the cert format needs tweaking. When we added an option to the docker image we also had to tweak the cert files as well, check out the commands here: n8n/docker/images/n8n/docker-entrypoint.sh at master · n8n-io/n8n · GitHub

It may be worth using the docker image as well as it is the recommend option and there is less that can go wrong.