Score:1

Docker with Traefik reverse proxy under Synology DSM 7 // free port 80 and 443

cn flag

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.

Score:2
eg flag

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.

ZaxLofful avatar
bd flag
If I understand correctly, this just makes NGINX use different ports...Is there an easy way to stop it altogether?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.