Setting password

When I try to set a password for basic auth I can’t get it to work. If I set it to “password” that’s fine. But anything other than that simple word fails. Are there rules to what the password can be?

@technovangelist welcome to the community.

I guess it works with password cuz it’s the default value. Did you check link below? How are you running n8n?

I did see the docs. If I change it to something else then password no longer works but what I set it to doesn’t work either

Is what you set the password to going to be the password? Or is that a base64 representation of it or something else? Are there restrictions on size, characters used? Could it point to a directory not being writeablenor anything like that?

Sadly I do not know those details for sure. When @jan is available, he will answer.

I certainly cannot remember good long passwords, so i use 1password. But there seemed to be a problem with the way 1password does the copy and paste. This is the only tool i have that uses basic auth so never encountered it before. I added the 1passwordX chrome extension vs the regular 1password extension and it copies the password correctly.

Correct, what you set is the actual password (no base64 encoding or anything). I just tested it, it works totally fine for me also via a .env file.

The file would then look like this:

N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=user
N8N_BASIC_AUTH_PASSWORD="[email protected]!d:f"

Make sure to use quotes around the password if you want to use special characters, else bash will not set the environment variable correctly and the password will not work (as it sets the password also to that wrong value).

1 Like