Configure n8n to skip SSL

Hello All,

I’m a fresh user of n8n, and working toward installations quirks.

Problem/error/question

I need to create credential for local llm, but i need to disable SSL certificate controle
For now i use http request to get the job done, but it cuts me from all nice pre-built-in agent node.

As a first attempt, i set NODE_TLS_REJECT_UNAUTHORIZED = 0.
Which is confirmed when i start n8n

”Version: 1.108.2
(node:14028) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to ‘0’ makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use node --trace-warnings … to show where the warning was created)”

By doing that, in the credential window, instead of getting an ssl related error, i get.

I already created credential for a local LLM using LM studio without any issue. But the new LLM i’m targetting is on a server that i can only access via an HTTPS request. I’m not in capacity to change network configuration or the behavior of the server.

Does anybody knows how to work around that ?

What is the error message (if any)?

Please share your workflow

Not applicable

Share the output returned by the last node

Not applicable

Information on your n8n setup

  • n8n version: 1.108.2
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): vanilla using npm
  • Operating system: Windows 11

Hello Jc_Loko, welcome to n8n Community! I’ll try my best to help yaa.

I think you dont need to turn TLS off globally.

NODE_TLS_REJECT_UNATUHORIZED=0 is unsafe and still wont help the credential test or some nodes enforce verification. The reliable fix is to make Node trust your server’s cert, or to skip the credential test and keep TLS on.

Maybe there are several solution that i can suggest:

  • Export the server’s root/self-signed cert as PEM (e.g. ca.pem). Start n8n with Node pointing to that CA:

PowerShell (Windows, npm install):

$env:NODE_EXTRA_CA_CERTS="C:\certs\ca.pem"
$env:N8N_SKIP_CREDENTIAL_TEST="true"
n8n

Make it persistent:

setx NODE_EXTRA_CA_CERTS "C:\certs\ca.pem"
setx N8N_SKIP_CREDENTIAL_TEST "true"
  • Create the credential again (leave TLS on). This lets all HTTPS calls (inlc. Agent nodes) validate succesfully agains your CA.

Another tips:

You can skip only the credential test (fast, dev-friendly)

  • Set:
    • setx N8N_SKIP_CREDENTIAL_TEST "true"
      

And restart n8n, create the credential, and run a workflow. Runtime calls still verify TLS, if they fail.. you still need my first solution.

Maybe thats all i can suggest, hope this will be works. :blush::raising_hands:

Hello !

Thank you for your help.
I will try the various options for science and if possible stick to the solution with SSL fully enabled.

Thx
Jc

Hello,

Unfortunnatly none of these options worked.
I have merged the various certificates i have on my computer to create the pem files.
Looking at then with a text editor the structures looked ok, but even so it is still failling.

I suspect i’ll try to figure it out with IT.
Thanks again for helping though, i appreciate.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.