Self-hosted n8n: Basic Auth not working - always redirected

I set up n8n with docker on a Hetzner cloud server. Everything works fine.

Except for the basic Auth not working.
I specified the following in the .env:

N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=Chris
N8N_BASIC_AUTH_PASSWORD=mypass

But still the n8n login shows up.
The URL contains redirect.

Running n8n 1.64 via Docker.

On a hetzner server with Ubuntu.

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

n8n v1 dropped support for all external auth mechanisms over a year ago.
currently there is no officially supported way to put n8n behind basic auth.

Okay. Thank you. So I spent 6 hours doing nothing. :smiley:
One more thing: I thought Basic Auth to make my n8n more secure. I’m concerned about client data being stolen. Is there any other way to make my n8n install more safe? Thanks in advance!

Does the native auth mechanism (with users and auth cookie) in n8n not work for your usecase?

It works fine. If you mean the process with the standard n8n login screen.
What is meant by auth cookie?