Self-Hosted n8n on GCP/Docker loses connection on any node with outbound HTTPS request (RSS, Google Drive, etc.)

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. dmesg shows no OOM killer logs.

  • Ruled out Reverse Proxy Issues:

    • Using Nginx Proxy Manager.

    • Force SSL and Websockets Support are both enabled.

  • Ruled out n8n Configuration Issues:

    • Set N8N_TRUST_PROXY=true environment variable.

    • Set WEBHOOK_URL to 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 in docker-compose.yml.

  • Ruled out Outbound Network/SSL Issues:

    • I have exec’d into the running n8n container.

    • ping google.com works perfectly.

    • I installed ca-certificates and curl inside the container.

    • curl -v https://google.com works perfectly and shows a successful TLS handshake.

  • Ruled out Version Issues: I have tried multiple versions of n8n, including 1.109.1 and latest, the problem persists.

  • Logs:

    • The last error message in the sudo docker logs [n8n-container-name] before it restarts is always the same EACCES: permission denied error, even after running chown and 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 curl works 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!

I have actually made a video on how to successfully run N8N behind your own domain or subdomain name. In the video, I’ve hosted it on AWS, it might be helpful. https://youtu.be/16JYf9dLvTM

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