Getting "connection lost" error in a deployed n8n instance

If your question hasn’t been asked before, please follow the template below. Skip the questions that are not relevant to you. →

Hi everyone,

I deployed an n8n instance using this tutorial on YouTube. (Ubuntu + Vultr + NPM). The instance is deployed but when i see “connection lost” message when i try to create a workflow.

Did anyone else face this issue before? please help me in resolving this.

Try this in your NGINX/NPM advanced config for the n8n host:

  • WebSocket support

    • proxy_http_version 1.1;

    • proxy_set_header Upgrade $http_upgrade;

    • proxy_set_header Connection “upgrade”;

  • Forward original client info

    • proxy_set_header Host $host;

    • proxy_set_header X-Real-IP $remote_addr;

    • proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    • proxy_set_header X-Forwarded-Proto $scheme;

  • Disable caching/buffering and avoid timeouts

    • chunked_transfer_encoding off;

    • proxy_buffering off;

    • proxy_cache off;

    • proxy_read_timeout 3600;

    • proxy_send_timeout 3600;

These settings have resolved the exact “connection lost” symptom for multiple users behind NGINX/NPM and Kubernetes ingress (enable WebSocket support in NPM’s UI if you use it)

You can check here:

If you’re on a subpath (e.g., /n8n), also set:

Thanks a lot!

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