Error: Connection lost in Workflows (new setup with Docker & Cloudflare)

Hello,

I installed n8n with Docker on my Raspberry Pi with Ubuntu Server and created a tunnel with Cloudflare. For the installation, I followed this tutorial: https://youtu.be/ONgECvZNI3o?si=5_Rca5F3Mlb0y1YE The setup works, I can access n8n but in every workflow it shows “Connection lost - You have a connection issue or the server is down. n8n should reconnect automatically once the issue is resolved.“

My docker.compose.yml is the one from the docs (https://docs.n8n.io/hosting/installation/server-setups/docker-compose/#6-create-docker-compose-file)

That are the logs (I replaced my actual URL and changed every https:// to htps:// because only 5 URLS are allowed for new users):
hugo@server:~/n8n-compose$ docker logs n8n-compose-traefik-1 2025-10-12T13:51:31Z ERR Unable to obtain ACME certificate for domains error=“unable to generate a certificate for the domains [n8n.placeholder.com]: error: one or more domains had a problem:\n[n8n.placeholder.com] invalid authorization: acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: Cannot negotiate ALPN protocol \“acme-tls/1\” for tls-alpn-01 challenge\n” ACME CA=htps://acme-v02.api.letsencrypt.org/directory acmeCA=htps://acme-v02.api.letsencrypt.org/directory domains=[“n8n.placeholder.com”] providerName=mytlschallenge.acme routerName=n8n@docker rule=Host(n8n.placeholder.com) 2025-10-12T13:51:32Z ERR Unable to obtain ACME certificate for domains error=“unable to generate a certificate for the domains [n8n.placeholder.com]: acme: error: 429 :: POST :: htps://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: too many failed authorizations (5) for \“n8n.placeholder.com\” in the last 1h0m0s, retry after 2025-10-12 14:02:16 UTC: see Rate Limits - Let’s Encrypt htps://letsencrypt.org/docs/rate-limits/#authorization-failures-per-hostname-per-account” ACME CA=htps://acme-v02.api.letsencrypt.org/directory acmeCA=htps://acme-v02.api.letsencrypt.org/directory domains=[“n8n.placeholder.com”] providerName=mytlschallenge.acme routerName=n8n@docker rule=Host(n8n.placeholder.com)

hugo@server:~/n8n-compose$ hugo@server:~/n8n-compose$ docker logs n8n-compose-n8n-1 Initializing n8n process n8n ready on ::, port 5678 n8n Task Broker ready on 127.0.0.1, port 5679 There are deprecations related to your environment variables. Please take the recommended actions to update your configuration: - DB_SQLITE_POOL_SIZE → Running SQLite without a pool of read connections is deprecated. Please set DB_SQLITE_POOL_SIZE to a value higher than zero. See: Database environment variables n8n Docs htps://docs.n8n.io/hosting/configuration/environment-variables/database/#sqlite- N8N_BLOCK_ENV_ACCESS_IN_NODE → The default value of N8N_BLOCK_ENV_ACCESS_IN_NODE will be changed from false to true in a future version. If you need to access environment variables from the Code Node or from expressions, please set N8N_BLOCK_ENV_ACCESS_IN_NODE=false. Learn more: Security environment variables n8n Docs htps://docs.n8n.io/hosting/configuration/environment-variables/security/- N8N_GIT_NODE_DISABLE_BARE_REPOS → Support for bare repositories in the Git Node will be removed in a future version due to security concerns. If you are not using bare repositories in the Git Node, please set N8N_GIT_NODE_DISABLE_BARE_REPOS=true. Learn more: Security environment variables n8n Docs htps://docs.n8n.io/hosting/configuration/environment-variables/security/- [license SDK] Skipping renewal on init: license cert is not due for renewal Registered runner “JS Task Runner” (At0a7LMH-aNH9yWHSZjOL) Version: 1.114.4 Editor is now accessible via: htps://n8n.placeholder.com

Does anyone know how to resolve this issue? Thanks

Had the same issue since i set up Cloudflare tunnel. I could fix it with DB_SQLITE_POOL_SIZE=1 in my docker-compose

Which settings do you got for your tunnel? I got these and tried your variable but it still shows Connection lost

Hi, so for me it worked by using HTTP and localhost:8080 (my n8n Port):


I was troubleshooting this error 5 hours and it fixed it for me.
Maybe one of those .env variables for my n8n docker container helped too, but the big step was using the cloudflare tunnel.

N8N_PROXY_HOPS=1
N8N_SECURE_COOKIE=true
N8N_PUSH_BACKEND=websocket # optional explizit
N8N_BASIC_AUTH_ACTIVE=false

Idk I also tried these but it still shows Lost Connection.

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