Could not connect to Server on inital page setup owner account

Hi,

i thought i’m should now be able to setup N8N on Debian 13 in a docker environment, after walking against several problems in the past.

So i decided to throw away the past vms and install a brand new debian, with a brand new N8N installation, now with real accounts and so on.

But unfortunate it isn’t so. It looks so good, while installing, no errors occured. Docker came up with N8N, just NGINX and the certificate was missing. I’m using NGINX proxy manager, which looks and works fine. Setup can be made intuitive in the GUI, and secure the site with SSL.

But when initial loading the page with https, there is a error shown in the corner:

https was working out of the box, for me it’s seeming all ok. But there must be something …

I dont know if its normal or not, or if this was in the past days also like that … When i open the gui over IP and Port ….

… then it looks first ok (its telling me that i should use https instead of http). But if i scroll a page down, the same error is here again (I stumbled upon it by chance). I dont know if this was the same in the past, I didn’t scroll down there.

I dont know if its normal (when accessing over http instead of https), if such a error is displayed here. And if, it would also be much nicer, if this is not on the second page or somthing where I’ve to scroll first.

I am not aware of any mistakes, which of course does not mean that I might not have made one. But I had a feeling that it had to work now. But it does not.

Does anyone have an idea?

I tried one thing:

On a old existing VM it looks like that (when connection over http) …

And you can’t scroll down there.

On the new production machine it looks like that …

The Page is far longer. Don’t know if this helps, but might …

Ok, i tried to setup on a different machine. I only installed docker and after that n8n with POSTGRE SQL within the docker-compose.yml. When I’m trying to connect to http://IP:5678 then I get exactly the same error, the same situation.

I tried to shorten the POSTGRESQL Password to 8 chars to rule out that this is not the cause. This is my docker-compose.yml … the cause of this must be within that (i think):

services:
  n8n:
    image: n8nio/n8n:latest
    ports:
      - "5678:5678"
    restart: always
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=12345678
      - GENERIC_TIMEZONE=Europe/Berlin
    volumes:
      - n8n_data:/home/node/.n8n
    depends_on:
      - postgres
  postgres:
    image: postgres:14
    restart: always
    environment:
      - POSTGRES_USER=n8n
      - POSTGRES_PASSWORD=12345678
      - POSTGRES_DB=n8n
    volumes:
      - postgres_data:/var/lib/postgresql/data
volumes:
  n8n_data:
  postgres_data:

Either there is something wrong with the configuration above or in my installation instructions. But I always followed the official ones.

Maybe somebody knows what could cause this?

As you can see from the message on the page, the problem is that N8N_SECURE_COOKIE is set to true by default.

What you need to do to overcome this issue is either:

  • set the environment N8N_SECURE_COOKIE to false (under environments in your YML)
  • access your instance over https (this needs to be configured separately)

if it is all the same to you, the first option is much easier / quicker.

Unfortunately not. You can see above that I didn’t access the page via HTTP on the first attempt, but via HTTPS, as the error was shown me for the first time (with working certificate and active https encryption).

I added docker-compose.yml N8N_SECURE_COOKIE … now it looks like this:

services:
  n8n:
    image: n8nio/n8n:latest
    ports:
      - "5678:5678"
    restart: always
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=MySecurePWD
      - GENERIC_TIMEZONE=Europe/Berlin
      - N8N_SECURE_COOKIE=false
    volumes:
      - n8n_data:/home/node/.n8n
    depends_on:
      - postgres
  postgres:
    image: postgres:14
    restart: always
    environment:
      - POSTGRES_USER=n8n
      - POSTGRES_PASSWORD=MySecurePWD
      - POSTGRES_DB=n8n
    volumes:
      - postgres_data:/var/lib/postgresql/data
volumes:
  n8n_data:
  postgres_data:

Then docker compose up -d (i think this is neccesary)
… and then a reboot of the machine (just to be shure - don’t know if it’s neccesary)

But it changed nothing.

Well you can’t say it changed nothing… it went from showing an error about using a secure cookie to showing the login page.

Could you try to open the page in incognito mode? Or do a Force Reload?

Ok. Tried a different approach:

Installed Docker like described here …

Installed N8N like described here …

Its just Copy&Pasting. From the Installation it works OutOfThe Box, Docker is installed, after configuring yaml file and docker compose up -d it downloads … and starting up … all green … and get the certificate from letsencrypt.

But, when im trying to access https://n8n.mydomain.de (the site is runing with https) the same error is shown to me:

So, in other words. I tried a differnt approach and make the install like described in the manuals. All is working, but this error remains. Could that be a error which i cant fix it, because its deeper insiede the n8n image?!

I’ve spend now almost 2 Weeks to get that running. Setting up new VMs more than 20 times and try the install and configuration … maybe about 40 times. I’m a Linux noob, but … could it really so hard and complicated to set this up. Maybe I’m also to dumb, don’t know.

Normally I would have thow this in the next corner, but unfortunately my boss wants that n8n Thing, thats why I’m asking here :grin:

I just can’t interpret what this message is trying to tell me! Perhaps someone will take pity after all.

In this case, follow this bug:

hopefully it results in a fix.

Hi Jabbson … Then at least I won’t have to hang myself with the calf rope. :joy:

Maybe I try tomorrow, ho to install a specific version, do you know the version number before? But thx for that info!

Glad I could give you a pointer and put your mind at ease (this is not something you did wrong, and others report the same issue).

The release number are listed here: