Hello n8n team and community,
I have encountered a very persistent “Lost connection to the server” error and have exhausted all troubleshooting steps. I’m hoping you can provide some insight.
My Environment:
-
Cloud Provider: Google Cloud Platform (GCP)
-
Instance Type: e2-medium (2 vCPU, 4 GB RAM)
-
OS: Ubuntu 22.04 LTS
-
Deployment Method: Docker Compose with n8n and Nginx Proxy Manager (NPM).
The Problem: I can successfully install, log in, and use the n8n UI via my custom domain (https://ainmm.com). However, any time I try to execute a node that makes an outbound HTTPS request (like an RSS Feed trigger or Google Drive trigger), the UI immediately shows the “Lost connection to the server” error. The n8n container enters a crash-restart loop.
What I Have Already Tried & Ruled Out (Full Troubleshooting Log):
-
Ruled out Resource Issues: Upgraded VM from 1GB to 2GB to 4GB RAM.
dmesgshows no OOM killer logs. -
Ruled out Reverse Proxy Issues:
-
Using Nginx Proxy Manager.
-
Force SSLandWebsockets Supportare both enabled.
-
-
Ruled out n8n Configuration Issues:
-
Set
N8N_TRUST_PROXY=trueenvironment variable. -
Set
WEBHOOK_URLto my HTTPS domain.
-
-
Ruled out Permission Issues:
-
Corrected all volume permissions with
sudo chown -R 1000:1000 .... -
Using absolute paths (
/home/user/.n8n) for volumes indocker-compose.yml.
-
-
Ruled out Outbound Network/SSL Issues:
-
I have
exec’d into the running n8n container. -
ping google.comworks perfectly. -
I installed
ca-certificatesandcurlinside the container. -
curl -v https://google.comworks perfectly and shows a successful TLS handshake.
-
-
Ruled out Version Issues: I have tried multiple versions of n8n, including
1.109.1andlatest, the problem persists. -
Logs:
- The last error message in the
sudo docker logs [n8n-container-name]before it restarts is always the sameEACCES: permission deniederror, even after runningchownand using absolute paths. It seems to be the entry point to the crash, but the root cause appears to be the execution of the node itself.
Given that
curlworks from within the container, but the n8n application process still fails on outbound HTTPS calls, this seems to be a very deep issue within the Node.js runtime or n8n’s specific implementation in this environment. Any ideas would be greatly appreciated.Thank you!
- The last error message in the