Problematic docker n8n with cloudflare tunnel

abnormal load times for n8n im not gonna say that my setup is solid since im new to docker so my setup is.
fiber connection 500mbps
raspberry pi 5 8GB


as you can see the loading times are over 20 sec and 1 minute and 2 minutes

here are some logs from the docker containers.
cloudflare tunnel:

024-12-30T13:01:53Z INF Starting tunnel tunnelID=05baecc0-0278-431d-9e82-cf94872c69fb

2024-12-30T13:01:53Z INF Version 2024.12.2 (Checksum e897acbba89818f38661ec0427dcea1d9cf388f8748bdef1ccac3c01e3bea971)

2024-12-30T13:01:53Z INF GOOS: linux, GOVersion: go1.22.5-devel-cf, GoArch: arm64

2024-12-30T13:01:53Z INF Settings: map[no-autoupdate:true]

2024-12-30T13:01:53Z INF Environmental variables map[TUNNEL_TOKEN:*****]

2024-12-30T13:01:53Z INF Generated Connector ID: bddf6783-f3e6-46a2-a313-8a2a9b120139

2024-12-30T13:01:53Z INF Initial protocol quic

2024-12-30T13:01:53Z INF ICMP proxy will use 172.18.0.3 as source for IPv4

2024-12-30T13:01:53Z INF ICMP proxy will use ::1 in zone lo as source for IPv6

2024-12-30T13:01:53Z INF ICMP proxy will use 172.18.0.3 as source for IPv4

2024-12-30T13:01:53Z INF ICMP proxy will use ::1 in zone lo as source for IPv6

2024-12-30T13:01:53Z INF Starting metrics server on 127.0.0.1:20241/metrics

2024/12/30 13:01:53 failed to sufficiently increase send buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.

2024-12-30T13:01:53Z INF Registered tunnel connection connIndex=0 connection=2197932b-5a70-43ec-844c-7419dffc661c event=0 ip=198.41.200.113 location=ath01 protocol=quic

2024-12-30T13:01:54Z INF Registered tunnel connection connIndex=1 connection=7ee6b659-17c2-44e7-8406-6ddb5be64cf4 event=0 ip=198.41.192.107 location=fra11 protocol=quic

2024-12-30T13:01:55Z INF Registered tunnel connection connIndex=2 connection=d9410993-2744-47b4-a895-2689636d2efe event=0 ip=198.41.200.63 location=ath01 protocol=quic

2024-12-30T13:01:55Z INF Updated to new configuration config="{\"ingress\":[{\"hostname\":\"n8n.dimtsas.cloud\",\"originRequest\":{\"noTLSVerify\":true},\"service\":\"http://n8n:5678\"},{\"service\":\"http_status:404\"}],\"warp-routing\":{\"enabled\":false}}" version=3

2024-12-30T13:01:56Z INF Registered tunnel connection connIndex=3 connection=46afc943-b38c-46af-8910-3a41b21c95fb event=0 ip=198.41.192.167 location=fra08 protocol=quic

2024-12-30T13:02:26Z ERR  error="Incoming request ended abruptly: context canceled" connIndex=3 event=1 ingressRule=0 originService=http://n8n:5678

2024-12-30T13:02:26Z ERR Request failed error="Incoming request ended abruptly: context canceled" connIndex=3 dest=https://n8n.dimtsas.cloud/rest/push?pushRef=snj1e09zqh event=0 ip=198.41.192.167 type=ws

and n8n

Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide. Changing permissions to 0600..

User settings loaded from: /home/node/.n8n/config

Initializing n8n process

n8n ready on 0.0.0.0, port 5678

Version: 1.72.1

Editor is now accessible via:

http://localhost:5678/

cosmposer.yml:

volumes:
  n8n_data:

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    environment:
      - WEBHOOK_URL=https://n8n.domain.com
      - N8N_DEBUG=true
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=10.10.0.200
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n
      - DB_POSTGRESDB_USER=n8n
      - DB_POSTGRESDB_PASSWORD=n8n
    ports:
      - "5678:5678"
    volumes:
      - n8n_data:/home/node/.n8n

  cloudflared:
    image: cloudflare/cloudflared
    command: tunnel --no-autoupdate run
    env_file: .env
    restart: always
    depends_on:
      - n8n

networks:
  default:
    name: n8n_network

router i have ubiquity products and i made sure that cloudflare can have traffic freely to the raspberry

so can someone detect where is the problem? is the system, setup, or settings?

Information on your n8n setup

  • n8n version: latest
  • Database (Postgress):
  • n8n EXECUTIONS_PROCESS setting (i dont know what is this):
  • Running n8n via (Docker):
  • Operating system: Debian GNU/Linux 12 (bookworm)

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:

can you try changing the command from tunnel --no-autoupdate run to tunnel --no-autoupdate --protocol http2 run ?

also, are you using a quick tunnel? Check the logs for INF Requesting new quick Tunnel.
if yes, it might help to setup a proper zero-trust account, and use that to create the tunnel instead.

it looks that is working good with http2 protocol.

also im gonna try a different way to setup gloudflare meybe how u suggest me with zero trust account

im gonna do some testing today and i am gonna come back to you

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