Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
Operating system: unRAID
Hiya all!
I have recently setup N8N as a docker container on my unRAID home lab. I have reverse proxied it via Apache as I do for all my sites, but have notices I keep getting “Connection Lost - You have a connection issue or the server is down. n8n should reconnect automatically once the issue is resolved.”
Below is my Apache config:
# Redirect HTTP to HTTPS
<VirtualHost *:80>
ServerName n8n.domain.com
\# Redirect all HTTP traffic to HTTPS
Redirect permanent / https://n8n.domain.com/
ErrorLog ${APACHE_LOG_DIR}/n8n-http-error.log
CustomLog ${APACHE_LOG_DIR}/n8n-http-access.log combined
# HTTPS + reverse proxy to n8n
<VirtualHost *:443>
ServerName n8n.domain.com
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
ProxyPreserveHost On
\# Standard HTTP proxy to n8n
ProxyPass / http://10.0.1.112:5678/ retry=0
ProxyPassReverse / http://10.0.1.112:5678/
\# WebSocket support (n8n real-time execution)
ProxyPass /ws/ ws://10.0.1.112:5678/ws/
ProxyPassReverse /ws/ ws://10.0.1.112:5678/ws/
\# Required headers
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
\# Increase timeout for long-running workflows
ProxyTimeout 300
ProxyReceiveBufferSize 65536
ErrorLog ${APACHE_LOG_DIR}/n8n-error.log
CustomLog ${APACHE_LOG_DIR}/n8n-access.log combined