Hi everyone,
I’m self-hosting n8n via Docker behind a reverse proxy (Nginx + HTTPS) on a VPS (Ubuntu 24.04).
Version 1.74.0
was running flawlessly.
I upgraded to 1.98.1
to test OpenRouter and newer AI nodes. After upgrade:
Docker container starts correctly
Migrations complete without error
Logs show the editor is available at my domain (custom HTTPS setup)
However:
The editor loads visually
Then immediately shows “Connection lost”
No visible errors in logs
API call to /rest/version
fails silently
Environment variables used:
- N8N_HOST=mydomain.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- N8N_EDITOR_BASE_URL=https://mydomain.com/
- WEBHOOK_URL=https://mydomain.com/
- NODE_ENV=production
- N8N_TRUST_PROXY=true
- GENERIC_TIMEZONE=Europe/Paris
Rollback:
Reverting to 1.74.0
= everything works fine again.
Has anyone seen this in Docker+Nginx setups with N8N 1.98+?
Any updated requirements I may have missed?
Thanks
1 Like
Hey @alexisprt
What’s the nginx config you have?
Samuel
Hey Samuel,
Here’s the Nginx config I’m using as a reverse proxy for N8N behind HTTPS:
nginx
server {
listen 443 ssl;
server_name your-domain.com;
ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
proxy_pass http://localhost:5678;
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;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 443;
}
}
server {
listen 80;
server_name your-domain.com;
return 301 https://$host$request_uri;
}
Let me know if you also want the Docker env vars – I had to tune a few (N8N_TRUST_PROXY
, etc.) to avoid “connection lost” issues.
Hey @alexisprt
# 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 and buffering
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
# Prevent timeouts
proxy_read_timeout 3600;
proxy_send_timeout 3600;
Hey,
So after doing some looking into it, it seems it might be because ure not handle websockets in ure nginx, I would look into these, which may help.
# 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 cachi…
You can probably add in websocket support too
Best regards,
Samuel
3 Likes
Hi Samuel,
Thanks a lot for your feedback and especially for the WebSocket tip with Nginx!
With your advice, everything now works perfectly on the latest N8N versions. No more “connection lost” issues or workflows freezing — you definitely saved me a lot of troubleshooting time.
Thanks again for your support, it was exactly what I needed!
Alexis
1 Like
Thanks, Samuel. It works. I had the same problem after upgrading from 1.94.1 to 1.95.3 version. The reason was a wrong nginx configuration. Thanks to your example config I upgraded the app to 1.98.1
1 Like
system
Closed
June 25, 2025, 2:19pm
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.