Constantly logged out after less than a minute

Describe the problem/error/question

No matter what I do, I keep getting kicked out of N8N less than a minute after logging in.

From what I’ve observed, the problem only occurs with Firefox, but also outside of Wordflows.

I don’t get kicked out of Google Chrome and Chromium and none of the log entries appear.

What Firefox has for me that the others don’t are extensions such as floccus bookmarks sync, KeePassXC browser, TWP (translater).

Unfortunately, I forgot to ask the question at the beginning, namely, can I fix it myself so that I can now work with it in Firefox or is it a bug? I just remembered that the problem only occurred with the update to n8n version 1.54.4 and before that I could work with it in Firefox too.

What is the error message (if any)?

These log entries only seem to appear when I log in via Firefox and do not appear when I log in with Google Chrome.

2024-08-16T09:24:03.493637821Z browserId check failed on /rest/cta/become-creator
2024-08-16T09:37:09.317574333Z ValidationError: The ‘X-Forwarded-For’ header is set but the Express ‘trust proxy’ setting is false (default). This could indicate a misconfiguration which would prevent express-rate-limit from accurately identifying users. See Page Redirection for more information.
2024-08-16T09:37:09.317663404Z at Object.xForwardedForHeader (/usr/local/lib/node_modules/n8n/node_modules/express-rate-limit/dist/index.cjs:166:13) 2024-08-16T09:37:09.317671011Z at Object.wrappedValidations. [as xForwardedForHeader] (/usr/local/lib/node_modules/n8n/node_modules/express-rate-limit/dist/index.cjs:338:22) 2024-08-16T09:37:09.317677587Z at Object.keyGenerator (/usr/local/lib/node_modules/n8n/node_modules/express-rate-limit/dist/index.cjs:593:20) 2024-08-16T09:37:09.317683045Z at /usr/local/lib/node_modules/n8n/node_modules/express-rate-limit/dist/index.cjs: 644:32 2024-08-16T09:37:09.317689727Z at /usr/local/lib/node_modules/n8n/node_modules/express-rate-limit/dist/index.cjs:625:5 { 2024-08-16T09:37:09.317696182Z code: ‘ERR_ERL_UNEXPECTED_X_FORWARDED_FOR’,
2024-08-16T09:37:09.317702621Z help: ‘Page Redirection
2024-08-16T09:37:09.317708808Z }
2024-08-16T09:39:04.015437793Z browserId check failed on /rest/cta/become-creator

Please share your workflow

none, I keep getting logged out even outside of workflows

Share the output returned by the last node

  • none

Information about your n8n setup

  • n8n version: 1.54.4
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Run n8n via (Docker, npm, n8n cloud, desktop app): Coolify Docker Compose
  • Operating system: Ubuntu 24.04
  • my home-system: Linux Mint 21.1 Cinnamon with Firefox mint-001 1.0 129.0 and Google Chrome 127.0.6533.88 (Official Build) (64-bit) now freshly updated to 127.0.6533.99 (Official Build) (64-bit) and Chromium Version 127.0.6533.99 (Official Build) for Linux Mint (64-bit)

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:

Hey @Matze202,

I use Firefox as my main browser and I don’t have this issue so I suspect it is going to be a config issue or something with a plugin you are using.

To start lets get rid of the X-Forwarded-for message, Can you set N8N_PROXY_HOPS as an env option and set the value to 1 then stop and start n8n and we can see if anything else appears in the log.

Hi @Jon!
Thank you very much, now it works again in Firefox, but what was strange was that since the update, as written above, it had always kicked me out in Firefox.

That is very unusual, the only time I have seen it do that is if I have 2 different n8n versions running on the same host for testing.

This is the only n8n installation running on this server, but I actually wanted to add 1 or 2 more customer instances, but I’d probably rather create a separate instance for each customer. If these run on different subdomains of the same domain, it shouldn’t cause any problems, right?

Hey @Matze202,

If they are different domains you should be ok, I would however check our license and make sure you fully understand it as you mentioned adding customer instances to your server which goes against our license terms.

Unless you are not charging your customers to host n8n for them in which case everything is all good.

Hi @Jon ,

Do you really mean different domains to avoid n8n-side problems or are subdomains sufficient if I observe the conditions below?

As far as I understand, I can charge customers a reasonable fee just for web hosting, domains, etc., if this also covers other products such as websites, domains and emails.

In this context, I will sell n8n for 0.00 euros over the virtual counter and will not charge any service fees (only installation and updates are included in the free service because I want to offer this automatically) or have I misunderstood something?

If I later charge a significantly higher fee for web hosting that includes extensive services or puts a price on various services for n8n, I will contact you beforehand to discuss tariff negotiations.

Hey @Matze202,

Subdomains or different domains are fine, With the license it sounds like you have found a potential grey area but it sounds like it would be ok as they are being charged for n8n.

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