N8N on Synology + Nginx Proxy Manager → Crash extract text from PDF

Hi everyone,

I successfully installed n8n Version 1.112.4 on my Synology using Docker.

The base setup works fine, and I’ve set up a subdomain with Nginx Proxy Manager + SSL.

However, in the Editor I constantly get “Connection lost” if I start any workflow the container crashing

Error: Container crashing if I start any workflow

YAML

version: '3.7'

services:
  n8n:
    image: n8nio/n8n:latest
    container_name: n8n_app
    restart: always
    ports:
      - 5678:5678
    environment:
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
      - N8N_HOST=sub.domain.com
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - N8N_RUNNERS_ENABLED=true
      - N8N_EDITOR_BASE_URL=https://sub.domain.com/
      - NODE_ENV=production
      - WEBHOOK_URL=https://sub.domain.com/
      - GENERIC_TIMEZONE=Europe/Berlin
      - TZ=Europe/Berlin
    
    volumes:
      - /volume1/docker/n8n/home:/home/node/.n8n
      - /volume1/docker/n8n/data:/files

volumes:
  n8n_data:

networks:
  bridge:
    driver: bridge

Websocket active in NPM. I suspect that in Nginx Proxy Manager I also need to add some extra headers under Advanced config so that the origin check passes.

Does anyone have a working Advanced Config for NPM with n8n, or can tell me which headers are absolutely required?

Thanks!

Information on your n8n setup

  • n8n version: 1.112.4
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system: Synology OS

Hey! I would try with what most people had success with and remove 1 by one if you so wish. The Origin header appears to be the most important:

location /rest/push {
    proxy_pass http://n8n_app:5678;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
    proxy_set_header Origin $scheme://$http_host;
    proxy_read_timeout 86400;
    proxy_send_timeout 86400;
}

Before that however, I would check if websocket support is enabled in NPM:

Also, after all this, consider changing the docker file, I generated an example one with AI:

version: '3.7'

services:
  n8n:
    image: n8nio/n8n:latest
    container_name: n8n_app
    restart: always
    ports:
      - 5678:5678
    environment:
      - N8N_HOST=sub.domain.com
      - N8N_PORT=443  # Change this to 443 for HTTPS, revert if not using https
      - N8N_PROTOCOL=https
      - N8N_EDITOR_BASE_URL=https://sub.domain.com
      - WEBHOOK_URL=https://sub.domain.com
      - N8N_PUSH_BACKEND=sse
      # Add these critical settings:
      - N8N_SECURE_COOKIE=true
      - N8N_TRUST_PROXY=true
      - N8N_PROXY_HOPS=1
      - N8N_ALLOW_CONNECTIONS_FROM=https://sub.domain.com
      - NODE_ENV=production
      - GENERIC_TIMEZONE=Europe/Berlin
      - TZ=Europe/Berlin
    volumes:
      - /volume1/docker/n8n/home:/home/node/.n8n
      - /volume1/docker/n8n/data:/files

networks:
  default:
    name: npm_default  # Use NPM's network
    external: true

Let me know if any of this nudges things in the right direction.

Thanks for your reply
2025-09-23T14:38:28.229Z | info | n8n does not have permission to use port 443. Please run n8n with a different port. {“file”:“abstract-server.js”}

Container crashing

If you used port 443 in the dockerfile and it crashed, then we will need to stay on the normal port you are using in NPM. Can you share more on what changes you implemented and what was the result?

I am getting connection error if I stay with it: - N8N_PUSH_BACKEND=sse

I removed it but if I execute any workflow getting connection error and container restarting it. For example extract text from pdf causes container crash. (pdf has got only one word) :slight_smile:

I changed port to 5678 instead of 5679. 5679 doe not work.

So I need a working YAML and NPM Config but I could not find it

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