Can't be logged on different servers at the same time

I can’t be logged in into 2 different servers at the same time.

¿Is there any way to achieve this?

I have the server A and the server B, and I would like to compare some things between them. For instance, a workflow, but could be credentials, or executions, or any thing.

The point is that I log in server A, and open a workflow. Then I open another tab and enter the url for server B. A login is requested and I get in. Then I open a workflow form server B.

At this time I have 2 tabs in the browser, one with the server A and another with the server B, and this last tab is the active one.

Now come back to the first tab to check the server A and try to do something but nothing works and I have to refresh the page: a new login is requested!

I log into server A, do my stuff, and then click on the other tab, the one for the server B. I try to do something but nothing works until I refresh the page: a new login is requested!

Each time I change of tab (and server) a login is requested. It seems that the session data is shared between the servers in some way.

The objective is to have 2 o more servers logged in with session data (or whatever it is) related to each server and not to the client.

¿Is there any way to do it?

This happens from old versions (1.x) up to the current now (v1.24.1).

Thank you in advance!

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:

Hi @PabloRQ

Welcome to the community :partying_face:

I do this all the time, so something must be wrong with this server setup. please provide the info on both servers. and give us a bit more details on those servers if possible.

Hi @BramKn !

Thank you for your quick response.

Both servers run in a different hardware with the same docker compose (portainer) configuration:

version: '3.8'


    image: postgres:11
    restart: always
      - db_data:/var/lib/postgresql/data
      - ${N8N_LOCAL_FILES}/n8n-config/
      test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
      interval: 5s
      timeout: 5s
      retries: 10

    restart: always
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - GENERIC_TIMEZONE=Europe/Madrid
      - TZ=Europe/Madrid
      - N8N_PORT=5678
      - 5678:5678
      - postgres
      - main_data:/home/node/.n8n
      - ${N8N_LOCAL_FILES}:/files
        condition: service_healthy

Data (workflows and credentials) are different in each server.

Both servers are in local network or connected by SSH tunneling. No server has a public IP or domain name.

For the client, I’m using Ubuntu 23.10 and Firefox 121.0.1.

Any idea?

I also do this all the time with 3 different instances, When you access the instances are you using different urls / ips?

Good point @Jon. All are in localhost but in different ports.

2 of them are running in the local hardware and others are connected by SSH tunneling, which finally is a local port connected with a remote one.

Could be that the session is bound to the host but not host+port?

Hey @PabloRQ,

That could possibly be it.

Is it possibly to change this behavior?

I mean, to be able to stay logged in 2 o more different servers in localhost+port at the same time.

Hey @PabloRQ,

The problem is we use a cookie to store the auth token and the domain part of a cookie while at one point it did allow for a port it was not used by all browsers so there was a change to the RFC that dropped this as an option.

The best solution for this would be to add the services to your local hosts file so you could have… n8n1 n8n2 n8n3

Then in your browser you can load http://n8n1 (or 2 / 3) and while they point back to localhost the domain is different and it should solve the problem.


That works!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.