N8n lost connection to the server while running in QNAP

  • I am trying to run n8n on my QNAP. The thing is, QNAP offers a software named Container Station, where I can run all of my Docker containers. I can run n8n on the QNAP after configuring n8n through a reverse proxy via https.
    The issue occurs when I try to execute a node, and it says it has lost connection to the server. After checking the n8n logs, I am not seeing any errors, nor on my reverse proxy nginx. I am not able to see any error logs, at least to point myself in the right direction to fix the issue. Here is my configuration of n8n using a Docker Compose file that I loaded inside of my Container Station as an Application, and it loads the container with this configuration and persists the data in an external volume

services:
n8n:
container_name: n8n
image: docker.n8n.io/n8nio/n8n:latest
restart: unless-stopped
ports:

  • “5678:5678”
    environment:
  • N8N_ENCRYPTION_KEY=customer_encryption_key_here
  • N8N_HOST=n8n.mydomain.com
  • N8N_PORT=5678
  • N8N_PROTOCOL=https
  • GENERIC_TIMEZONE=America/New_York
  • TZ=America/New_York
  • NODE_ENV=production
  • N8N_RUNNERS_ENABLED=true
  • N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
  • N8N_TRUST_PROXY=true
  • N8N_PROXY_HOPS=1
  • DB_SQLITE_POOL_SIZE=2
  • N8N_LOG_OUTPUT=console,file
  • N8N_LOG_LEVEL=debug
  • N8N_LOG_FILE_LOCATION=/home/node/.n8n/logs/n8n.log
  • N8N_LOG_FILE_MAXSIZE=100
  • N8N_LOG_FILE_MAXCOUNT=10
    volumes:
  • /share/CACHEDEV1_DATA/Container/data_volumes/n8n/data:/home/node/.n8n
  • /share/CACHEDEV1_DATA/Container/data_volumes/n8n/local-files:/files
  • /share/CACHEDEV1_DATA/Container/data_volumes/n8n/logs:/home/node/.n8n/logs
    networks:
  • my-network

networks:
my-network:
external: true

Describe the problem/error/question

Not able to execute any workflow

Please share your workflow

It is a manual click that executes a python code to print an array in the output console, but can be print(‘hello world’)

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): QNAP container station
  • Operating system: linux

hello @ivan_zinov

Most likely, your nginx doesn’t have a wss-related configuration for the n8n. Check how to configure WSS in nginx.

You can find more errors by opening the dev console (F12) and checking the network tab

I ended up trying to run it on my Docker Desktop first, and then I replicated the same steps on my QNAP container station. So far, the only difference I am seeing is that I have my volumes at the container app level, and with this Docker-Compose, I was trying to persist the volumes in a shared drive. Maybe it was something related to permissions :frowning: , now it works

1 Like

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