1

To run docker with the reverse proxy Traefik v2 on a Synology NAS, I need to be able to use port 80 and 443 on the host system. The Operation System of the NAS DSM uses its own reverse proxy, nginx, which thries to occupy the ports on its own. Under DSM 6.2 I could change the port 80 and 443 by using a boot script (change-ports.sh), like described here, so that the ports went free and could be used by docker Traefik reverse proxy.

#! /bin/bash

HTTP_PORT=81
HTTPS_PORT=444

sed -i "s/^\( *listen .*\)80/\1$HTTP_PORT/" /usr/syno/share/nginx/*.mustache
sed -i "s/^\( *listen .*\)443/\1$HTTPS_PORT/" /usr/syno/share/nginx/*.mustache

After upgrading Synology NAS 918+ to DSM 7, I'm no longer able to "free" port 80 and 443. Obviously the script doesn't work and Nginx (from DSM) is always blocking the port.

The Question is, how to reach the docker reverse proxy Traefik again, by using port 80/443 under the new OS DSM 7.

Daniel_WW
  • 11
  • 3

1 Answers1

2

It seems as if the config-files are now directly stored in /etc/nginx

The following worked for me:

#! /bin/bash

HTTP_PORT=81
HTTPS_PORT=444

sed -i "s/^\( *listen .*\)80/\1$HTTP_PORT/" /etc/nginx/nginx.conf*
sed -i "s/^\( *listen .*\)443/\1$HTTPS_PORT/" /etc/nginx/nginx.conf*

I basically changed the location of the nginx-config in the script. Everything else is the same. Now traefik is available again.

SirSiggi
  • 21
  • 2
  • If I understand correctly, this just makes NGINX use different ports...Is there an easy way to stop it altogether? – ZaxLofful May 15 '22 at 13:57