Get 401 Unauthorized for all activities on self-hosted version

Describe the problem/error/question

I have just installed n8n tool on my company’s kuberetes by using this helm chart: GitHub - 8gears/n8n-helm-chart: A Kubernetes Helm chart for n8n a Workflow Automation Tool. Easily automate tasks across different services.

When I tried to create Owner account, I got the 401 unauthorized error,
I tried to refresh the chart a few times, and sometimes I can be redirected to n8n ui, but then everything else (workflows, settings, etc.) got 401 authorized when I clicked on them as well. After that, I got kicked out to login page and got 401 authorized error in this page as well (screenshot).

My current setup is:

  1. Domain with SSL enabled: https://n8n.subdomain.mycompany.com
  2. Kubernetes cluster on Amazon EKS
  3. Amazon ELB
  4. Cloudflare with cname pointed to Amazon ELB

How can I solve this issue?

What did I have tried?

I have tried to setup this environment variables but no luck: N8N_SECURE_COOKIE=“false”

What is the error message (if any)?

  1. Failed to load resource: the server responded with a status of 401 ()
  2. Get: /rest/login, /rest/projects/ etc. 401

Information on your n8n setup

  • n8n version: 1.58.2
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Kubernetes, Helm chart, Amazon EKS
  • Operating system: Ubuntu 24.04

Realize that I missed the screenshot in the post

Hey @Dat_Citizendev,

Welcome to the community :tada:

I suspect you have a configuration issue somewhere possibly something with ELB or Cloudflare. Can you try connecting directly to your main instance using the IP for it and see if that works.

I would also make sure you have the editor url env option set to point to your main instance and that if you are using webhook workers you are not sending all traffic to those and only the /webhook/ paths.