Update n8n docker breaks the platform - Lost connection to the server

Describe the problem/error/question

On Ubuntu with docker, i’m using a trasversal Traefik.
It’s working fine with N8N 1.82.1, but when i update it to 1.118.0, i can login, but after, i have Connection lost at top page, and when i execute a workflow, i have the error “Lost connection to the server“.

What is the error message (if any)?

In console:
Firefox can’t establish a connection to the server at ….com/rest/push?pushRef=gbl…x7.
Cookie “dmn_chk_01…2666” has been rejected for invalid domain
Failed to fetch sessions metadata: ResponseError: Plan lacks license for this feature

In container log:
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. ….
at Object.xForwardedForHeader (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:187:13)
at Object.wrappedValidations. [as xForwardedForHeader] (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:398:22)
at Object.keyGenerator (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:671:20)
at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:724:32
at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:704:5 {
code: ‘ERR_ERL_UNEXPECTED_X_FORWARDED_FOR’,
help: ‘…-limit.github.io/ERR_ERL_UNEXPECTED_X_FORWARDED_FOR/’
}
Origin header does NOT match the expected origin. (Origin: “undefined” → “N/A”, Expected: “undefined” → “undefined”, Protocol: “undefined”)
ResponseError: Invalid origin!
at Push.handleRequest (/usr/local/lib/node_modules/n8n/src/push/index.ts:143:10)
at /usr/local/lib/node_modules/n8n/src/push/index.ts:99:10
at Layer.handleRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/lib/layer.js:152:17)
at trimPrefix (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:342:13)
at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:297:9
at processParams (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:582:12)
at next (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:291:5)
at /usr/local/lib/node_modules/n8n/src/auth/auth.service.ts:123:18

Docker

n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
ports:

  • “127.0.0.1:5678:5678”
    labels:

  • traefik.enable=true

  • traefik.http.routers.n8n.rule=Host(mon.domain.com)

  • traefik.http.routers.n8n.tls=true

  • traefik.http.routers.n8n.entrypoints=web,websecure

  • traefik.http.routers.n8n.tls.certresolver=mytlschallenge

  • traefik.http.middlewares.n8n.headers.SSLRedirect=true

  • traefik.http.middlewares.n8n.headers.STSSeconds=315360000

  • traefik.http.middlewares.n8n.headers.browserXSSFilter=true

  • traefik.http.middlewares.n8n.headers.contentTypeNosniff=true

  • traefik.http.middlewares.n8n.headers.forceSTSHeader=true

  • traefik.http.middlewares.n8n.headers.SSLHost=domain.com

  • traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true

  • traefik.http.middlewares.n8n.headers.STSPreload=true

  • traefik.http.routers.n8n.middlewares=n8n@docker

  • traefik.http.services.n8n.loadbalancer.server.port=5678
    environment:

  • N8N_HOST=mon.domain.com

  • N8N_PORT=5678

  • N8N_PROTOCOL=https

  • NODE_ENV=production

  • WEBHOOK_URL=my url

  • GENERIC_TIMEZONE=${GENERIC_TIMEZONE}

  • N8N_PUSH_BACKEND=sse

  • N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false

  • N8N_RUNNERS_ENABLED=true

  • TZ=${GENERIC_TIMEZONE}
    volumes:

  • n8n_data:/home/node/.n8n

  • /local-files:/files
    networks:

  • traefik-net

volumes:

traefik_data:

external: true

n8n_data:
external: true

networks:
traefik-net:
external: true

I have the same problem. Did you manage to fix it?

Hello,
I have

  1. Create a traefik service in independant docker compose file :

services:
traefik:
image: traefik
restart: always
command:

  • “–api=true”
  • “–providers.docker=true”
  • “–entrypoints.web.address=:80”
  • “–entrypoints.websecure.address=:443”
  • “–certificatesresolvers.mytlschallenge.acme.tlschallenge=true”
  • “–[email protected]
  • “–certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json”
    ports:
  • “80:80”
  • “443:443”
    volumes:
  • ./letsencrypt:/letsencrypt
  • /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
  • traefik-net

networks:
traefik-net:
name: traefik-net
external: true

  1. set all zammad services on “networks: [zammad] “, and at the end :
    networks: # Ajouté par David
    traefik-net:
    external: true
  2. Adapt zammad nginx service :
    zammad:
    name: zammad
    zammad-nginx:
    <<: *zammad-service
    command: [“zammad-nginx”]
    expose:
    • “${NGINX_PORT:-8080}”
      ports:
    • “${NGINX_EXPOSE_PORT:-8080}:${NGINX_PORT:-8080}”
      labels:
    • traefik.enable=true
    • traefik.http.routers.zammad.rule=Host(ticketing.myDomain.com)
    • traefik.http.routers.zammad.entrypoints=web,websecure
    • traefik.http.routers.zammad.tls=true
    • traefik.http.routers.zammad.tls.certresolver=mytlschallenge
    • traefik.docker.network=traefik-net
    • traefik.http.routers.zammad.service=zammad
    • traefik.http.services.zammad.loadbalancer.server.port=8080
      networks: [zammad, traefik-net]
      depends_on:
    • zammad-railsserver
  3. In others zammad services, indicate to not enabled traefik for map port, exemple:
    zammad-scheduler:
    <<: *zammad-service
    command: [“zammad-scheduler”]
    labels:
    • “traefik.enable=false”
      networks: [zammad]

Regards