code:401,"message":"Authorization is required!"

Hi! my name is Rodrigo and I am new member here.
I have installed n8n on a Digital Ocen server, following this documentation.

Apparently I do everything without problems but when I want to make the first login with the credentials that I put in the .env file, they are not valid and after several attempts the error is {“code”: 401, “message”: " Authorization is required! "}

I access https://n8n.mydomain.com

I have done several tests repeating the process and I was not successful.
I do the installation as root and step 2, which is optional, I don’t apply.

The operating system of my server is Ubuntu 18.04

Where may I be failing? Thanks!

Welcome to the community @rodrigoperez!

Very strange. Did you use some kind of special characters in the password or username? Maybe it sets it to something different than you think. I would try to set both to something simple just with a-z characters for testing and see if that makes a difference.

If you start the setup with just sudo docker-compose up so without the -d do you see any error messages?

Hi @jan! thanks for you support.
If I start the setup with just sudo docker-compose up so without the -d I see this messages:

about my username and password they are very simple, only few letters

the question I have is with step 7, when I create the data folder. I just run the command “mkdir / root / n8n” and my terminal does not perform any action, is that correct? or am I missing something?

thanks a lot!

Sounds all correct to me. Do you have the files docker-compose.yml and .env all in the same folder?

Apart from that, it is maybe best to simply start over again. Reset the server and then start again from the beginning. It is probably simply faster to do that than looking for what went wrong in-between.

I installed n8n as a test, following that guide, last around 1 week ago and it worked perfectly fine. So there should be nothing wrong with the guide.

that’s right, I don’t see it so complex. Help me also by following the step by step with a YouTube video.
I destroyed the server 4 times and started again. At first I did it connecting with Putty from Windows, now I tried to do it with Terminal on my Mac and everything remains the same. Honestly, I don’t understand what could be happening to me.
I’m going to try incorporating optional step 2 to see what happens. Thanks a lot!

Very confusing and sorry that I can not help you here. But have sadly not the slightest idea what is going on there.

My test I did also do on DigitalOcean. The only thing that was different is that I used Ubuntu 20.04. But can not see right now how that should make a difference.

Hope someone else maybe has an idea how to help you.