Solution for the Error: “Your n8n server is configured to use a secure cookie, however, you are visiting this via an insecure URL”

Solution for the Error: “Your n8n server is configured to use a secure cookie, however, you are visiting this via an insecure URL”

No, the solution is not to set N8N_SECURE_COOKIE to false. Also, setting N8N_SECURE_COOKIE to false and then using Cloudflare for SSL does absolutely nothing, because the traffic between Cloudflare and the origin server would still be unencrypted. The supposed solutions on YouTube are close to crazy.

The easiest way is to first prepare a real subdomain for the n8n instance. Then we point the subdomain to the corresponding IP via DNS.

We then set the following environment variables in Coolify or Docker:

WEBHOOK_URL=https://n8n.example.com
N8N_PROTOCOL=https

n8n.example.com is of course only used here as an example and yes, the spelling is intentionally without :5678

In addition, the domain must be changed under General, Services, N8N, again with https://n8n.example.com without port

After a restart, N8N will automatically obtain an SSL certificate after a few minutes and N8N can then be used with SSL encryption and the setup can be continued.

Attention: The respective server should be protected, SSH and Coolify Admin Ports should be closed.

Leave a Reply

Your email address will not be published. Required fields are marked *