Connection lost with Nginx Proxy Manager on Synology Docker

On my Synology NAS I’m running n8n in a Docker container.
I can access n8n via 192.168.0.100:5678 – no problem.
In another container I configured Nginx Proxy Manager (NPM) with Cloudflare DNS.
Because Synology listens by default to ports 80 and 443, I have my router forwarding ports 60080 and 60443 to NPM.
I configured NPM for n8n as follows: domain is n8n.example.com it forwards to 192.168.0.100:5678
And here’s where I’m confused, as schema I have to select http. Https won’t work, even though I’ve set N8N_PROTOCOL=https and all other URLs to https too.
So that’s one thing, but it works…

What I do see is this:
Screenshot 2021-05-14 at 00.55.57
And I’ve tried all possible combinations but I cannot get it to show the Active toggle.

The environment variables are as follows:
0 WEBHOOK_TUNNEL_URL=https://n8n.example.com/
1 VUE_APP_URL_BASE_API=https://n8n.example.com/
2 N8N_PORT=5678
3 NODE_ENV=production
4 N8N_HOST= n8n.example.com
5 N8N_PROTOCOL=https
6 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
7 NODE_VERSION=14.15.5
8 YARN_VERSION=1.22.5
9 NODE_ICU_DATA=/usr/local/lib/node_modules/full-icu
10 DB_TYPE=mysqldb
11 GENERIC_TIMEZONE=Europe/Amsterdam
12 TZ=Europe/Amsterdam
13 DB_MYSQLDB_USER=xxx
14 DB_MYSQLDB_PORT=3306
15 DB_MYSQLDB_PASSWORD=xxx
16 DB_MYSQLDB_HOST=192.168.0.100
17 DB_MYSQLDB_DATABASE=xxx
18 N8N_BASIC_AUTH_PASSWORD=xxx
19 N8N_BASIC_AUTH_USER=Me
20 N8N_BASIC_AUTH_ACTIVE=true

What am I doing wrong?

I’ve solved both issues :slight_smile:

1 – I can use https in Nginx Proxy Manager (NPM) configuration:

And I have an active connection. Thanks to the solutions mentioned here:
Nginx configuration - #7 by Arnaud and here:
UI Connection Lost - Server-Sent Events - #9 by vuchl

In Nginx Proxy Manager (NPM) it looks like this:

3 Likes

Nice! Thanks for sharing your solutions, @Erwin

1 Like